From 020a44ab2dfbe895c2b426ad33777c92a010e953 Mon Sep 17 00:00:00 2001 From: KevinRansom Date: Wed, 30 Mar 2022 23:41:43 -0700 Subject: [PATCH 1/2] More fsharpqa moves --- FSharp.sln | 38 +- VisualFSharp.sln | 30 +- .../ExplicitObjectConstructors.fs | 6 +- .../WithAttribute01.fs | 0 .../WithAttribute02.fs | 0 .../new_while_01.fs | 0 .../ImplicitObjectConstructors.fs | 2 +- .../WithAttribute.fs | 0 .../E_NotMemberOrFunction01.fsx | 0 .../ValueRestriction/MemberOrFunction01.fsx | 0 .../MemberOrFunction01Gen.fsx | 0 .../ValueRestriction/MemberOrFunction02.fsx | 0 .../MemberOrFunction02Gen.fsx | 0 .../ValueRestriction/TypeArgs01.fsx | 0 .../ValueRestriction/TypeFunction01.fsx | 0 .../TypeInferenceVariable01.fsx | 0 .../ValueRestriction.fs | 12 +- .../BasicApplication.fs | 6 +- .../BasicApplication/E_PostfixType01.fs | 0 .../BasicApplication/E_PostfixType03.fs | 0 .../BasicApplication/PostfixType02.fs | 0 .../{ => PatternMatching}/PatternMatching.fs | 12 +- .../W_PatternMatchingCounterExample01.fs | 0 .../W_PatternMatchingCounterExample02.fs | 0 .../W_PatternMatchingCounterExample03.fs | 3 +- .../SequenceIteration.fs | 4 +- .../W_IncompleteMatchFor01.fs | 0 .../E_rigidtypeannotation02.fs | 0 .../E_rigidtypeannotation02b.fs | 0 .../Type-relatedExpressions.fs | 4 +- .../rigidtypeannotation01.fs | 0 .../staticcoercion01.fs | 0 .../staticcoercion01b.fs | 0 .../E_RecursiveInline.fs | 9 + .../E_TypeDeclaration01.fs | 16 + .../E_TypeDeclaration02.fs | 26 + .../InfiniteRecursiveExplicitConstructor.fs | 9 + .../RecursiveSafetyAnalysis.fs | 12 +- .../{ => HashLight}/HashLight.fs | 4 +- .../IndentationWithComputationExpression01.fs | 0 .../HighPrecedenceApplication.fs | 4 +- .../RangeOperator01.fs | 0 .../OffsideExceptions/InfixTokenPlusOne.fs | 3 - .../OffsideExceptions.fs | 7 +- .../OffsideExceptions/RelaxWhitespace2.fs | 0 .../RelaxWhitespace2.fs.err.bsl} | 0 .../MethodResolution/ParametersResolution.fs | 1 + .../CheckingSyntacticTypes.fs | 8 +- .../E_CannotInlineVirtualMethod2.fs | 0 .../E_CannotInlineVirtualMethods1.fs | 0 .../LogicalPropertiesOfTypes.fs | 4 +- .../TypeWithNullLiteral_NetRef.fsx | 0 .../ConstraintSolver/PrimitiveConstraints.fs | 2 +- .../neg_invalid_constructor.fs | 0 .../neg_invalid_constructor.fs.err.bsl} | 0 .../AsyncExpressionStepping.fs | 44 + .../AsyncExpressionSteppingTest1.fs | 0 ...yncExpressionSteppingTest1.fs.il.debug.bsl | 161 + ...ExpressionSteppingTest1.fs.il.release.bsl} | 31 +- .../AsyncExpressionSteppingTest2.fs | 11 + ...ncExpressionSteppingTest2.fs.il.debug.bsl} | 61 +- ...cExpressionSteppingTest2.fs.il.release.bsl | 261 + .../AsyncExpressionSteppingTest3.fs | 6 +- ...yncExpressionSteppingTest3.fs.il.debug.bsl | 226 + ...ExpressionSteppingTest3.fs.il.release.bsl} | 102 +- .../AsyncExpressionSteppingTest4.fs | 10 +- ...yncExpressionSteppingTest4.fs.il.debug.bsl | 376 + ...ExpressionSteppingTest4.fs.il.release.bsl} | 112 +- .../AsyncExpressionSteppingTest5.fs | 0 ...yncExpressionSteppingTest5.fs.il.debug.bsl | 435 + ...ExpressionSteppingTest5.fs.il.release.bsl} | 50 +- .../AsyncExpressionSteppingTest6.fs | 10 +- ...yncExpressionSteppingTest6.fs.il.debug.bsl | 809 ++ ...ExpressionSteppingTest6.fs.il.release.bsl} | 205 +- .../AttributeTargets/AttributeTargets.fs | 30 + .../EmittedIL/AttributeTargets/Default.fs | 0 .../AttributeTargets/Default.fs.il.debug.bsl | 125 + .../Default.fs.il.release.bsl | 125 + .../EmittedIL/AttributeTargets/Field.fs | 0 .../AttributeTargets/Field.fs.il.debug.bsl | 124 + .../AttributeTargets/Field.fs.il.release.bsl | 124 + .../EmittedIL/AttributeTargets/Property.fs | 0 .../AttributeTargets/Property.fs.il.debug.bsl | 124 + .../Property.fs.il.release.bsl | 124 + .../CCtorDUWithMember/CCtorDUWithMember.fs | 46 + .../CCtorDUWithMember/CCtorDUWithMember01.fs | 0 .../CCtorDUWithMember/CCtorDUWithMember01a.fs | 0 .../CCtorDUWithMember01a.fs.il.bsl} | 129 +- .../CCtorDUWithMember/CCtorDUWithMember02.fs | 0 .../CCtorDUWithMember/CCtorDUWithMember02a.fs | 0 .../CCtorDUWithMember02a.fs.il.bsl} | 66 +- .../CCtorDUWithMember/CCtorDUWithMember03.fs | 0 .../CCtorDUWithMember/CCtorDUWithMember03a.fs | 0 .../CCtorDUWithMember03a.fs.il.bsl} | 55 +- .../CCtorDUWithMember/CCtorDUWithMember04.fs | 1 + .../CCtorDUWithMember/CCtorDUWithMember04a.fs | 0 .../CCtorDUWithMember04a.fs.il.bsl} | 43 +- .../CompiledNameAttribute.fs | 51 + .../CompiledNameAttribute01.fs | 3 + .../CompiledNameAttribute01.fs.il.debug.bsl} | 32 +- .../CompiledNameAttribute01.fs.il.release.bsl | 83 + .../CompiledNameAttribute02.fs | 2 + .../CompiledNameAttribute02.fs.il.debug.bsl} | 33 +- .../CompiledNameAttribute02.fs.il.release.bsl | 96 + .../CompiledNameAttribute03.fs | 3 + .../CompiledNameAttribute03.fs.il.debug.bsl} | 32 +- .../CompiledNameAttribute03.fs.il.release.bsl | 86 + .../CompiledNameAttribute04.fs | 2 +- ...ledNameAttribute04.fs.il.net472.debug.bsl} | 121 +- ...edNameAttribute04.fs.il.net472.release.bsl | 396 + ...ledNameAttribute04.fs.il.netcore.debug.bsl | 401 + ...dNameAttribute04.fs.il.netcore.release.bsl | 401 + .../CompiledNameAttribute05.fs | 0 .../ComputationExpr01.fs | 2 + .../ComputationExpr01.fs.il.bsl} | 65 +- .../ComputationExpr02.fs | 1 + .../ComputationExpr02.fs.il.bsl} | 70 +- .../ComputationExpr03.fs | 1 + .../ComputationExpr03.fs.il.bsl} | 176 +- .../ComputationExpr04.fs | 1 + .../ComputationExpr04.fs.il.bsl} | 117 +- .../ComputationExpr05.fs | 1 + .../ComputationExpr05.fs.il.bsl} | 110 +- .../ComputationExpr06.fs | 9 +- .../ComputationExpr06.fs.il.bsl} | 167 +- .../ComputationExpr07.fs | 9 +- .../ComputationExpr07.fs.il.bsl} | 153 +- .../ComputationExprLibrary.fs | 0 .../ComputationExpressions.fs | 59 + .../DoNotBoxStruct/DoNotBoxStruct.fs | 96 + ...DoNotBoxStruct_ArrayOfArray_CSInterface.fs | 1 + ...Struct_ArrayOfArray_CSInterface.fs.il.bsl} | 32 +- ...DoNotBoxStruct_ArrayOfArray_FSInterface.fs | 0 ...Struct_ArrayOfArray_FSInterface.fs.il.bsl} | 37 +- ...ruct_ArrayOfArray_FSInterface_NoExtMeth.fs | 1 + ...rayOfArray_FSInterface_NoExtMeth.fs.il.bsl | 109 + .../DoNotBoxStruct_Array_CSInterface.fs | 1 + ...oNotBoxStruct_Array_CSInterface.fs.il.bsl} | 32 +- .../DoNotBoxStruct_Array_FSInterface.fs | 1 + ...oNotBoxStruct_Array_FSInterface.fs.il.bsl} | 51 +- ...otBoxStruct_Array_FSInterface_NoExtMeth.fs | 1 + ...uct_Array_FSInterface_NoExtMeth.fs.il.bsl} | 43 +- .../DoNotBoxStruct_MDArray_CSInterface.fs | 1 + ...otBoxStruct_MDArray_CSInterface.fs.il.bsl} | 32 +- .../DoNotBoxStruct_MDArray_FSInterface.fs | 1 + ...otBoxStruct_MDArray_FSInterface.fs.il.bsl} | 51 +- ...BoxStruct_MDArray_FSInterface_NoExtMeth.fs | 1 + ...t_MDArray_FSInterface_NoExtMeth.fs.il.bsl} | 43 +- .../DoNotBoxStruct_NoArray_CSInterface.fs | 1 + ...otBoxStruct_NoArray_CSInterface.fs.il.bsl} | 34 +- .../DoNotBoxStruct_NoArray_FSInterface.fs | 1 + ...otBoxStruct_NoArray_FSInterface.fs.il.bsl} | 51 +- ...BoxStruct_NoArray_FSInterface_NoExtMeth.fs | 1 + ...t_NoArray_FSInterface_NoExtMeth.fs.il.bsl} | 45 +- .../DoNotBoxStruct/DoNotBoxStruct_ToString.fs | 1 + .../DoNotBoxStruct_ToString.fs.il.bsl} | 34 +- .../StringEncoding/NormalizationFormC.fs | 37 + .../StringEncoding/NormalizationFormD.fs | 37 + .../StringEncoding/NormalizationFormKC.fs | 37 + .../StringEncoding/NormalizationFormKD.fs | 37 + .../StringEncoding/StringEncoding.fs | 108 + .../EmittedIL/Structure/AttributesOnLet01.fs | 32 + .../EmittedIL/Structure/AttributesOnLet02.fs | 57 + .../Structure/AttributesOnProperty.fs | 27 + .../Structure/AttributesOnPropertyGetter.fs | 27 + .../AttributesOnPropertyGetterSetter.fs | 40 + .../Structure/AttributesOnPropertySetter.fs | 26 + .../EmittedIL}/Structure/BaseType.fs | 0 .../EmittedIL/Structure/ClassArity01.fs | 81 + .../EmittedIL}/Structure/CodeGenHelper.fs | 0 .../EmittedIL/Structure/Delegates01.fs | 46 + .../EmittedIL}/Structure/DerivedType.fs | 0 .../EmittedIL/Structure/DiscUnionCodeGen1.fs | 75 + .../EmittedIL/Structure/DoNotInlineX.fs | 57 + .../EmittedIL/Structure/Equality01.fs | 13 + .../EmittedIL/Structure/Events01.fs | 59 + .../EmittedIL/Structure/Events02.fs | 59 + .../EmittedIL/Structure/Extensions01.fs | 56 + .../EmittedIL/Structure/Extensions02.fs | 53 + .../EmittedIL/Structure/FunctionArity01.fs | 23 + .../Structure/LocalTypeFunctionInIf.fs | 70 + .../EmittedIL/Structure/ModuleArity01.fs | 81 + .../EmittedIL/Structure/NativePtr01.fs | 28 + .../Structure/ObjectExpressions01.fs | 30 + .../Structure/ReadOnlyStructFromLib.fs | 14 + .../EmittedIL}/Structure/ReadWriteLib.cs | 0 .../EmittedIL/Structure/Structure.fs | 182 + .../Structure/UnionTypeWithSignature01.fs | 24 + .../Structure/UnionTypeWithSignature01.fsi | 9 + .../Structure/UnionTypeWithSignature02.fs | 30 + .../Structure/UnionTypeWithSignature02.fsi | 9 + .../EmittedIL}/Structure/UnitsOfMeasure01.fs | 7 +- .../EmittedIL}/Structure/UnitsOfMeasure02.fs | 7 +- .../EmittedIL}/Structure/UnitsOfMeasure03.fs | 6 +- .../EmittedIL}/Structure/dummy.fs | 0 .../EmittedIL/operators/Operators.fs | 14 + .../operators/decimal_comparison.fs | 0 ...decimal_comparison.fs.il.net472.debug.bsl} | 45 +- ...cimal_comparison.fs.il.net472.release.bsl} | 76 + ...decimal_comparison.fs.il.netcore.debug.bsl | 265 + ...cimal_comparison.fs.il.netcore.release.bsl | 265 + .../ErrorMessages/Repro1548.fs | 14 +- .../ErrorMessages/WarnIfDiscardedInList.fs | 12 +- .../FSharp.Compiler.ComponentTests.fsproj | 36 +- .../Globalization/HexCharEncode.fs | 11 +- .../Literals.fs | 26 + tests/FSharp.Compiler.ComponentTests/Misc.fs | 32 + .../OCamlCompat/IndentOff02.fs | 2 +- .../OCamlCompat/W-NoParensInLet01.fs | 2 +- .../OCamlCompat/W_IndentOff03.fs | 2 +- .../{EmittedIL => }/Operators.fs | 3 +- .../SkipLocalsInit.fs | 184 + .../StringFormatAndInterpolation.fs | 36 + .../TailCalls.fs | 237 + .../TupleElimination.fs | 800 ++ .../fsc/noframework/noframework02.fs | 6 +- .../CompilerOptions/fsc/platform/error_01.fs | 2 +- .../CompilerOptions/fsc/platform/error_02.fs | 2 +- .../CompilerOptions/fsc/platform/error_03.fs | 2 +- .../CompilerOptions/fsc/platform/error_04.fs | 2 +- .../CompilerOptions/fsc/platform/error_05.fs | 2 +- .../CompilerOptions/fsc/platform/error_06.fs | 2 +- .../CompilerOptions/fsc/platform/error_07.fs | 2 +- .../CompilerOptions/fsc/platform/error_08.fs | 2 +- .../CompilerOptions/fsc/platform/error_09.fs | 3 +- .../CompilerOptions/fsc/platform/error_10.fs | 2 +- .../CompilerOptions/fsc/platform/error_11.fs | 2 +- .../CompilerOptions/fsc/platform/error_12.fs | 2 +- .../CompilerOptions/fsc/platform/error_13.fs | 2 +- .../CompilerOptions/fsc/platform/error_15.fs | 2 +- .../CompilerOptions/fsc/platform/error_16.fs | 2 +- .../CompilerOptions/fsc/times/error_01.fs | 2 +- .../CompilerOptions/fsc/times/error_02.fs | 2 +- .../CompilerOptions/fsc/times/error_03.fs | 2 +- .../CompilerOptions/fsc/times/times01.fs | 2 +- .../PatternMatching/Simple/W_Incomplete01.fs | 2 +- .../PatternMatching/Simple/W_Incomplete02.fs | 2 +- .../Conformance/Printing/LazyValues02.fsx | 2 +- .../Printing/LazyValues02NetFx4.fsx | 2 +- .../UnitsOfMeasureIdentifiersRoundTrip01.fsx | 2 +- .../UnitsOfMeasuresGenericSignature01.fsx | 2 +- .../UnitsOfMeasuresGenericSignature02.fsx | 2 +- .../Basic/RationalExponents01.fs | 4 +- .../Diagnostics/RangeExpression01.fs | 3 +- .../Parsing/GreaterBarRBrack01.fs | 3 +- .../UnitsOfMeasure/Parsing/Reciprocal01.fs | 6 +- .../tests/codegen/EmittedIL/CompareIL.cmd | 17 + .../EmittedIL/GeneratedIterators/GenIter01.fs | 7 + .../GeneratedIterators/GenIter01.il.bsl | 144 + .../EmittedIL/GeneratedIterators/GenIter02.fs | 7 + .../GeneratedIterators/GenIter02.il.bsl | 149 + .../EmittedIL/GeneratedIterators/GenIter03.fs | 5 + .../GeneratedIterators/GenIter03.il.bsl | 144 + .../EmittedIL/GeneratedIterators/GenIter04.fs | 4 + .../GeneratedIterators/GenIter04.il.bsl | 161 + .../EmittedIL/GeneratedIterators/env.lst | 5 + .../EmittedIL/GeneratedIterators}/keep.lst | 0 .../InequalityComparison01.fs | 3 + .../InequalityComparison01.il.bsl | 88 + .../InequalityComparison02.fs | 3 + .../InequalityComparison02.il.bsl | 88 + .../InequalityComparison03.fs | 3 + .../InequalityComparison03.il.bsl | 86 + .../InequalityComparison04.fs | 3 + .../InequalityComparison04.il.bsl | 86 + .../InequalityComparison05.fs | 3 + .../InequalityComparison05.il.bsl | 98 + .../EmittedIL/InequalityComparison/env.lst | 5 + .../EmittedIL/InequalityComparison}/keep.lst | 0 .../ListExpressionSteppingTest1.fs | 8 + .../ListExpressionSteppingTest1.il.bsl | 104 + .../ListExpressionSteppingTest2.fs | 30 + .../ListExpressionSteppingTest2.il.bsl | 459 + .../ListExpressionSteppingTest3.fs | 12 + .../ListExpressionSteppingTest3.il.bsl | 128 + .../ListExpressionSteppingTest4.fs | 14 + .../ListExpressionSteppingTest4.il.bsl | 136 + .../ListExpressionSteppingTest5.fs | 17 + .../ListExpressionSteppingTest5.il.bsl | 160 + .../ListExpressionSteppingTest6.fs | 14 + .../ListExpressionSteppingTest6.il.bsl | 247 + .../EmittedIL/ListExpressionStepping/env.lst | 6 + .../ListExpressionStepping}/keep.lst | 0 .../MethodImplAttribute.AggressiveInlining.fs | 5 + ...hodImplAttribute.AggressiveInlining.il.bsl | 77 + .../MethodImplAttribute.ForwardRef.fs | 5 + .../MethodImplAttribute.ForwardRef.il.bsl | 77 + .../MethodImplAttribute.InternalCall.fs | 5 + .../MethodImplAttribute.InternalCall.il.bsl | 77 + .../MethodImplAttribute.NoInlining.fs | 5 + .../MethodImplAttribute.NoInlining.il.bsl | 77 + .../MethodImplAttribute.NoOptimization.fs | 5 + .../MethodImplAttribute.NoOptimization.il.bsl | 77 + .../MethodImplAttribute.PreserveSig.fs | 5 + .../MethodImplAttribute.PreserveSig.il.bsl | 77 + .../MethodImplAttribute.Synchronized.fs | 5 + .../MethodImplAttribute.Synchronized.il.bsl | 77 + .../MethodImplAttribute.Unmanaged.fs | 5 + .../MethodImplAttribute.Unmanaged.il.bsl | 77 + .../EmittedIL/MethodImplAttribute/env.lst | 11 + .../EmittedIL/MethodImplAttribute}/keep.lst | 0 .../codegen/EmittedIL/Misc/AbstractClass.fs | 8 + .../EmittedIL/Misc/AbstractClass.il.bsl | 125 + .../tests/codegen/EmittedIL/Misc/AnonRecd.fs | 10 + .../codegen/EmittedIL/Misc/AnonRecd.il.bsl | 574 ++ .../Misc/ArgumentNamesInClosures01.fs | 43 + .../Misc/ArgumentNamesInClosures01.il.bsl | 177 + .../EmittedIL/Misc/CodeGenRenamings01.fs | 39 + .../EmittedIL/Misc/CodeGenRenamings01.il.bsl | 738 ++ .../Misc/CustomAttributeGenericParameter01.fs | 6 + .../CustomAttributeGenericParameter01.il.bsl | 92 + .../tests/codegen/EmittedIL/Misc/Decimal01.fs | 6 + .../codegen/EmittedIL/Misc/Decimal01.il.bsl | 94 + .../codegen/EmittedIL/Misc/EntryPoint01.fs | 8 + .../EmittedIL/Misc/EntryPoint01.il.bsl | 132 + .../EmittedIL/Misc/EqualsOnUnions01.fs | 7 + .../EmittedIL/Misc/EqualsOnUnions01.il.bsl | 944 ++ .../tests/codegen/EmittedIL/Misc/ForLoop01.fs | 6 + .../codegen/EmittedIL/Misc/ForLoop01.il.bsl | 118 + .../tests/codegen/EmittedIL/Misc/ForLoop02.fs | 7 + .../codegen/EmittedIL/Misc/ForLoop02.il.bsl | 101 + .../tests/codegen/EmittedIL/Misc/ForLoop03.fs | 14 + .../codegen/EmittedIL/Misc/ForLoop03.il.bsl | 197 + .../Misc/GeneralizationOnUnions01.fs | 11 + .../Misc/GeneralizationOnUnions01.il.bsl | 489 + .../Misc/GenericTypeStaticField01.il.bsl | 205 + .../codegen/EmittedIL/Misc/IfThenElse01.fs | 7 + .../EmittedIL/Misc/IfThenElse01.il.bsl | 220 + .../tests/codegen/EmittedIL/Misc/Int64.fs | 4 + .../tests/codegen/EmittedIL/Misc/Int64.il.bsl | 134 + .../codegen/EmittedIL/Misc/LetIfThenElse01.fs | 12 + .../EmittedIL/Misc/LetIfThenElse01.il.bsl | 199 + .../tests/codegen/EmittedIL/Misc/Lock01.fs | 20 + .../codegen/EmittedIL/Misc/Lock01.il.bsl | 179 + .../tests/codegen/EmittedIL/Misc/Marshal.fs | 6 + .../codegen/EmittedIL/Misc/Marshal.il.bsl | 104 + .../EmittedIL/Misc/MethodImplNoInline.fs | 11 + .../EmittedIL/Misc/MethodImplNoInline.il.bsl | 103 + .../EmittedIL/Misc/MethodImplNoInline02.fs | 11 + .../Misc/MethodImplNoInline02.il.bsl | 103 + .../EmittedIL/Misc/ModuleWithExpression01.fs | 9 + .../Misc/ModuleWithExpression01.il.bsl} | 114 +- .../EmittedIL/Misc/NoBoxingOnDispose01.fs | 7 + .../EmittedIL/Misc/NoBoxingOnDispose01.il.bsl | 117 + .../EmittedIL/Misc/NonEscapingArguments02.fs | 7 + .../Misc/NonEscapingArguments02.il.bsl | 105 + .../codegen/EmittedIL/Misc/PreserveSig.fs | 7 + .../codegen/EmittedIL/Misc/PreserveSig.il.bsl | 68 + .../codegen/EmittedIL/Misc/Seq_for_all01.fs | 7 + .../EmittedIL/Misc/Seq_for_all01.il.bsl | 162 + .../tests/codegen/EmittedIL/Misc/Structs01.fs | 14 + .../codegen/EmittedIL/Misc/Structs01.il.bsl | 327 + .../tests/codegen/EmittedIL/Misc/Structs02.fs | 18 + .../codegen/EmittedIL/Misc/Structs02.il.bsl | 381 + .../Misc/StructsAsArrayElements01.fs | 24 + .../Misc/StructsAsArrayElements01.il.bsl | 351 + .../Misc/TryWith_NoFilterBlocks01.fs | 7 + .../Misc/TryWith_NoFilterBlocks01.il.bsl | 114 + .../tests/codegen/EmittedIL/Misc/cas.cs | 190 + .../tests/codegen/EmittedIL/Misc/cas.fs | 18 + .../tests/codegen/EmittedIL/Misc/cas.il.bsl | 128 + .../tests/codegen/EmittedIL/Misc/env.lst | 54 + .../Misc/generictypestaticfield01.fs | 8 + .../tests/codegen/EmittedIL/Misc}/keep.lst | 0 .../Linq101Aggregates01.fs | 117 + .../Linq101Aggregates01.il.bsl | 8009 +++++++++++++++++ .../Linq101ElementOperators01.fs | 55 + .../Linq101ElementOperators01.il.bsl | 1685 ++++ .../Linq101Grouping01.fs | 58 + .../Linq101Grouping01.il.bsl | 1696 ++++ .../QueryExpressionStepping/Linq101Joins01.fs | 43 + .../Linq101Joins01.il.bsl | 1434 +++ .../Linq101Ordering01.fs | 64 + .../Linq101Ordering01.il.bsl | 2116 +++++ .../Linq101Partitioning01.fs | 54 + .../Linq101Partitioning01.il.bsl | 2119 +++++ .../Linq101Quantifiers01.fs | 43 + .../Linq101Quantifiers01.il.bsl | 1576 ++++ .../Linq101Select01.fs | 116 + .../Linq101Select01.il.bsl | 4294 +++++++++ .../Linq101SetOperators01.fs | 40 + .../Linq101SetOperators01.il.bsl | 1632 ++++ .../QueryExpressionStepping/Linq101Where01.fs | 55 + .../Linq101Where01.il.bsl | 1399 +++ .../QueryExpressionStepping/Utils.fs | 227 + .../EmittedIL/QueryExpressionStepping/env.lst | 19 + .../QueryExpressionStepping}/keep.lst | 0 .../SeqExpressionSteppingTest1.fs | 8 + .../SeqExpressionSteppingTest1.il.bsl | 252 + .../SeqExpressionSteppingTest2.fs | 10 + .../SeqExpressionSteppingTest2.il.bsl | 285 + .../SeqExpressionSteppingTest3.fs | 11 + .../SeqExpressionSteppingTest3.il.bsl | 289 + .../SeqExpressionSteppingTest4.fs | 13 + .../SeqExpressionSteppingTest4.il.bsl | 331 + .../SeqExpressionSteppingTest5.fs | 16 + .../SeqExpressionSteppingTest5.il.bsl | 460 + .../SeqExpressionSteppingTest6.fs | 15 + .../SeqExpressionSteppingTest6.il.bsl | 546 ++ .../SeqExpressionSteppingTest7.fs | 75 + .../SeqExpressionSteppingTest7.il.bsl | 931 ++ .../EmittedIL/SeqExpressionStepping/env.lst | 7 + .../EmittedIL/SeqExpressionStepping}/keep.lst | 0 .../SeqExpressionTailCalls01.fs | 4 + .../SeqExpressionTailCalls01.il.bsl | 272 + .../SeqExpressionTailCalls02.fs | 6 + .../SeqExpressionTailCalls02.il.bsl | 471 + .../EmittedIL/SeqExpressionTailCalls/env.lst | 2 + .../EmittedIL/SeqExpressionTailCalls/keep.lst | 1 + .../SerializableAttribute/ToplevelModule.fs | 22 + .../ToplevelModule.il.bsl | 1683 ++++ .../ToplevelNamespace.fs | 29 + .../ToplevelNamespace.il.bsl | 2450 +++++ .../EmittedIL/SerializableAttribute/env.lst | 5 + .../EmittedIL/SerializableAttribute/keep.lst | 1 + .../EmittedIL/StaticInit/LetBinding01.fs | 6 + .../EmittedIL/StaticInit/LetBinding01.il.bsl | 103 + .../StaticInit/StaticInit_Class01.fs | 8 + .../StaticInit/StaticInit_Class01.il.bsl | 147 + .../StaticInit/StaticInit_Module01.fs | 8 + .../StaticInit/StaticInit_Module01.il.bsl | 162 + .../StaticInit/StaticInit_Struct01.fs | 8 + .../StaticInit/StaticInit_Struct01.il.bsl | 341 + .../codegen/EmittedIL/StaticInit/env.lst | 7 + .../codegen/EmittedIL/StaticInit/keep.lst | 1 + .../SteppingMatch/SteppingMatch01.fs | 9 + .../SteppingMatch/SteppingMatch01.il.bsl | 101 + .../SteppingMatch/SteppingMatch02.fs | 9 + .../SteppingMatch/SteppingMatch02.il.bsl | 101 + .../SteppingMatch/SteppingMatch03.fs | 11 + .../SteppingMatch/SteppingMatch03.il.bsl | 116 + .../SteppingMatch/SteppingMatch04.fs | 11 + .../SteppingMatch/SteppingMatch04.il.bsl | 116 + .../SteppingMatch/SteppingMatch05.fs | 11 + .../SteppingMatch/SteppingMatch05.il.bsl | 116 + .../SteppingMatch/SteppingMatch06.fs | 10 + .../SteppingMatch/SteppingMatch06.il.bsl | 584 ++ .../SteppingMatch/SteppingMatch07.fs | 10 + .../SteppingMatch/SteppingMatch07.il.bsl | 584 ++ .../SteppingMatch/SteppingMatch08.fs | 10 + .../SteppingMatch/SteppingMatch08.il.bsl | 94 + .../SteppingMatch/SteppingMatch09.fs | 43 + .../SteppingMatch/SteppingMatch09.il.bsl | 338 + .../codegen/EmittedIL/SteppingMatch/env.lst | 14 + .../codegen/EmittedIL/SteppingMatch/keep.lst | 1 + .../EmittedIL/TestFunctions/TestFunction1.fs | 7 + .../TestFunctions/TestFunction1.il.bsl | 94 + .../EmittedIL/TestFunctions/TestFunction10.fs | 6 + .../TestFunctions/TestFunction10.il.bsl | 104 + .../EmittedIL/TestFunctions/TestFunction11.fs | 5 + .../EmittedIL/TestFunctions/TestFunction12.fs | 5 + .../EmittedIL/TestFunctions/TestFunction13.fs | 5 + .../TestFunctions/TestFunction13.il.bsl | 94 + .../EmittedIL/TestFunctions/TestFunction14.fs | 5 + .../TestFunctions/TestFunction14.il.bsl | 171 + .../EmittedIL/TestFunctions/TestFunction15.fs | 6 + .../EmittedIL/TestFunctions/TestFunction16.fs | 8 + .../TestFunctions/TestFunction16.il.bsl | 744 ++ .../EmittedIL/TestFunctions/TestFunction17.fs | 8 + .../TestFunctions/TestFunction17.il.bsl | 632 ++ .../EmittedIL/TestFunctions/TestFunction18.fs | 5 + .../EmittedIL/TestFunctions/TestFunction19.fs | 11 + .../TestFunctions/TestFunction19.il.bsl | 243 + .../EmittedIL/TestFunctions/TestFunction2.fs | 13 + .../EmittedIL/TestFunctions/TestFunction20.fs | 14 + .../TestFunctions/TestFunction20.il.bsl | 273 + .../EmittedIL/TestFunctions/TestFunction21.fs | 7 + .../TestFunctions/TestFunction21.il.bsl | 834 ++ .../TestFunctions/TestFunction23.il.bsl | 200 + .../TestFunctions/TestFunction24.il.bsl | 957 ++ .../EmittedIL/TestFunctions/TestFunction3.fs | 15 + .../EmittedIL/TestFunctions/TestFunction3b.fs | 15 + .../TestFunctions/TestFunction3b.il.bsl | 148 + .../EmittedIL/TestFunctions/TestFunction3c.fs | 15 + .../TestFunctions/TestFunction3c.il.bsl | 170 + .../EmittedIL/TestFunctions/TestFunction4.fs | 14 + .../EmittedIL/TestFunctions/TestFunction5.fs | 15 + .../EmittedIL/TestFunctions/TestFunction6.fs | 15 + .../EmittedIL/TestFunctions/TestFunction7.fs | 7 + .../EmittedIL/TestFunctions/TestFunction8.fs | 7 + .../EmittedIL/TestFunctions/TestFunction9.fs | 8 + .../EmittedIL/TestFunctions/TestFunction9b.fs | 9 + .../TestFunctions/TestFunction9b1.fs | 9 + .../TestFunctions/TestFunction9b2.fs | 9 + .../TestFunctions/TestFunction9b3.fs | 9 + .../TestFunctions/TestFunction9b4.fs | 14 + .../TestFunctions/TestFunction9b4.il.bsl | 128 + .../TestFunctions/Testfunction11.il.bsl | 98 + .../TestFunctions/Testfunction12.il.bsl | 86 + .../TestFunctions/Testfunction15.il.bsl | 146 + .../TestFunctions/Testfunction18.il.bsl | 83 + .../TestFunctions/Testfunction2.il.bsl | 115 + .../EmittedIL/TestFunctions/Testfunction22.fs | 3 + .../TestFunctions/Testfunction22.il.bsl | 79 + .../TestFunctions/Testfunction22b.fs | 3 + .../TestFunctions/Testfunction22b.il.bsl | 79 + .../TestFunctions/Testfunction22c.fs | 3 + .../TestFunctions/Testfunction22c.il.bsl | 79 + .../TestFunctions/Testfunction22d.fs | 3 + .../TestFunctions/Testfunction22d.il.bsl | 79 + .../TestFunctions/Testfunction22e.fs | 4 + .../TestFunctions/Testfunction22e.il.bsl | 87 + .../TestFunctions/Testfunction22f.fs | 5 + .../TestFunctions/Testfunction22f.il.bsl | 103 + .../TestFunctions/Testfunction22g.fs | 3 + .../TestFunctions/Testfunction22g.il.bsl | 93 + .../TestFunctions/Testfunction22h.fs | 6 + .../TestFunctions/Testfunction22h.il.bsl | 98 + .../EmittedIL/TestFunctions/Testfunction23.fs | 15 + .../EmittedIL/TestFunctions/Testfunction24.fs | 32 + .../TestFunctions/Testfunction3.il.bsl | 132 + .../TestFunctions/Testfunction4.il.bsl | 129 + .../TestFunctions/Testfunction5.il.bsl | 120 + .../TestFunctions/Testfunction6.il.bsl | 162 + .../TestFunctions/Testfunction7.il.bsl | 98 + .../TestFunctions/Testfunction8.il.bsl | 97 + .../TestFunctions/Testfunction9.il.bsl | 101 + .../TestFunctions/Testfunction9b.il.bsl | 276 + .../TestFunctions/Testfunction9b1.il.bsl | 276 + .../TestFunctions/Testfunction9b2.il.bsl | 276 + .../TestFunctions/Testfunction9b3.il.bsl | 276 + .../codegen/EmittedIL/TestFunctions/env.lst | 46 + .../codegen/EmittedIL/TestFunctions/keep.lst | 1 + .../codegen/EmittedIL/Tuples/OptionalArg01.fs | 46 + .../EmittedIL/Tuples/OptionalArg01.il.bsl | 308 + .../tests/codegen/EmittedIL/Tuples/Tuple01.fs | 3 + .../codegen/EmittedIL/Tuples/Tuple01.il.bsl | 74 + .../tests/codegen/EmittedIL/Tuples/Tuple02.fs | 3 + .../codegen/EmittedIL/Tuples/Tuple02.il.bsl | 83 + .../tests/codegen/EmittedIL/Tuples/Tuple03.fs | 3 + .../codegen/EmittedIL/Tuples/Tuple03.il.bsl | 85 + .../tests/codegen/EmittedIL/Tuples/Tuple04.fs | 3 + .../codegen/EmittedIL/Tuples/Tuple04.il.bsl | 87 + .../tests/codegen/EmittedIL/Tuples/Tuple05.fs | 3 + .../codegen/EmittedIL/Tuples/Tuple05.il.bsl | 89 + .../tests/codegen/EmittedIL/Tuples/Tuple06.fs | 3 + .../codegen/EmittedIL/Tuples/Tuple06.il.bsl | 91 + .../tests/codegen/EmittedIL/Tuples/Tuple07.fs | 3 + .../codegen/EmittedIL/Tuples/Tuple07.il.bsl | 93 + .../tests/codegen/EmittedIL/Tuples/Tuple08.fs | 3 + .../codegen/EmittedIL/Tuples/Tuple08.il.bsl | 96 + .../EmittedIL/Tuples/TupleElimination.fs | 23 + .../EmittedIL/Tuples/TupleElimination.il.bsl | 175 + .../codegen/EmittedIL/Tuples/TupleMonster.fs | 3 + .../EmittedIL/Tuples/TupleMonster.il.bsl | 134 + .../Tuples/ValueTupleAliasConstructor.fs | 3 + .../Tuples/ValueTupleAliasConstructor.il.bsl | 81 + .../ValueTupleAliasConstructor.il.bsl.net47 | 83 + .../tests/codegen/EmittedIL/Tuples/env.lst | 16 + .../tests/codegen/EmittedIL/Tuples/keep.lst | 1 + .../UpdateFSharpDataVersionAttribute.fsx | 14 + .../tests/codegen}/LazyNoInline01.il.bsl | 0 .../tests/codegen}/StringEncoding/.gitignore | 0 .../StringEncoding/NormalizationFormC.fsx | 0 .../StringEncoding/NormalizationFormD.fsx | 0 .../StringEncoding/NormalizationFormKC.fsx | 0 .../StringEncoding/NormalizationFormKD.fsx | 0 .../tests/codegen}/StringEncoding/dummy.fs | 0 .../tests/codegen}/StringEncoding/env.lst | 0 .../codegen}/Structure/AttributesOnLet01.fs | 0 .../codegen}/Structure/AttributesOnLet02.fs | 0 .../Structure/AttributesOnProperty.fs | 0 .../Structure/AttributesOnPropertyGetter.fs | 0 .../AttributesOnPropertyGetterSetter.fs | 0 .../Structure/AttributesOnPropertySetter.fs | 0 .../tests/codegen/Structure/BaseType.fs | 31 + .../tests/codegen}/Structure/ClassArity01.fs | 0 .../tests/codegen/Structure/CodeGenHelper.fs | 222 + .../codegen}/Structure/CodeGenHelper.fsproj | 0 .../tests/codegen}/Structure/Delegates01.fs | 0 .../tests/codegen/Structure/DerivedType.fs | 21 + .../codegen}/Structure/DiscUnionCodeGen1.fs | 0 .../tests/codegen}/Structure/DoNotInlineX.fs | 0 .../tests/codegen}/Structure/Equality01.fs | 0 .../tests/codegen}/Structure/Events01.fs | 0 .../tests/codegen}/Structure/Events02.fs | 0 .../tests/codegen}/Structure/Extensions01.fs | 0 .../tests/codegen}/Structure/Extensions02.fs | 0 .../codegen}/Structure/FunctionArity01.fs | 0 .../Structure/LocalTypeFunctionInIf.fs | 0 .../tests/codegen}/Structure/ModuleArity01.fs | 0 .../tests/codegen}/Structure/NativePtr01.fs | 0 .../codegen}/Structure/ObjectExpressions01.fs | 0 .../Structure/ReadOnlyStructFromLib.fs | 0 .../tests/codegen/Structure/ReadWriteLib.cs | 15 + .../Structure/UnionTypeWithSignature01.fs | 0 .../Structure/UnionTypeWithSignature01.fsi | 0 .../Structure/UnionTypeWithSignature02.fs | 5 +- .../Structure/UnionTypeWithSignature02.fsi | 0 .../codegen/Structure/UnitsOfMeasure01.fs | 54 + .../codegen/Structure/UnitsOfMeasure02.fs | 34 + .../codegen/Structure/UnitsOfMeasure03.fs | 55 + .../tests/codegen/Structure/dummy.fs | 1 + .../tests/codegen}/Structure/env.lst | 0 .../tests/codegen}/Structure/keep.lst | 0 .../FSharp.Compiler.Service.Tests.fsproj | 2 +- tests/FSharp.Test.Utilities/Compiler.fs | 487 +- tests/FSharp.Test.Utilities/CompilerAssert.fs | 444 +- .../DirectoryAttribute.fs | 102 +- .../FSharp.Test.Utilities.fsproj | 5 +- tests/FSharp.Test.Utilities/ILChecker.fs | 176 +- tests/FSharp.Test.Utilities/Peverifier.fs | 81 + tests/FSharp.Test.Utilities/ScriptHelpers.fs | 3 +- tests/FSharp.Test.Utilities/TestFramework.fs | 7 + tests/FSharp.Test.Utilities/Utilities.fs | 82 - .../testenv/src => }/PEVerify/CLRHelpers.cs | 0 .../testenv/src => }/PEVerify/MonoHelpers.cs | 0 tests/PEVerify/PEVerify.csproj | 13 + .../testenv/src => }/PEVerify/Program.cs | 0 .../CodeGen/EmittedIL/BooleanLogic.fs | 12 +- .../CodeGen/EmittedIL/ByrefTailcalls.fs | 6 +- .../Compiler/CodeGen/EmittedIL/CeEdiThrow.fs | 6 +- .../ComputationExpressionOptimizations.fs | 6 +- .../EmittedIL/ComputedListExpressions.fs | 37 +- .../Compiler/CodeGen/EmittedIL/DebugScopes.fs | 24 +- .../EmittedIL/DelegateAndFuncOptimizations.fs | 43 +- .../Compiler/CodeGen/EmittedIL/Mutation.fs | 35 +- .../CodeGen/EmittedIL/StaticLinkTests.fs | 24 +- .../CodeGen/EmittedIL/StaticMember.fs | 42 +- .../CodeGen/EmittedIL/TaskGeneratedCode.fs | 80 +- .../BasicGrammarElements/BasicConstants.fs | 23 +- .../DataExpressions/ComputationExpressions.fs | 5 +- tests/fsharp/Compiler/Language/ByrefTests.fs | 2 +- .../Language/CompilerDirectiveTests.fs | 4 +- .../Language/CustomCollectionTests.fs | 32 +- .../Language/DefaultInterfaceMemberTests.fs | 156 +- .../Compiler/Language/HatDesugaringTests.fs | 10 +- .../InitOnlyPropertyConsumptionTests.fs | 2 +- .../Compiler/Language/InterfaceTests.fs | 13 +- .../Language/OpenTypeDeclarationTests.fs | 22 +- .../Compiler/Language/OptionalInteropTests.fs | 2 +- .../Language/SpanOptimizationTests.fs | 35 +- .../Language/StringConcatOptimizationTests.fs | 5 +- .../Compiler/Language/StringInterpolation.fs | 12 +- .../Language/StructActivePatternTests.fs | 10 +- .../AsyncExpressionSteppingTest2.fs | 11 - .../EmittedIL/AsyncExpressionStepping/env.lst | 9 - .../EmittedIL/AttributeTargets/Default.il.bsl | 128 - .../AttributeTargets/Property.il.bsl | 127 - .../EmittedIL/AttributeTargets/env.lst | 4 - .../CCtorDUWithMember/CCtorDUWithMember01.fs | 3 - .../CCtorDUWithMember/CCtorDUWithMember02.fs | 2 - .../CCtorDUWithMember/CCtorDUWithMember03.fs | 2 - .../EmittedIL/CCtorDUWithMember/env.lst | 5 - .../EmittedIL/CompiledNameAttribute/env.lst | 6 - .../EmittedIL/ComputationExpressions/env.lst | 13 - ...tBoxStruct_ArrayOfArray_FSInterface.il.bsl | 130 - .../CodeGen/EmittedIL/DoNotBoxStruct/env.lst | 24 - .../Operators/comparison_decimal01.fs | 11 - .../CodeGen/EmittedIL/Operators/env.lst | 2 - .../testenv/src/PEVerify/PEVerify.csproj | 10 - 651 files changed, 70026 insertions(+), 2900 deletions(-) rename tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/{ => ExplicitObjectConstructors}/ExplicitObjectConstructors.fs (77%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ExplicitObjectConstructors/WithAttribute01.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ExplicitObjectConstructors/WithAttribute02.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ExplicitObjectConstructors/new_while_01.fs (100%) rename tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/{ => ImplicitObjectConstructors}/ImplicitObjectConstructors.fs (83%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ImplicitObjectConstructors/WithAttribute.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ValueRestriction/E_NotMemberOrFunction01.fsx (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ValueRestriction/MemberOrFunction01.fsx (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ValueRestriction/MemberOrFunction01Gen.fsx (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ValueRestriction/MemberOrFunction02.fsx (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ValueRestriction/MemberOrFunction02Gen.fsx (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ValueRestriction/TypeArgs01.fsx (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ValueRestriction/TypeFunction01.fsx (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/ClassTypes/ValueRestriction/TypeInferenceVariable01.fsx (100%) rename tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/{ => ValueRestriction}/ValueRestriction.fs (75%) rename tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/{ => BasicApplication}/BasicApplication.fs (78%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType01.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType03.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/Expressions/ApplicationExpressions/BasicApplication/PostfixType02.fs (100%) rename tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/{ => PatternMatching}/PatternMatching.fs (69%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample01.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample02.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample03.fs (97%) rename tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/{ => SequenceIteration}/SequenceIteration.fs (78%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/W_IncompleteMatchFor01.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/Expressions => Conformance/Expressions/ControlFlowExpressions}/Type-relatedExpressions/E_rigidtypeannotation02.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/Expressions => Conformance/Expressions/ControlFlowExpressions}/Type-relatedExpressions/E_rigidtypeannotation02b.fs (100%) rename tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/{ => ControlFlowExpressions/Type-relatedExpressions}/Type-relatedExpressions.fs (67%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/Expressions => Conformance/Expressions/ControlFlowExpressions}/Type-relatedExpressions/rigidtypeannotation01.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/Expressions => Conformance/Expressions/ControlFlowExpressions}/Type-relatedExpressions/staticcoercion01.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/Expressions => Conformance/Expressions/ControlFlowExpressions}/Type-relatedExpressions/staticcoercion01b.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_RecursiveInline.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_TypeDeclaration01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_TypeDeclaration02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/InfiniteRecursiveExplicitConstructor.fs rename tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/{ => RecursiveSafetyAnalysis}/RecursiveSafetyAnalysis.fs (66%) rename tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/{ => HashLight}/HashLight.fs (66%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/LexicalFiltering/HashLight/IndentationWithComputationExpression01.fs (100%) rename tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/{ => HighPrecedenceApplication}/HighPrecedenceApplication.fs (70%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/LexicalFiltering/HighPrecedenceApplication/RangeOperator01.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/LexicalFiltering/Basic => Conformance/LexicalFiltering}/OffsideExceptions/InfixTokenPlusOne.fs (97%) rename tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/{Basic => OffsideExceptions}/OffsideExceptions.fs (99%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/LexicalFiltering/Basic => Conformance/LexicalFiltering}/OffsideExceptions/RelaxWhitespace2.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/LexicalFiltering/Basic/OffsideExceptions/RelaxWhitespace2.fs.bsl => Conformance/LexicalFiltering/OffsideExceptions/RelaxWhitespace2.fs.err.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/{ => CheckingSyntacticTypes}/CheckingSyntacticTypes.fs (71%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_CannotInlineVirtualMethod2.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_CannotInlineVirtualMethods1.fs (100%) rename tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/{ => LogicalPropertiesOfTypes}/LogicalPropertiesOfTypes.fs (67%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests => }/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes/TypeWithNullLiteral_NetRef.fsx (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/typecheck/constructors => ConstraintSolver}/neg_invalid_constructor.fs (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/typecheck/constructors/neg_invalid_constructor.fs.bsl => ConstraintSolver/neg_invalid_constructor.fs.err.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.il.debug.bsl rename tests/{fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.il.release.bsl} (89%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs rename tests/{fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.il.debug.bsl} (88%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.il.release.bsl rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs (72%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.il.debug.bsl rename tests/{fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.il.release.bsl} (78%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs (66%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.il.debug.bsl rename tests/{fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.il.release.bsl} (86%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.il.debug.bsl rename tests/{fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.il.release.bsl} (94%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs (71%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.il.debug.bsl rename tests/{fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.il.release.bsl} (89%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/AttributeTargets/Default.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.il.release.bsl rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/AttributeTargets/Field.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.il.release.bsl rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/AttributeTargets/Property.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.il.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs (100%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.il.bsl} (79%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs (100%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.il.bsl} (72%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs (100%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.il.bsl} (59%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.fs (85%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs (100%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.il.bsl} (78%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs (93%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs.il.debug.bsl} (69%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs.il.release.bsl rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs (94%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs.il.debug.bsl} (73%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs.il.release.bsl rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs (93%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs.il.debug.bsl} (70%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs.il.release.bsl rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs (98%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.net472.debug.bsl} (75%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.net472.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.netcore.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.netcore.release.bsl rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/CompiledNameAttribute/CompiledNameAttribute05.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/ComputationExpressions/ComputationExpr01.fs (93%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr01.fs.il.bsl} (76%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/ComputationExpressions/ComputationExpr02.fs (95%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr02.fs.il.bsl} (78%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/ComputationExpressions/ComputationExpr03.fs (97%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr03.fs.il.bsl} (79%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/ComputationExpressions/ComputationExpr04.fs (95%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr04.fs.il.bsl} (80%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/ComputationExpressions/ComputationExpr05.fs (96%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr05.fs.il.bsl} (78%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/ComputationExpressions/ComputationExpr06.fs (74%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr06.fs.il.bsl} (79%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/ComputationExpressions/ComputationExpr07.fs (67%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs.il.bsl} (75%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/ComputationExpressions/ComputationExprLibrary.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs (94%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs.il.bsl} (70%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs (100%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs.il.bsl} (73%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs (96%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs.il.bsl rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs (94%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs.il.bsl} (70%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs (95%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs.il.bsl} (72%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs (96%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs.il.bsl} (71%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs (94%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs.il.bsl} (71%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs (95%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs.il.bsl} (72%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs (96%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs.il.bsl} (71%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs (94%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs.il.bsl} (69%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs (95%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs.il.bsl} (71%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs (96%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs.il.bsl} (70%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests}/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs (93%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs.il.bsl} (69%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormC.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormD.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormKC.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormKD.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnLet01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnLet02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnProperty.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertyGetter.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertyGetterSetter.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertySetter.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/EmittedIL}/Structure/BaseType.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ClassArity01.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/EmittedIL}/Structure/CodeGenHelper.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Delegates01.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/EmittedIL}/Structure/DerivedType.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/DiscUnionCodeGen1.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/DoNotInlineX.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Equality01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Events01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Events02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Extensions01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Extensions02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FunctionArity01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/LocalTypeFunctionInIf.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ModuleArity01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/NativePtr01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ObjectExpressions01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ReadOnlyStructFromLib.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/EmittedIL}/Structure/ReadWriteLib.cs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature01.fsi create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature02.fsi rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/EmittedIL}/Structure/UnitsOfMeasure01.fs (92%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/EmittedIL}/Structure/UnitsOfMeasure02.fs (85%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/EmittedIL}/Structure/UnitsOfMeasure03.fs (94%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/EmittedIL}/Structure/dummy.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs rename tests/FSharp.Compiler.ComponentTests/{resources/tests/codegen => EmittedIL}/operators/decimal_comparison.fs (100%) rename tests/{fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl => FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.net472.debug.bsl} (89%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/codegen/operators/decimal_comparison.fs.il => EmittedIL/operators/decimal_comparison.fs.il.net472.release.bsl} (76%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.netcore.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.netcore.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/Literals.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Misc.fs rename tests/FSharp.Compiler.ComponentTests/{EmittedIL => }/Operators.fs (93%) create mode 100644 tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/StringFormatAndInterpolation.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/TailCalls.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/TupleElimination.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/CompareIL.cmd create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter02.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter03.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter03.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter04.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter04.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/env.lst rename tests/{fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping => FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators}/keep.lst (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison02.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison03.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison03.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison04.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison04.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison05.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison05.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/env.lst rename tests/{fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets => FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison}/keep.lst (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/env.lst rename tests/{fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember => FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping}/keep.lst (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.AggressiveInlining.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.AggressiveInlining.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.ForwardRef.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.ForwardRef.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.InternalCall.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.InternalCall.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoInlining.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoInlining.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoOptimization.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoOptimization.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.PreserveSig.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.PreserveSig.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Synchronized.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Synchronized.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Unmanaged.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Unmanaged.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/env.lst rename tests/{fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute => FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute}/keep.lst (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AbstractClass.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AbstractClass.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AnonRecd.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AnonRecd.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ArgumentNamesInClosures01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CodeGenRenamings01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CodeGenRenamings01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CustomAttributeGenericParameter01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CustomAttributeGenericParameter01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Decimal01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Decimal01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EntryPoint01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EntryPoint01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EqualsOnUnions01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EqualsOnUnions01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop02.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop03.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop03.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GeneralizationOnUnions01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/IfThenElse01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/IfThenElse01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Int64.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Int64.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/LetIfThenElse01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/LetIfThenElse01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Lock01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Lock01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Marshal.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Marshal.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline02.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ModuleWithExpression01.fs rename tests/{fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl => FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ModuleWithExpression01.il.bsl} (50%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NoBoxingOnDispose01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NoBoxingOnDispose01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NonEscapingArguments02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NonEscapingArguments02.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/PreserveSig.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/PreserveSig.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Seq_for_all01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Seq_for_all01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs02.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/StructsAsArrayElements01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.cs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/env.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/generictypestaticfield01.fs rename tests/{fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions => FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc}/keep.lst (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Select01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Where01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Utils.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/env.lst rename tests/{fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct => FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping}/keep.lst (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/env.lst rename tests/{fsharpqa/Source/CodeGen/EmittedIL/Operators => FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping}/keep.lst (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/env.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/keep.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelModule.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelNamespace.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/env.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/keep.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/LetBinding01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/LetBinding01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Class01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Class01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Module01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Module01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Struct01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/env.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/keep.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch02.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch03.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch03.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch04.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch04.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch05.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch05.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch06.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch07.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch08.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch08.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch09.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/env.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/keep.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction1.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction1.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction10.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction10.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction11.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction12.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction13.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction13.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction14.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction14.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction15.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction16.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction16.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction17.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction17.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction18.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction19.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction19.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction2.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction20.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction20.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction21.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction21.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction23.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction24.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3b.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3b.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3c.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3c.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction4.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction5.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction6.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction7.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction8.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b1.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b2.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b3.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b4.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction11.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction12.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction15.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction18.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction2.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22b.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22b.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22c.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22c.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22d.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22d.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22e.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22e.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22f.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22f.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22g.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22g.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22h.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22h.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction23.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction24.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction3.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction4.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction5.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction6.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction7.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction8.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/env.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/keep.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/OptionalArg01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/OptionalArg01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple01.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple02.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple03.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple03.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple04.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple04.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple05.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple05.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple06.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple06.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple07.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple07.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple08.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple08.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleElimination.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleElimination.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleMonster.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleMonster.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl.net47 create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/env.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/keep.lst create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/UpdateFSharpDataVersionAttribute.fsx rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/LazyNoInline01.il.bsl (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/StringEncoding/.gitignore (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/StringEncoding/NormalizationFormC.fsx (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/StringEncoding/NormalizationFormD.fsx (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/StringEncoding/NormalizationFormKC.fsx (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/StringEncoding/NormalizationFormKD.fsx (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/StringEncoding/dummy.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/StringEncoding/env.lst (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/AttributesOnLet01.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/AttributesOnLet02.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/AttributesOnProperty.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/AttributesOnPropertyGetter.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/AttributesOnPropertyGetterSetter.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/AttributesOnPropertySetter.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/BaseType.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/ClassArity01.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/CodeGenHelper.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/CodeGenHelper.fsproj (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/Delegates01.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/DerivedType.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/DiscUnionCodeGen1.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/DoNotInlineX.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/Equality01.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/Events01.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/Events02.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/Extensions01.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/Extensions02.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/FunctionArity01.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/LocalTypeFunctionInIf.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/ModuleArity01.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/NativePtr01.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/ObjectExpressions01.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/ReadOnlyStructFromLib.fs (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ReadWriteLib.cs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/UnionTypeWithSignature01.fs (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/UnionTypeWithSignature01.fsi (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/UnionTypeWithSignature02.fs (91%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/UnionTypeWithSignature02.fsi (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure03.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/dummy.fs rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/env.lst (100%) rename tests/{fsharpqa/Source/CodeGen => FSharp.Compiler.ComponentTests/resources/tests/codegen}/Structure/keep.lst (100%) create mode 100644 tests/FSharp.Test.Utilities/Peverifier.fs rename tests/{fsharpqa/testenv/src => }/PEVerify/CLRHelpers.cs (100%) rename tests/{fsharpqa/testenv/src => }/PEVerify/MonoHelpers.cs (100%) create mode 100644 tests/PEVerify/PEVerify.csproj rename tests/{fsharpqa/testenv/src => }/PEVerify/Program.cs (100%) delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/env.lst delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/env.lst delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.fs delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.fs delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.fs delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/env.lst delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/env.lst delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/env.lst delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.il.bsl delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/env.lst delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.fs delete mode 100644 tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/env.lst delete mode 100644 tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj diff --git a/FSharp.sln b/FSharp.sln index 6dc22e3c486..fe1130895fc 100644 --- a/FSharp.sln +++ b/FSharp.sln @@ -49,14 +49,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private.Scr EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.ComponentTests", "tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj", "{FAC5A3BF-C0D6-437A-868A-E962AA00B418}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fsharpqa", "fsharpqa", "{292C4F92-A313-4CAF-9552-731F39C6C21F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testenv", "testenv", "{FF76050A-415A-4FB4-A0E5-13CBF38D83E0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{07482B5E-4980-4285-B732-820F15870284}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PEVerify", "tests\fsharpqa\testenv\src\PEVerify\PEVerify.csproj", "{25568CD2-E654-4C8F-BE5B-59BABFC5BD20}" -EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service.Tests", "tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj", "{DDFD06DC-D7F2-417F-9177-107764EEBCD8}" EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service", "src\fsharp\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj", "{9B4CF83C-C215-4EA0-9F8B-B5A77090F634}" @@ -110,6 +102,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fcs", "fcs", "{B86EBFF1-E03 EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fscAnyCpu", "src\fsharp\fscAnyCpu\fscAnyCpu.fsproj", "{8ACA60C2-7266-425A-B641-A2946396B7D1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PEVerify", "tests\PEVerify\PEVerify.csproj", "{358821CB-4D63-4157-9EFF-65C06EBD4E36}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -300,18 +294,6 @@ Global {FAC5A3BF-C0D6-437A-868A-E962AA00B418}.Release|Any CPU.Build.0 = Release|Any CPU {FAC5A3BF-C0D6-437A-868A-E962AA00B418}.Release|x86.ActiveCfg = Release|Any CPU {FAC5A3BF-C0D6-437A-868A-E962AA00B418}.Release|x86.Build.0 = Release|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Debug|Any CPU.Build.0 = Debug|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Debug|x86.ActiveCfg = Debug|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Debug|x86.Build.0 = Debug|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Proto|Any CPU.ActiveCfg = Debug|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Proto|Any CPU.Build.0 = Debug|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Proto|x86.ActiveCfg = Debug|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Proto|x86.Build.0 = Debug|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Release|Any CPU.ActiveCfg = Release|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Release|Any CPU.Build.0 = Release|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Release|x86.ActiveCfg = Release|Any CPU - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20}.Release|x86.Build.0 = Release|Any CPU {DDFD06DC-D7F2-417F-9177-107764EEBCD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DDFD06DC-D7F2-417F-9177-107764EEBCD8}.Debug|Any CPU.Build.0 = Debug|Any CPU {DDFD06DC-D7F2-417F-9177-107764EEBCD8}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -420,6 +402,18 @@ Global {8ACA60C2-7266-425A-B641-A2946396B7D1}.Release|Any CPU.Build.0 = Release|Any CPU {8ACA60C2-7266-425A-B641-A2946396B7D1}.Release|x86.ActiveCfg = Release|Any CPU {8ACA60C2-7266-425A-B641-A2946396B7D1}.Release|x86.Build.0 = Release|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Debug|Any CPU.Build.0 = Debug|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Debug|x86.ActiveCfg = Debug|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Debug|x86.Build.0 = Debug|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Proto|Any CPU.Build.0 = Debug|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Proto|x86.ActiveCfg = Debug|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Proto|x86.Build.0 = Debug|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Release|Any CPU.ActiveCfg = Release|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Release|Any CPU.Build.0 = Release|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Release|x86.ActiveCfg = Release|Any CPU + {358821CB-4D63-4157-9EFF-65C06EBD4E36}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -440,10 +434,6 @@ Global {8B7BF62E-7D8C-4928-BE40-4E392A9EE851} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77} {4FEDF286-0252-4EBC-9E75-879CCA3B85DC} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} {FAC5A3BF-C0D6-437A-868A-E962AA00B418} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} - {292C4F92-A313-4CAF-9552-731F39C6C21F} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} - {FF76050A-415A-4FB4-A0E5-13CBF38D83E0} = {292C4F92-A313-4CAF-9552-731F39C6C21F} - {07482B5E-4980-4285-B732-820F15870284} = {FF76050A-415A-4FB4-A0E5-13CBF38D83E0} - {25568CD2-E654-4C8F-BE5B-59BABFC5BD20} = {07482B5E-4980-4285-B732-820F15870284} {DDFD06DC-D7F2-417F-9177-107764EEBCD8} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} {9B4CF83C-C215-4EA0-9F8B-B5A77090F634} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77} {348DCC13-DD3E-4214-B040-5A74E8C6B782} = {CE70D631-C5DC-417E-9CDA-B16097BEF1AC} diff --git a/VisualFSharp.sln b/VisualFSharp.sln index a7fb16d0952..ed3c7e3b80b 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -124,8 +124,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ResourceFile", "vsintegrati EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build.UnitTests", "tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj", "{400FAB03-786E-40CC-85A8-04B0C2869B14}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PEVerify", "tests\fsharpqa\testenv\src\PEVerify\PEVerify.csproj", "{B0689A4E-07D8-494D-A0C8-791CB1D74E54}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.PatternMatcher", "vsintegration\src\FSharp.PatternMatcher\FSharp.PatternMatcher.csproj", "{18227628-DF90-4C47-AF3D-CC72D2EDD986}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Setup", "Setup", "{6235B3AF-774D-4EA1-8F37-789E767F6368}" @@ -182,6 +180,8 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fscAnyCpu", "src\fsharp\fsc EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "shims", "vsintegration\shims\shims.csproj", "{B1E30F2C-894F-47A9-9C8A-3324831E7D26}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PEVerify", "tests\PEVerify\PEVerify.csproj", "{035CF639-9704-44C0-96AA-BCB132AA881A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -744,18 +744,6 @@ Global {400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|Any CPU.Build.0 = Release|Any CPU {400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|x86.ActiveCfg = Release|Any CPU {400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|x86.Build.0 = Release|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|x86.ActiveCfg = Debug|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|x86.Build.0 = Debug|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|Any CPU.ActiveCfg = Release|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|Any CPU.Build.0 = Release|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|x86.ActiveCfg = Release|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|x86.Build.0 = Release|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|Any CPU.Build.0 = Release|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|x86.ActiveCfg = Release|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|x86.Build.0 = Release|Any CPU {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Debug|Any CPU.Build.0 = Debug|Any CPU {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -1020,6 +1008,18 @@ Global {B1E30F2C-894F-47A9-9C8A-3324831E7D26}.Release|Any CPU.Build.0 = Release|Any CPU {B1E30F2C-894F-47A9-9C8A-3324831E7D26}.Release|x86.ActiveCfg = Release|Any CPU {B1E30F2C-894F-47A9-9C8A-3324831E7D26}.Release|x86.Build.0 = Release|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Debug|x86.ActiveCfg = Debug|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Debug|x86.Build.0 = Debug|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Proto|Any CPU.Build.0 = Debug|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Proto|x86.ActiveCfg = Debug|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Proto|x86.Build.0 = Debug|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Release|Any CPU.Build.0 = Release|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Release|x86.ActiveCfg = Release|Any CPU + {035CF639-9704-44C0-96AA-BCB132AA881A}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1076,7 +1076,6 @@ Global {FF76BD3C-5E0A-4752-B6C3-044F6E15719B} = {35636A82-401A-4C3A-B2AB-EB7DC5E9C268} {0385564F-07B4-4264-AB8A-17C393E9140C} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA} {400FAB03-786E-40CC-85A8-04B0C2869B14} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} - {B0689A4E-07D8-494D-A0C8-791CB1D74E54} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} {18227628-DF90-4C47-AF3D-CC72D2EDD986} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A} = {6235B3AF-774D-4EA1-8F37-789E767F6368} {6BCFED7A-3F67-4180-B307-C7D69D191D8C} = {6235B3AF-774D-4EA1-8F37-789E767F6368} @@ -1101,6 +1100,7 @@ Global {47112E07-9FF1-43E7-8021-F2A21D6A19A0} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B} {52DCA91F-3843-43E3-8FE1-FB2B66658CBD} = {B8DDA694-7939-42E3-95E5-265C2217C142} {B1E30F2C-894F-47A9-9C8A-3324831E7D26} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} + {035CF639-9704-44C0-96AA-BCB132AA881A} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {48EDBBBE-C8EE-4E3C-8B19-97184A487B37} diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors/ExplicitObjectConstructors.fs similarity index 77% rename from tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors/ExplicitObjectConstructors.fs index cb6c36149ca..61719f85b5c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors/ExplicitObjectConstructors.fs @@ -9,7 +9,7 @@ open FSharp.Test.Compiler module ExplicitObjectConstructors = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ExplicitObjectConstructors) - [] + [] let ``ExplicitObjectConstructors - new_while_01_fs - `` compilation = compilation |> asFsx @@ -19,7 +19,7 @@ module ExplicitObjectConstructors = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ExplicitObjectConstructors) //Message2 - [] + [] let ``ExplicitObjectConstructors - WithAttribute01_fs - -a --test:ErrorRanges`` compilation = compilation |> asFs @@ -32,7 +32,7 @@ module ExplicitObjectConstructors = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ExplicitObjectConstructors) //Message1 - [] + [] let ``ExplicitObjectConstructors - WithAttribute02_fs - -a --test:ErrorRanges`` compilation = compilation |> asFs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ExplicitObjectConstructors/WithAttribute01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors/WithAttribute01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ExplicitObjectConstructors/WithAttribute01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors/WithAttribute01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ExplicitObjectConstructors/WithAttribute02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors/WithAttribute02.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ExplicitObjectConstructors/WithAttribute02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors/WithAttribute02.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ExplicitObjectConstructors/new_while_01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors/new_while_01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ExplicitObjectConstructors/new_while_01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ExplicitObjectConstructors/new_while_01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ImplicitObjectConstructors.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ImplicitObjectConstructors/ImplicitObjectConstructors.fs similarity index 83% rename from tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ImplicitObjectConstructors.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ImplicitObjectConstructors/ImplicitObjectConstructors.fs index 8db27d40df7..3fa422688a7 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ImplicitObjectConstructors.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ImplicitObjectConstructors/ImplicitObjectConstructors.fs @@ -10,7 +10,7 @@ module ImplicitObjectConstructors = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ImplicitObjectConstructors) //Message1 - [] + [] let ``ImplicitObjectConstructors - WithAttribute.fs - -a --test:ErrorRanges`` compilation = compilation |> asFs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ImplicitObjectConstructors/WithAttribute.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ImplicitObjectConstructors/WithAttribute.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ImplicitObjectConstructors/WithAttribute.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ImplicitObjectConstructors/WithAttribute.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/E_NotMemberOrFunction01.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/E_NotMemberOrFunction01.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/E_NotMemberOrFunction01.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/E_NotMemberOrFunction01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction01.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction01.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction01.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction01Gen.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction01Gen.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction01Gen.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction01Gen.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction02.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction02.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction02.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction02.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction02Gen.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction02Gen.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction02Gen.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/MemberOrFunction02Gen.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/TypeArgs01.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/TypeArgs01.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/TypeArgs01.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/TypeArgs01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/TypeFunction01.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/TypeFunction01.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/TypeFunction01.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/TypeFunction01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/TypeInferenceVariable01.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/TypeInferenceVariable01.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/ClassTypes/ValueRestriction/TypeInferenceVariable01.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/TypeInferenceVariable01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/ValueRestriction.fs similarity index 75% rename from tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/ValueRestriction.fs index 6c3502169f7..730d86a7815 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/ClassTypes/ValueRestriction/ValueRestriction.fs @@ -10,7 +10,7 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``ValueRestriction - TypeArgs01.fsx - -a --test:ErrorRanges --warnaserror+`` compilation = compilation |> asFsx @@ -21,7 +21,7 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``ValueRestriction - MemberOrFunction01.fsx - -a --test:ErrorRanges --warnaserror+`` compilation = compilation |> asFsx @@ -32,7 +32,7 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``ValueRestriction - MemberOrFunction01Gen.fsx - -a --test:ErrorRanges --warnaserror+`` compilation = compilation |> asFsx @@ -43,7 +43,7 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``ValueRestriction - MemberOrFunction02.fsx - -a --test:ErrorRanges --warnaserror+`` compilation = compilation |> asFsx @@ -54,7 +54,7 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``ValueRestriction - MemberOrFunction02Gen.fsx - -a --test:ErrorRanges --warnaserror+`` compilation = compilation |> asFsx @@ -65,7 +65,7 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``ValueRestriction - TypeFunction01.fsx - -a --test:ErrorRanges --warnaserror+`` compilation = compilation |> asFsx diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs similarity index 78% rename from tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs index 2903b3c2812..9f836a88b70 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs @@ -10,7 +10,7 @@ module BasicApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) // - [] + [] let ``BasicApplication - PostfixType02.fs - --test:ErrorRanges`` compilation = compilation |> asFsx @@ -21,7 +21,7 @@ module BasicApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) //Unexpected identifier in expression$ - [] + [] let ``BasicApplication - E_PostfixType01.fs - --test:ErrorRanges`` compilation = compilation |> asFsx @@ -34,7 +34,7 @@ module BasicApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) //Unexpected identifier in member definition$ - [] + [] let ``BasicApplication - E_PostfixType03.fs - --test:ErrorRanges`` compilation = compilation |> asFsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType03.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType03.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ApplicationExpressions/BasicApplication/PostfixType02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/PostfixType02.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ApplicationExpressions/BasicApplication/PostfixType02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/PostfixType02.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs similarity index 69% rename from tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs index 894a3059113..1cf2c41b61c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs @@ -10,8 +10,8 @@ module PatternMatching = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/PatternMatching) //'Some \(\(_,true\)\)' - [] - let ``PatternMatching - W_PatternMatchingCounterExample01.fs - --test:ErrorRanges`` compilation = + [] + let ``W_PatternMatchingCounterExample01_fs`` compilation = compilation |> asFsx |> withOptions ["--test:ErrorRanges"] @@ -23,8 +23,8 @@ module PatternMatching = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/PatternMatching) //Incomplete pattern matches on this expression\. For example, the value '\[_;true\]' may indicate a case not covered by the pattern\(s\) - [] - let ``PatternMatching - W_PatternMatchingCounterExample02.fs - --test:ErrorRanges`` compilation = + [] + let ``W_PatternMatchingCounterExample02_fs`` compilation = compilation |> asFsx |> withOptions ["--test:ErrorRanges"] @@ -36,8 +36,8 @@ module PatternMatching = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/PatternMatching) //Incomplete pattern matches on this expression - [] - let ``PatternMatching - W_PatternMatchingCounterExample03.fs - --test:ErrorRanges`` compilation = + [] + let ``W_PatternMatchingCounterExample03_fs`` compilation = compilation |> asFsx |> withOptions ["--test:ErrorRanges"] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample02.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample02.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample03.fs similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample03.fs index 3ca9ac29ff1..07bda7e9260 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample03.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/W_PatternMatchingCounterExample03.fs @@ -7,5 +7,4 @@ let h = function | [|_|] -> 1 | [|_;_|] -> 3 -exit 0 - +() diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs similarity index 78% rename from tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs index 61685bdd8ba..9b28821e284 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs @@ -10,8 +10,8 @@ module SequenceIteration = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/SequenceIteration) //Incomplete pattern matches on this expression\. For example, the value 'None' may indicate a case not covered by the pattern\(s\)\.$ - [] - let ``SequenceIteration - W_IncompleteMatchFor01.fs - --test:ErrorRanges`` compilation = + [] + let ``W_IncompleteMatchFor01_fs`` compilation = compilation |> asFsx |> withOptions ["--test:ErrorRanges"] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/W_IncompleteMatchFor01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/W_IncompleteMatchFor01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/W_IncompleteMatchFor01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/W_IncompleteMatchFor01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/Type-relatedExpressions/E_rigidtypeannotation02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/E_rigidtypeannotation02.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/Type-relatedExpressions/E_rigidtypeannotation02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/E_rigidtypeannotation02.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/Type-relatedExpressions/E_rigidtypeannotation02b.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/E_rigidtypeannotation02b.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/Type-relatedExpressions/E_rigidtypeannotation02b.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/E_rigidtypeannotation02b.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/Type-relatedExpressions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs similarity index 67% rename from tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/Type-relatedExpressions.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs index 831885f9d06..47ba70913d1 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/Type-relatedExpressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs @@ -9,8 +9,8 @@ open FSharp.Test.Compiler module TyperelatedExpressions = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] - let ``TyperelatedExpressions - rigidtypeannotation01.fs - `` compilation = + [] + let ``rigidtypeannotation01_fs`` compilation = compilation |> asFsx |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/Type-relatedExpressions/rigidtypeannotation01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/rigidtypeannotation01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/Type-relatedExpressions/rigidtypeannotation01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/rigidtypeannotation01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/Type-relatedExpressions/staticcoercion01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/staticcoercion01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/Type-relatedExpressions/staticcoercion01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/staticcoercion01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/Type-relatedExpressions/staticcoercion01b.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/staticcoercion01b.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Expressions/Type-relatedExpressions/staticcoercion01b.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/staticcoercion01b.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_RecursiveInline.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_RecursiveInline.fs new file mode 100644 index 00000000000..947bfc49e0a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_RecursiveInline.fs @@ -0,0 +1,9 @@ +// #Regression #Conformance #TypeInference #Recursion +// Regression test for FSharp1.0:3475 - ICE on rec inline function +//The value 'E_RecursiveInline.test' was marked inline but was not bound in the optimization environment +//The value 'test' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible$ +//A value marked as 'inline' has an unexpected value +//Failed to inline the value 'test' marked 'inline', perhaps because a recursive value was marked 'inline' +let rec inline test x = + if x then test false + else 0 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_TypeDeclaration01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_TypeDeclaration01.fs new file mode 100644 index 00000000000..4572923e75e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_TypeDeclaration01.fs @@ -0,0 +1,16 @@ +// #Regression #Conformance #TypeInference #Recursion +// Regression test for FSharp1.0:3187 +// Title: better inference for mutually recursrive generic classes +// Descr: Verify types are inferred correctly for generic classes + +//This expression was expected to have type + +// In the negative case, this tests that eager generalization is based on a transitive (greatest-fixed-point) computation +module OO_Example_GreatestFixedPoint = + type C() = + member x.M1() = x.M2() |> fst + member x.M2() = failwith "", x.M3() + member x.Mbbb() = + (x.M1() : int) |> ignore + (x.M2() : string) |> ignore // M1 should not be generalized at this point + member x.M3() = 1 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_TypeDeclaration02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_TypeDeclaration02.fs new file mode 100644 index 00000000000..d49be3f590c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/E_TypeDeclaration02.fs @@ -0,0 +1,26 @@ +// #Regression #Conformance #TypeInference #Recursion +// Regression test for FSharp1.0:5423 +// Title: code sample stack overflow from fsc.exe and brings down VS2008 intelisense + +//This expression was expected to have type +//The type 'myint<'d>' is not compatible with the type 'SfsIntTerm<'a>' +//The type 'myint<'d>' is not compatible with the type 'SfsIntTerm<'b>' +//Type constraint mismatch + +type myint<'a> = Myint of 'a + +// Crashes type checker. +type SfsIntTerm<'a> () = + static member ( - ) (l: SfsIntTerm<'a>, r: SfsIntTerm<'a>) = SfsModel.Difference () + static member ( - ) (l: myint<'a> , r: SfsIntTerm<'a>) = SfsModel.CreateIntConstant l - r + static member ( * ) (l: myint<_> , r: SfsIntTerm<_> ) = + let term = SfsModel.CreateIntConstant l + SfsModel.Product (term, r) + static member ( * ) (l: SfsIntTerm<'c>, r: myint<'d>) = + let term = SfsModel.CreateIntConstant l + SfsModel.Product (r,r) + +and SfsModel () = + static member CreateIntConstant (x: myint<'a>) = Unchecked.defaultof> + static member Difference () = Unchecked.defaultof> + static member Product (l: SfsIntTerm<'a>,r: SfsIntTerm<'b>) : SfsIntTerm<'a> = failwith "" diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/InfiniteRecursiveExplicitConstructor.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/InfiniteRecursiveExplicitConstructor.fs new file mode 100644 index 00000000000..3e211b55ba7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/InfiniteRecursiveExplicitConstructor.fs @@ -0,0 +1,9 @@ +// #Regression #Conformance #TypeInference #Recursion +// Regression test for FSHARP1.0:3541 +// PEVerification failure with infinite recursion in explict constructor +// Note: as per Don's comment in 3541, we shoudl NOT disallow recursive call of own constructor +#light +open System + +type A() = + new (x : string) = new A(x) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs similarity index 66% rename from tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs index df5ec0b9719..ac790d59dda 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs @@ -10,8 +10,8 @@ module RecursiveSafetyAnalysis = // This test was automatically generated (moved from FSharpQA suite - Conformance/InferenceProcedures/RecursiveSafetyAnalysis) //Failed to inline the value 'test' marked 'inline', perhaps because a recursive value was marked 'inline' - [] - let ``RecursiveSafetyAnalysis - E_RecursiveInline.fs - --test:ErrorRanges`` compilation = + [] + let ``E_RecursiveInline_fs`` compilation = compilation |> asFsx |> withOptions ["--test:ErrorRanges"] @@ -22,8 +22,8 @@ module RecursiveSafetyAnalysis = |> ignore // This test was automatically generated (moved from FSharpQA suite - Conformance/InferenceProcedures/RecursiveSafetyAnalysis) - [] - let ``RecursiveSafetyAnalysis - InfiniteRecursiveExplicitConstructor.fs - `` compilation = + [] + let ``InfiniteRecursiveExplicitConstructor_fs`` compilation = compilation |> asFsx |> typecheck @@ -32,8 +32,8 @@ module RecursiveSafetyAnalysis = // This test was automatically generated (moved from FSharpQA suite - Conformance/InferenceProcedures/RecursiveSafetyAnalysis) //Type constraint mismatch - [] - let ``RecursiveSafetyAnalysis - E_TypeDeclaration02.fs - --test:ErrorRanges`` compilation = + [] + let ``E_TypeDeclaration02_fs`` compilation = compilation |> asFsx |> withOptions ["--test:ErrorRanges"] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs similarity index 66% rename from tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs index 45454edcae4..472206028bb 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs @@ -9,8 +9,8 @@ open FSharp.Test.Compiler module HashLight = // This test was automatically generated (moved from FSharpQA suite - Conformance/LexicalFiltering/HashLight) - [] - let ``HashLight - IndentationWithComputationExpression01.fs - --warnaserror+`` compilation = + [] + let ``IndentationWithComputationExpression01_fs`` compilation = compilation |> asFsx |> withOptions ["--warnaserror+"] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/HashLight/IndentationWithComputationExpression01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/IndentationWithComputationExpression01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/HashLight/IndentationWithComputationExpression01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/IndentationWithComputationExpression01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs similarity index 70% rename from tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs index 64e2197211d..9f96a5f5562 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs @@ -10,8 +10,8 @@ module HighPrecedenceApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/LexicalFiltering/HighPrecedenceApplication) // - [] - let ``HighPrecedenceApplication - RangeOperator01.fs - -a`` compilation = + [] + let ``RangeOperator01_fs`` compilation = compilation |> asFs |> withOptions ["-a"] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/HighPrecedenceApplication/RangeOperator01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/RangeOperator01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/HighPrecedenceApplication/RangeOperator01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/RangeOperator01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/Basic/OffsideExceptions/InfixTokenPlusOne.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/InfixTokenPlusOne.fs similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/Basic/OffsideExceptions/InfixTokenPlusOne.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/InfixTokenPlusOne.fs index b7327e1bc27..71069792981 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/Basic/OffsideExceptions/InfixTokenPlusOne.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/InfixTokenPlusOne.fs @@ -22,6 +22,3 @@ let (|>>>>>>>) = (|>) let veryLongIdentifier = (* *)[1;2;3] |> fun a -> a |>>>>>>> fun b -> b - - -exit 0 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/Basic/OffsideExceptions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs similarity index 99% rename from tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/Basic/OffsideExceptions.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs index c71c07ecae2..8e9b6ae2cff 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/Basic/OffsideExceptions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs @@ -8,7 +8,7 @@ open FSharp.Test.Compiler module OffsideExceptions = type FileAttribute(file) = - inherit DirectoryAttribute(__SOURCE_DIRECTORY__ + "/../../../resources/tests/Conformance/LexicalFiltering/Basic/OffsideExceptions", Includes=[|file|]) + inherit DirectoryAttribute(__SOURCE_DIRECTORY__, Includes=[|file|]) // This test was automatically generated (moved from FSharpQA suite - Conformance/LexicalFiltering/Basic/OffsideExceptions) // @@ -431,10 +431,9 @@ function let RelaxWhitespace2_Neg9() = Fsx """ let _ = <@ type Foo(x : int) = - member this.Length = x @> + member this.Length = x @> -exit 1 - +raise (new Exception("exit 1")) """ |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/Basic/OffsideExceptions/RelaxWhitespace2.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/RelaxWhitespace2.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/Basic/OffsideExceptions/RelaxWhitespace2.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/RelaxWhitespace2.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/Basic/OffsideExceptions/RelaxWhitespace2.fs.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/RelaxWhitespace2.fs.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalFiltering/Basic/OffsideExceptions/RelaxWhitespace2.fs.bsl rename to tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/RelaxWhitespace2.fs.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/MethodResolution/ParametersResolution.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/MethodResolution/ParametersResolution.fs index 6703fcf7fb8..0e10f091e80 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/MethodResolution/ParametersResolution.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/MethodResolution/ParametersResolution.fs @@ -253,6 +253,7 @@ let mutable think5 = Unchecked.defaultof let ok5 = Thing.Do(1, &fast5, &think5) """ + [] let ``Method with same optional and out parameter does not resolve`` () = Fsx """ diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs similarity index 71% rename from tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs index 1415746d563..5cde8ad2597 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs @@ -10,8 +10,8 @@ module CheckingSyntacticTypes = // This test was automatically generated (moved from FSharpQA suite - Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes) //This member, function or value declaration may not be declared 'inline' - [] - let ``CheckingSyntacticTypes - E_CannotInlineVirtualMethods1.fs - --test:ErrorRanges`` compilation = + [] + let ``E_CannotInlineVirtualMethods1_fs`` compilation = compilation |> asFsx |> withOptions ["--test:ErrorRanges"] @@ -23,8 +23,8 @@ module CheckingSyntacticTypes = // This test was automatically generated (moved from FSharpQA suite - Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes) //This member, function or value declaration may not be declared 'inline' - [] - let ``CheckingSyntacticTypes - E_CannotInlineVirtualMethod2.fs - --test:ErrorRanges`` compilation = + [] + let ``E_CannotInlineVirtualMethod2_fs`` compilation = compilation |> asFsx |> withOptions ["--test:ErrorRanges"] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_CannotInlineVirtualMethod2.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_CannotInlineVirtualMethod2.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_CannotInlineVirtualMethod2.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_CannotInlineVirtualMethod2.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_CannotInlineVirtualMethods1.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_CannotInlineVirtualMethods1.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_CannotInlineVirtualMethods1.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_CannotInlineVirtualMethods1.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs similarity index 67% rename from tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs index d04178aab5c..5862e786a3a 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs @@ -9,8 +9,8 @@ open FSharp.Test.Compiler module LogicalPropertiesOfTypes = // This test was automatically generated (moved from FSharpQA suite - Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes) - [] - let ``LogicalPropertiesOfTypes - TypeWithNullLiteral_NetRef.fsx - -a`` compilation = + [] + let ``TypeWithNullLiteral_NetRef.fsx`` compilation = compilation |> asFsx |> withOptions ["-a"] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes/TypeWithNullLiteral_NetRef.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes/TypeWithNullLiteral_NetRef.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes/TypeWithNullLiteral_NetRef.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes/TypeWithNullLiteral_NetRef.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs index 3720a690bc2..7f68879a8d9 100644 --- a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs +++ b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs @@ -13,7 +13,7 @@ module PrimitiveConstraints = /// This suggestion was resolved as by design, /// so the test makes sure, we're emitting error message about 'not being a valid object construction expression' - [] + [] let ``Invalid object constructor`` compilation = // Regression test for FSharp1.0:4189 compilation |> verifyBaseline diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/typecheck/constructors/neg_invalid_constructor.fs b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/typecheck/constructors/neg_invalid_constructor.fs rename to tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/typecheck/constructors/neg_invalid_constructor.fs.bsl b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/typecheck/constructors/neg_invalid_constructor.fs.bsl rename to tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs new file mode 100644 index 00000000000..6cbf979a6c7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs @@ -0,0 +1,44 @@ +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module AsyncExpressionStepping = + + let verifyCompilation compilation = + compilation + |> asFs + |> withOptions [ "--test:EmitFeeFeeAs100001" ] + |> withNoOptimize + |> withEmbeddedPdb + |> withEmbedAllSource + |> ignoreWarnings + |> verifyBaseline + |> verifyILBaseline + + [] + let ``AsyncExpressionSteppingTest1_fs`` compilation = + verifyCompilation compilation + + [] + let ``AsyncExpressionSteppingTest2_fs`` compilation = + verifyCompilation compilation + + [] + let ``AsyncExpressionSteppingTest3_fs`` compilation = + verifyCompilation compilation + + [] + let ``AsyncExpressionSteppingTest4_fs`` compilation = + verifyCompilation compilation + + [] + let ``AsyncExpressionSteppingTest5_fs`` compilation = + verifyCompilation compilation + + [] + let ``AsyncExpressionSteppingTest6_fs`` compilation = + verifyCompilation compilation + + diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.il.debug.bsl new file mode 100644 index 00000000000..25b0b0260c0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.il.debug.bsl @@ -0,0 +1,161 @@ + + + + + + +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 6:0:0:0 +} +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.module assembly.dll + +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public assembly + extends [runtime]System.Object + { + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f1@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/assembly/f1@6::builder@ + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 8 + IL_0000: ldstr "hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + IL_0010: ldstr "stuck in the middle" + IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001f: pop + IL_0020: ldstr "goodbye" + IL_0025: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002f: pop + IL_0030: ldarg.0 + IL_0031: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f1@6::builder@ + IL_0036: tail. + IL_0038: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() + IL_003d: ret + } + + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + f1() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldloc.0 + IL_0008: newobj instance void assembly/assembly/f1@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_000d: tail. + IL_000f: 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_0014: ret + } + + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static + void .cctor() cil managed + { + + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f1() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.1 + IL_0008: ldloc.1 + IL_0009: ldnull + IL_000a: ldnull + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync::RunSynchronously(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1) + IL_0010: pop + IL_0011: ret + } + +} + + + + + + diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.il.release.bsl similarity index 89% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.il.release.bsl index 821abbd9685..9b703b5fb33 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.il.release.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 { @@ -22,27 +21,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest1 { - // Offset: 0x00000000 Length: 0x00000260 + // Offset: 0x00000000 Length: 0x000002AC + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest1 created } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest1 { - // Offset: 0x00000268 Length: 0x000000B1 + // Offset: 0x000002B0 Length: 0x000000B1 + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest1 created } .module AsyncExpressionSteppingTest1.dll -// MVID: {611B0EC4-6394-B5D4-A745-0383C40E1B61} +// MVID: {622719B0-6394-B5D4-A745-0383B0192762} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06680000 +// Image base: 0x03AA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -82,18 +83,14 @@ { // Code size 62 (0x3e) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 17,32 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest1.fs' IL_0000: ldstr "hello" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: pop - .line 7,7 : 17,46 '' IL_0010: ldstr "stuck in the middle" IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_001f: pop - .line 8,8 : 17,34 '' IL_0020: ldstr "goodbye" IL_0025: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_002a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) @@ -112,8 +109,7 @@ { // Code size 21 (0x15) .maxstack 4 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - .line 6,6 : 9,14 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -140,12 +136,10 @@ { // Code size 18 (0x12) .maxstack 5 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 'Pipe #1 input at line 10', - [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) - .line 10,10 : 13,17 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest1/AsyncExpressionSteppingTest1::f1() IL_0005: stloc.0 - .line 10,10 : 21,43 '' IL_0006: ldloc.0 IL_0007: stloc.1 IL_0008: ldloc.1 @@ -164,3 +158,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\AsyncExpressionStepping\AsyncExpressionSteppingTest1_fs\AsyncExpressionSteppingTest1.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs new file mode 100644 index 00000000000..68ff28401fe --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs @@ -0,0 +1,11 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Async +module AsyncExpressionSteppingTest2 // Regression test for FSHARP1.0:4058 +module AsyncExpressionSteppingTest2 = + let f2 () = + let x = ref 0 + async { while x.Value < 4 do + x.Value <- x.Value + 1 + printfn "hello" } + + + let _ = f2() |> Async.RunSynchronously diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.il.debug.bsl similarity index 88% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.il.debug.bsl index c2c1e4df2cc..388f85310d0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.il.debug.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -22,27 +21,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest2 { - // Offset: 0x00000000 Length: 0x00000260 + // Offset: 0x00000000 Length: 0x00000261 + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest2 created } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest2 { // Offset: 0x00000268 Length: 0x000000B1 + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest2 created } .module AsyncExpressionSteppingTest2.dll -// MVID: {61F2E23B-6394-D499-A745-03833BE2F261} +// MVID: {62200153-6394-D499-A745-038353012062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05BB0000 +// Image base: 0x03850000 // =============== CLASS MEMBERS DECLARATION =================== @@ -79,11 +80,9 @@ { // 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: 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_0006: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() IL_000b: ldc.i4.4 IL_000c: clt IL_000e: ret @@ -121,23 +120,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 42 (0x2a) + // Code size 55 (0x37) .maxstack 8 - .line 7,7 : 20,26 '' IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::x - IL_0006: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_000b: nop - .line 8,8 : 20,35 '' - IL_000c: ldstr "hello" - IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0016: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001b: pop - IL_001c: ldarg.0 - IL_001d: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::builder@ - IL_0022: tail. - IL_0024: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() - IL_0029: ret + IL_0006: ldarg.0 + IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::x + IL_000c: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0011: ldc.i4.1 + IL_0012: add + IL_0013: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0018: nop + IL_0019: ldstr "hello" + IL_001e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0023: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0028: pop + IL_0029: ldarg.0 + IL_002a: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::builder@ + IL_002f: tail. + IL_0031: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() + IL_0036: ret } // end of method 'f2@7-2'::Invoke } // end of class 'f2@7-2' @@ -201,13 +203,11 @@ { // Code size 29 (0x1d) .maxstack 5 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, - [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1) - .line 5,5 : 9,22 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder 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 - .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 IL_000d: ldloc.1 @@ -236,12 +236,10 @@ { // Code size 18 (0x12) .maxstack 5 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 'Pipe #1 input at line 11', - [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) - .line 11,11 : 13,17 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2::f2() IL_0005: stloc.0 - .line 11,11 : 21,43 '' IL_0006: ldloc.0 IL_0007: stloc.1 IL_0008: ldloc.1 @@ -260,3 +258,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\resources\tests\CodeGen\EmittedIl\AsyncExpressionStepping\AsyncExpressionSteppingTest2_fs\AsyncExpressionSteppingTest2.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.il.release.bsl new file mode 100644 index 00000000000..e2571745b07 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.il.release.bsl @@ -0,0 +1,261 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly AsyncExpressionSteppingTest2 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.AsyncExpressionSteppingTest2 +{ + // Offset: 0x00000000 Length: 0x000002AC + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest2 created +} +.mresource public FSharpOptimizationData.AsyncExpressionSteppingTest2 +{ + // Offset: 0x000002B0 Length: 0x000000B1 + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest2 created +} +.module AsyncExpressionSteppingTest2.dll +// MVID: {622719B0-6394-D499-A745-0383B0192762} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x008F0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed AsyncExpressionSteppingTest2 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public AsyncExpressionSteppingTest2 + extends [mscorlib]System.Object + { + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@6-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) 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.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::x + IL_000d: ret + } // end of method 'f2@6-1'::.ctor + + .method public strict virtual instance bool + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::x + IL_0006: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_000b: ldc.i4.4 + IL_000c: clt + IL_000e: ret + } // end of method 'f2@6-1'::Invoke + + } // end of class 'f2@6-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@7-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .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.FSharpRef`1 x, + 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) + .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.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::x + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::builder@ + IL_0014: ret + } // end of method 'f2@7-2'::.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 55 (0x37) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::x + IL_0006: ldarg.0 + IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::x + IL_000c: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0011: ldc.i4.1 + IL_0012: add + IL_0013: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0018: nop + IL_0019: ldstr "hello" + IL_001e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0023: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0028: pop + IL_0029: ldarg.0 + IL_002a: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::builder@ + IL_002f: tail. + IL_0031: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() + IL_0036: ret + } // end of method 'f2@7-2'::Invoke + + } // end of class 'f2@7-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .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.FSharpRef`1 x, + 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) + .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.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::x + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ + IL_0014: ret + } // end of method f2@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 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: 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_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 + + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + f2() cil managed + { + // Code size 29 (0x1d) + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder 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: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_000c: stloc.1 + IL_000d: ldloc.1 + IL_000e: ldloc.0 + IL_000f: ldloc.1 + IL_0010: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0015: tail. + IL_0017: 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_001c: ret + } // end of method AsyncExpressionSteppingTest2::f2 + + } // end of class AsyncExpressionSteppingTest2 + +} // end of class AsyncExpressionSteppingTest2 + +.class private abstract auto ansi sealed ''.$AsyncExpressionSteppingTest2 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 18 (0x12) + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2::f2() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.1 + IL_0008: ldloc.1 + IL_0009: ldnull + IL_000a: ldnull + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync::RunSynchronously(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1) + IL_0010: pop + IL_0011: ret + } // end of method $AsyncExpressionSteppingTest2::.cctor + +} // end of class ''.$AsyncExpressionSteppingTest2 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\AsyncExpressionStepping\AsyncExpressionSteppingTest2_fs\AsyncExpressionSteppingTest2.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs similarity index 72% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs index 623bd055f69..8cd8bf03acb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs @@ -3,10 +3,10 @@ module AsyncExpressionSteppingTest3 // Regression test for FSHARP1.0:4058 module AsyncExpressionSteppingTest3 = let f3 () = async { let x = ref 0 - incr x + x.Value <- x.Value + 1 let y = ref 0 - incr y - let z = !x + !y + y.Value <- y.Value + 1 + let z = x.Value + x.Value return z } let _ = f3() |> Async.RunSynchronously diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.il.debug.bsl new file mode 100644 index 00000000000..daf32c8ca1d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.il.debug.bsl @@ -0,0 +1,226 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly AsyncExpressionSteppingTest3 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.AsyncExpressionSteppingTest3 +{ + // Offset: 0x00000000 Length: 0x000002B3 + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest3 created +} +.mresource public FSharpOptimizationData.AsyncExpressionSteppingTest3 +{ + // Offset: 0x000002B8 Length: 0x000000B1 + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest3 created +} +.module AsyncExpressionSteppingTest3.dll +// MVID: {62268D44-6394-F35E-A745-0383448D2662} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x03BC0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed AsyncExpressionSteppingTest3 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public AsyncExpressionSteppingTest3 + extends [mscorlib]System.Object + { + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@10-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 res + .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(int32 res) 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 int32 AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::res + IL_000d: ret + } // end of method 'f3@10-1'::.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 15 (0xf) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::res + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret + } // end of method 'f3@10-1'::Invoke + + } // end of class 'f3@10-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit f3@5 + 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 AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/f3@5::builder@ + IL_000d: ret + } // end of method f3@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 + { + // Code size 87 (0x57) + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_1, + int32 V_2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3, + int32 V_4, + int32 V_5) + 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: ldloc.0 + IL_0008: ldloc.0 + IL_0009: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0015: nop + IL_0016: ldc.i4.0 + IL_0017: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_001c: stloc.1 + IL_001d: ldloc.1 + IL_001e: ldloc.1 + IL_001f: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0024: ldc.i4.1 + IL_0025: add + IL_0026: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_002b: nop + IL_002c: ldloc.0 + IL_002d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0032: ldloc.0 + IL_0033: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0038: add + IL_0039: stloc.2 + IL_003a: ldarg.0 + IL_003b: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/f3@5::builder@ + IL_0040: stloc.3 + IL_0041: ldloc.2 + IL_0042: stloc.s V_4 + IL_0044: ldloc.s V_4 + IL_0046: stloc.s V_5 + IL_0048: ldloc.s V_5 + IL_004a: newobj instance void AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::.ctor(int32) + IL_004f: tail. + IL_0051: 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_0056: ret + } // end of method f3@5::Invoke + + } // end of class f3@5 + + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + f3() cil managed + { + // Code size 21 (0x15) + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: stloc.0 + 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) + IL_000d: tail. + IL_000f: 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_0014: ret + } // end of method AsyncExpressionSteppingTest3::f3 + + } // end of class AsyncExpressionSteppingTest3 + +} // end of class AsyncExpressionSteppingTest3 + +.class private abstract auto ansi sealed ''.$AsyncExpressionSteppingTest3 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 18 (0x12) + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3::f3() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.1 + IL_0008: ldloc.1 + IL_0009: ldnull + IL_000a: ldnull + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync::RunSynchronously(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1) + IL_0010: pop + IL_0011: ret + } // end of method $AsyncExpressionSteppingTest3::.cctor + +} // end of class ''.$AsyncExpressionSteppingTest3 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\AsyncExpressionStepping\AsyncExpressionSteppingTest3_fs\AsyncExpressionSteppingTest3.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.il.release.bsl similarity index 78% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.il.release.bsl index 00a2f6ce8a4..828162f3817 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.il.release.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -22,27 +21,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest3 { - // Offset: 0x00000000 Length: 0x0000026B + // Offset: 0x00000000 Length: 0x000002B7 + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest3 created } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest3 { - // Offset: 0x00000270 Length: 0x000000B1 + // Offset: 0x000002C0 Length: 0x000000B1 + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest3 created } .module AsyncExpressionSteppingTest3.dll -// MVID: {61F2D6A5-6394-F35E-A745-0383A5D6F261} +// MVID: {622719B0-6394-F35E-A745-0383B0192762} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069A0000 +// Image base: 0x03A10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -118,48 +119,49 @@ .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 67 (0x43) - .maxstack 6 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, - [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, - [2] int32 z, - [3] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3, - [4] int32 V_4) - .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' + // Code size 83 (0x53) + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_1, + int32 V_2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3, + int32 V_4) IL_0000: ldc.i4.0 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 - .line 6,6 : 17,23 '' 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 - .line 7,7 : 17,30 '' - IL_000e: ldc.i4.0 - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0014: stloc.1 - .line 8,8 : 17,23 '' - IL_0015: ldloc.1 - IL_0016: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_001b: nop - .line 9,9 : 17,32 '' - IL_001c: ldloc.0 - IL_001d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0022: ldloc.1 - IL_0023: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0028: add - IL_0029: stloc.2 - .line 10,10 : 17,25 '' - IL_002a: ldarg.0 - IL_002b: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/f3@5::builder@ - IL_0030: stloc.3 - IL_0031: ldloc.2 - IL_0032: stloc.s V_4 - IL_0034: ldloc.s V_4 - IL_0036: newobj instance void AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::.ctor(int32) - IL_003b: tail. - IL_003d: 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_0042: ret + IL_0008: ldloc.0 + IL_0009: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0015: nop + IL_0016: ldc.i4.0 + IL_0017: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_001c: stloc.1 + IL_001d: ldloc.1 + IL_001e: ldloc.1 + IL_001f: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0024: ldc.i4.1 + IL_0025: add + IL_0026: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_002b: nop + IL_002c: ldloc.0 + IL_002d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0032: ldloc.0 + IL_0033: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0038: add + IL_0039: stloc.2 + IL_003a: ldarg.0 + IL_003b: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/f3@5::builder@ + IL_0040: stloc.3 + IL_0041: ldloc.2 + IL_0042: stloc.s V_4 + IL_0044: ldloc.s V_4 + IL_0046: newobj instance void AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::.ctor(int32) + IL_004b: tail. + IL_004d: 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_0052: ret } // end of method f3@5::Invoke } // end of class f3@5 @@ -169,8 +171,7 @@ { // Code size 21 (0x15) .maxstack 4 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - .line 5,5 : 9,14 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -197,12 +198,10 @@ { // Code size 18 (0x12) .maxstack 5 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 'Pipe #1 input at line 12', - [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) - .line 12,12 : 13,17 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3::f3() IL_0005: stloc.0 - .line 12,12 : 21,43 '' IL_0006: ldloc.0 IL_0007: stloc.1 IL_0008: ldloc.1 @@ -221,3 +220,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\AsyncExpressionStepping\AsyncExpressionSteppingTest3_fs\AsyncExpressionSteppingTest3.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs similarity index 66% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs index b193613df5a..42bef7b6e83 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs @@ -5,11 +5,11 @@ module AsyncExpressionSteppingTest4 = async { let x = ref 0 try let y = ref 0 - incr y - let z = !x + !y - return z - finally - incr x + y.Value <- y.Value + let z = x.Value + y.Value + return z + finally + x.Value <- x.Value printfn "done" } let _ = f4() |> Async.RunSynchronously diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.il.debug.bsl new file mode 100644 index 00000000000..b47575a3f55 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.il.debug.bsl @@ -0,0 +1,376 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly AsyncExpressionSteppingTest4 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.AsyncExpressionSteppingTest4 +{ + // Offset: 0x00000000 Length: 0x000002B3 + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest4 created +} +.mresource public FSharpOptimizationData.AsyncExpressionSteppingTest4 +{ + // Offset: 0x000002B8 Length: 0x000000B1 + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest4 created +} +.module AsyncExpressionSteppingTest4.dll +// MVID: {62268D8D-6394-6D4B-A745-03838D8D2662} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x02AB0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed AsyncExpressionSteppingTest4 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public AsyncExpressionSteppingTest4 + extends [mscorlib]System.Object + { + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@10-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 res + .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(int32 res) 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 int32 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::res + IL_000d: ret + } // end of method 'f4@10-2'::.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 15 (0xf) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::res + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret + } // end of method 'f4@10-2'::Invoke + + } // end of class 'f4@10-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@7-1' + 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 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) 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.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::x + IL_0014: ret + } // end of method 'f4@7-1'::.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 67 (0x43) + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + int32 V_3, + int32 V_4) + IL_0000: nop + IL_0001: ldc.i4.0 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_000f: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0014: nop + IL_0015: ldarg.0 + IL_0016: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::x + IL_001b: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0020: ldloc.0 + IL_0021: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0026: add + IL_0027: stloc.1 + IL_0028: ldarg.0 + IL_0029: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::builder@ + IL_002e: stloc.2 + IL_002f: ldloc.1 + IL_0030: stloc.3 + IL_0031: ldloc.3 + IL_0032: stloc.s V_4 + IL_0034: ldloc.s V_4 + IL_0036: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::.ctor(int32) + IL_003b: tail. + IL_003d: 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_0042: ret + } // end of method 'f4@7-1'::Invoke + + } // end of class 'f4@7-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) 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.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::x + IL_000d: ret + } // end of method 'f4@12-3'::.ctor + + .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 42 (0x2a) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::x + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::x + IL_000d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0012: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0017: nop + IL_0018: ldstr "done" + IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0022: tail. + IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0029: ret + } // end of method 'f4@12-3'::Invoke + + } // end of class 'f4@12-3' + + .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> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 finallyFunction + .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 finallyFunction, + 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 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::finallyFunction + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::computation + IL_0014: ret + } // end of method 'f4@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 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'::finallyFunction + 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_0014: ret + } // end of method 'f4@6-4'::Invoke + + } // end of class 'f4@6-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit f4@5 + 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 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@ + IL_000d: ret + } // end of method f4@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 + { + // Code size 68 (0x44) + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_4, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_5) + 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: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@ + IL_000d: stloc.1 + IL_000e: ldarg.0 + IL_000f: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@ + IL_0014: ldarg.0 + IL_0015: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@ + IL_001a: ldloc.0 + IL_001b: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0020: 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_0025: stloc.2 + IL_0026: ldloc.0 + IL_0027: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_002c: stloc.3 + IL_002d: ldloc.3 + IL_002e: stloc.s V_4 + IL_0030: ldloc.2 + IL_0031: stloc.s V_5 + IL_0033: ldloc.s V_4 + IL_0035: ldloc.s V_5 + IL_0037: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_003c: tail. + IL_003e: 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_0043: ret + } // end of method f4@5::Invoke + + } // end of class f4@5 + + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + f4() cil managed + { + // Code size 21 (0x15) + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: stloc.0 + 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) + IL_000d: tail. + IL_000f: 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_0014: ret + } // end of method AsyncExpressionSteppingTest4::f4 + + } // end of class AsyncExpressionSteppingTest4 + +} // end of class AsyncExpressionSteppingTest4 + +.class private abstract auto ansi sealed ''.$AsyncExpressionSteppingTest4 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 18 (0x12) + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4::f4() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.1 + IL_0008: ldloc.1 + IL_0009: ldnull + IL_000a: ldnull + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync::RunSynchronously(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1) + IL_0010: pop + IL_0011: ret + } // end of method $AsyncExpressionSteppingTest4::.cctor + +} // end of class ''.$AsyncExpressionSteppingTest4 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\AsyncExpressionStepping\AsyncExpressionSteppingTest4_fs\AsyncExpressionSteppingTest4.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.il.release.bsl similarity index 86% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.il.release.bsl index 2b3d8d6fbf8..d8cecf2a329 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.il.release.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -22,27 +21,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest4 { - // Offset: 0x00000000 Length: 0x0000026B + // Offset: 0x00000000 Length: 0x000002B7 + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest4 created } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest4 { - // Offset: 0x00000270 Length: 0x000000B1 + // Offset: 0x000002C0 Length: 0x000000B1 + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest4 created } .module AsyncExpressionSteppingTest4.dll -// MVID: {61F2D6A5-6394-6D4B-A745-0383A5D6F261} +// MVID: {622719B0-6394-6D4B-A745-0383B0192762} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07140000 +// Image base: 0x03B70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,42 +124,38 @@ .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 57 (0x39) + // Code size 63 (0x3f) .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' + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + int32 V_3) IL_0000: nop - .line 7,7 : 21,34 '' 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_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_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_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 + IL_0009: ldloc.0 + IL_000a: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_000f: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0014: nop + IL_0015: ldarg.0 + IL_0016: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::x + IL_001b: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0020: ldloc.0 + IL_0021: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0026: add + IL_0027: stloc.1 + IL_0028: ldarg.0 + IL_0029: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::builder@ + IL_002e: stloc.2 + IL_002f: ldloc.1 + IL_0030: stloc.3 + IL_0031: ldloc.3 + IL_0032: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::.ctor(int32) + IL_0037: tail. + IL_0039: 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_003e: ret } // end of method 'f4@7-1'::Invoke } // end of class 'f4@7-1' @@ -185,21 +182,21 @@ .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 31 (0x1f) + // Code size 42 (0x2a) .maxstack 8 - .line 11,11 : 17,24 '' IL_0000: nop - .line 12,12 : 20,26 '' 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_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 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::x + IL_000d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0012: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0017: nop + IL_0018: ldstr "done" + IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0022: tail. + IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0029: ret } // end of method 'f4@12-3'::Invoke } // end of class 'f4@12-3' @@ -280,11 +277,10 @@ { // Code size 60 (0x3c) .maxstack 7 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, - [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 5,5 : 17,30 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_3) 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 @@ -319,8 +315,7 @@ { // Code size 21 (0x15) .maxstack 4 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - .line 5,5 : 9,14 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -347,12 +342,10 @@ { // Code size 18 (0x12) .maxstack 5 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 'Pipe #1 input at line 15', - [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) - .line 15,15 : 13,17 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4::f4() IL_0005: stloc.0 - .line 15,15 : 21,43 '' IL_0006: ldloc.0 IL_0007: stloc.1 IL_0008: ldloc.1 @@ -371,3 +364,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\AsyncExpressionStepping\AsyncExpressionSteppingTest4_fs\AsyncExpressionSteppingTest4.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.il.debug.bsl new file mode 100644 index 00000000000..e5b294ba928 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.il.debug.bsl @@ -0,0 +1,435 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly AsyncExpressionSteppingTest5 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.AsyncExpressionSteppingTest5 +{ + // Offset: 0x00000000 Length: 0x000002F4 + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest5 created +} +.mresource public FSharpOptimizationData.AsyncExpressionSteppingTest5 +{ + // Offset: 0x000002F8 Length: 0x000000BE + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest5 created +} +.module AsyncExpressionSteppingTest5.dll +// MVID: {62268D8D-6394-30E8-A745-03838D8D2662} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x033C0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed AsyncExpressionSteppingTest5 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public AsyncExpressionSteppingTest5 + extends [mscorlib]System.Object + { + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-1' + 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-1'::builder@ + IL_000d: ret + } // end of method 'f7@6-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(int32 _arg1) cil managed + { + // Code size 48 (0x30) + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.1 + IL_0001: stloc.0 + 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 + IL_0012: ldstr "hello 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@6-1'::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@6-1'::Invoke + + } // 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> + { + .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-3'::builder@ + IL_000d: ret + } // end of method 'f7@9-3'::.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 (int32 V_0) + IL_0000: ldarg.1 + IL_0001: stloc.0 + 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 + 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@9-3' + + .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.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-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 unitVar) cil managed + { + // Code size 30 (0x1e) + .maxstack 8 + 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 + + } // end of class 'f7@9-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 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 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 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-4'::part2 + 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::part2 + IL_0006: ret + } // end of method 'f7@6-4'::Invoke + + } // end of class 'f7@6-4' + + .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 part1 + .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 part1, + 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-5'::part1 + 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_0014: ret + } // 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 + { + // 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-5'::part1 + IL_0007: ldarg.0 + 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-5'::Invoke + + } // end of class 'f7@6-5' + + .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 92 (0x5c) + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_3, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_4, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_5, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_6) + 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.1 + IL_003b: stloc.3 + IL_003c: ldloc.2 + IL_003d: stloc.s V_4 + IL_003f: ldloc.3 + IL_0040: stloc.s V_5 + IL_0042: ldloc.s V_4 + IL_0044: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_0049: stloc.s V_6 + IL_004b: ldloc.s V_5 + IL_004d: ldloc.s V_6 + IL_004f: 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_0054: tail. + IL_0056: 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_005b: 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 (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: stloc.0 + 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) + IL_000d: tail. + IL_000f: 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_0014: ret + } // end of method AsyncExpressionSteppingTest5::f7 + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + es() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() + } // end of property AsyncExpressionSteppingTest5::es + } // end of class AsyncExpressionSteppingTest5 + +} // end of class AsyncExpressionSteppingTest5 + +.class private abstract auto ansi sealed ''.$AsyncExpressionSteppingTest5 + extends [mscorlib]System.Object +{ + .field static assembly initonly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es@4 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 48 (0x30) + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2) + IL_0000: ldc.i4.3 + IL_0001: ldc.i4.4 + IL_0002: ldc.i4.5 + 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_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_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: dup + IL_0018: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$AsyncExpressionSteppingTest5::es@4 + IL_001d: stloc.0 + IL_001e: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::f7() + IL_0023: stloc.1 + IL_0024: ldloc.1 + IL_0025: stloc.2 + IL_0026: ldloc.2 + IL_0027: ldnull + IL_0028: ldnull + IL_0029: call !!0 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync::RunSynchronously(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1) + IL_002e: pop + IL_002f: ret + } // end of method $AsyncExpressionSteppingTest5::.cctor + +} // end of class ''.$AsyncExpressionSteppingTest5 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\AsyncExpressionStepping\AsyncExpressionSteppingTest5_fs\AsyncExpressionSteppingTest5.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.il.release.bsl similarity index 94% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.il.release.bsl index 89b5f397ce7..c6876e45c2d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.il.release.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -22,27 +21,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest5 { - // Offset: 0x00000000 Length: 0x000002AC + // Offset: 0x00000000 Length: 0x000002F8 + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest5 created } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest5 { - // Offset: 0x000002B0 Length: 0x000000BE + // Offset: 0x00000300 Length: 0x000000BE + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest5 created } .module AsyncExpressionSteppingTest5.dll -// MVID: {61F2D6A5-6394-30E8-A745-0383A5D6F261} +// MVID: {622719B0-6394-30E8-A745-0383B0192762} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DC0000 +// Image base: 0x03290000 // =============== CLASS MEMBERS DECLARATION =================== @@ -82,17 +83,13 @@ { // Code size 48 (0x30) .maxstack 5 - .locals init ([0] int32 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\\AsyncExpressionStepping\\AsyncExpressionSteppingTest5.fs' + .locals init (int32 V_0) IL_0000: ldarg.1 IL_0001: stloc.0 - .line 7,7 : 20,35 '' 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 : 20,37 '' IL_0012: ldstr "hello 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) @@ -133,16 +130,13 @@ { // Code size 48 (0x30) .maxstack 5 - .locals init ([0] int32 x) - .line 100001,100001 : 0,0 '' + .locals init (int32 V_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) @@ -183,7 +177,6 @@ { // Code size 30 (0x1e) .maxstack 8 - .line 9,9 : 17,20 '' 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() @@ -308,15 +301,13 @@ { // Code size 80 (0x50) .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, - [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) - .line 100001,100001 : 0,0 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) 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: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() @@ -361,8 +352,7 @@ { // Code size 21 (0x15) .maxstack 4 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - .line 6,6 : 9,14 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -397,10 +387,9 @@ { // Code size 48 (0x30) .maxstack 6 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es, - [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 'Pipe #1 input at line 13', - [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2) - .line 4,4 : 5,21 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2) IL_0000: ldc.i4.3 IL_0001: ldc.i4.4 IL_0002: ldc.i4.5 @@ -414,10 +403,8 @@ IL_0017: dup IL_0018: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$AsyncExpressionSteppingTest5::es@4 IL_001d: stloc.0 - .line 13,13 : 13,17 '' IL_001e: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::f7() IL_0023: stloc.1 - .line 13,13 : 21,43 '' IL_0024: ldloc.1 IL_0025: stloc.2 IL_0026: ldloc.2 @@ -436,3 +423,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\AsyncExpressionStepping\AsyncExpressionSteppingTest5_fs\AsyncExpressionSteppingTest5.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs similarity index 71% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs index 993b1458a32..5cb8d015466 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs @@ -3,10 +3,10 @@ module AsyncExpressionSteppingTest6 // Regression test for FSHARP1.0:4058 module AsyncExpressionSteppingTest6 = let f2 () = async { let x = ref 0 - incr x + x.Value <- x.Value + 1 let y = ref 0 - incr y - let z = !x + !y + y.Value <- y.Value + 1 + let z = x.Value + y.Value return z } let f3 () = @@ -14,9 +14,9 @@ module AsyncExpressionSteppingTest6 = let! x2 = f2() let! x3 = f2() let y = ref 0 - incr y + y.Value <- y.Value + 1 let! x4 = f2() - let z = x1 + !y + x4 + let z = x1 + y.Value + x4 return z } let _ = f3() |> Async.RunSynchronously diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.il.debug.bsl new file mode 100644 index 00000000000..74336ecc57b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.il.debug.bsl @@ -0,0 +1,809 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly AsyncExpressionSteppingTest6 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.AsyncExpressionSteppingTest6 +{ + // Offset: 0x00000000 Length: 0x000002DF + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest6 created +} +.mresource public FSharpOptimizationData.AsyncExpressionSteppingTest6 +{ + // Offset: 0x000002E8 Length: 0x000000BE + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest6 created +} +.module AsyncExpressionSteppingTest6.dll +// MVID: {622690CD-6394-4FAD-A745-0383CD902662} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x03640000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed AsyncExpressionSteppingTest6 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public AsyncExpressionSteppingTest6 + extends [mscorlib]System.Object + { + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@10-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 res + .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(int32 res) 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 int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f2@10-1'::res + IL_000d: ret + } // end of method 'f2@10-1'::.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 15 (0xf) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f2@10-1'::res + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret + } // end of method 'f2@10-1'::Invoke + + } // end of class 'f2@10-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit f2@5 + 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 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f2@5::builder@ + IL_000d: ret + } // end of method f2@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 + { + // Code size 87 (0x57) + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_1, + int32 V_2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3, + int32 V_4, + int32 V_5) + 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: ldloc.0 + IL_0008: ldloc.0 + IL_0009: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0015: nop + IL_0016: ldc.i4.0 + IL_0017: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_001c: stloc.1 + IL_001d: ldloc.1 + IL_001e: ldloc.1 + IL_001f: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0024: ldc.i4.1 + IL_0025: add + IL_0026: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_002b: nop + IL_002c: ldloc.0 + IL_002d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0032: ldloc.1 + IL_0033: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0038: add + IL_0039: stloc.2 + IL_003a: ldarg.0 + IL_003b: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f2@5::builder@ + IL_0040: stloc.3 + IL_0041: ldloc.2 + IL_0042: stloc.s V_4 + IL_0044: ldloc.s V_4 + IL_0046: stloc.s V_5 + IL_0048: ldloc.s V_5 + IL_004a: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f2@10-1'::.ctor(int32) + IL_004f: tail. + IL_0051: 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_0056: ret + } // end of method f2@5::Invoke + + } // end of class f2@5 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@20-5' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 res + .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(int32 res) 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 int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@20-5'::res + IL_000d: ret + } // end of method 'f3@20-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 + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@20-5'::res + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret + } // end of method 'f3@20-5'::Invoke + + } // end of class 'f3@20-5' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-4' + 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 ) + .field public int32 x1 + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, + int32 x1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y) 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 28 (0x1c) + .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 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::x1 + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::y + IL_001b: ret + } // end of method 'f3@19-4'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(int32 _arg4) cil managed + { + // Code size 50 (0x32) + .maxstack 6 + .locals init (int32 V_0, + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + int32 V_3, + int32 V_4) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::x1 + IL_0008: ldarg.0 + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::y + IL_000e: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0013: add + IL_0014: ldloc.0 + IL_0015: add + IL_0016: stloc.1 + IL_0017: ldarg.0 + IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::builder@ + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: stloc.3 + IL_0020: ldloc.3 + IL_0021: stloc.s V_4 + IL_0023: ldloc.s V_4 + IL_0025: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@20-5'::.ctor(int32) + IL_002a: tail. + IL_002c: 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_0031: ret + } // end of method 'f3@19-4'::Invoke + + } // end of class 'f3@19-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@18-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 part1 + .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 part1, + 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 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-6'::part1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-6'::part2 + IL_0014: ret + } // end of method 'f3@18-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 21 (0x15) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-6'::part1 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-6'::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 'f3@18-6'::Invoke + + } // end of class 'f3@18-6' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-3' + 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 ) + .field public int32 x1 + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, + int32 x1) 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.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::x1 + IL_0014: ret + } // end of method 'f3@16-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(int32 _arg3) cil managed + { + // Code size 81 (0x51) + .maxstack 7 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_4, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_5, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_6) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldloc.1 + IL_000b: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0010: ldc.i4.1 + IL_0011: add + IL_0012: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0017: nop + IL_0018: ldarg.0 + IL_0019: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::builder@ + IL_001e: stloc.2 + IL_001f: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() + IL_0024: stloc.3 + IL_0025: ldarg.0 + IL_0026: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::builder@ + IL_002b: ldarg.0 + IL_002c: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::x1 + IL_0031: ldloc.1 + IL_0032: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + int32, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0037: stloc.s V_4 + IL_0039: ldloc.3 + IL_003a: stloc.s V_5 + IL_003c: ldloc.s V_4 + IL_003e: stloc.s V_6 + IL_0040: ldloc.s V_5 + IL_0042: ldloc.s V_6 + IL_0044: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-6'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0049: tail. + 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: ret + } // end of method 'f3@16-3'::Invoke + + } // end of class 'f3@16-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-7' + 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 part1 + .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 part1, + 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 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-7'::part1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-7'::part2 + IL_0014: ret + } // end of method 'f3@15-7'::.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 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-7'::part1 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-7'::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 'f3@15-7'::Invoke + + } // end of class 'f3@15-7' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-2' + 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 ) + .field public int32 x1 + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, + int32 x1) 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.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-2'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-2'::x1 + IL_0014: ret + } // end of method 'f3@15-2'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(int32 _arg2) cil managed + { + // Code size 56 (0x38) + .maxstack 6 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_4, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_5) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-2'::builder@ + IL_0008: stloc.1 + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-2'::builder@ + IL_0015: ldarg.0 + IL_0016: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-2'::x1 + IL_001b: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + int32) + IL_0020: stloc.3 + IL_0021: ldloc.2 + IL_0022: stloc.s V_4 + IL_0024: ldloc.3 + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_4 + IL_0029: ldloc.s V_5 + IL_002b: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-7'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + 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 + } // end of method 'f3@15-2'::Invoke + + } // end of class 'f3@15-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-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 part1 + .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 part1, + 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 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-8'::part1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-8'::part2 + IL_0014: ret + } // end of method 'f3@14-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 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-8'::part1 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-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 'f3@14-8'::Invoke + + } // end of class 'f3@14-8' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-1' + 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 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-1'::builder@ + IL_000d: ret + } // end of method 'f3@14-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(int32 _arg1) cil managed + { + // Code size 51 (0x33) + .maxstack 6 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_4, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_5) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-1'::builder@ + IL_0008: stloc.1 + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-1'::builder@ + IL_0015: ldloc.0 + IL_0016: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + int32) + IL_001b: stloc.3 + IL_001c: ldloc.2 + IL_001d: stloc.s V_4 + IL_001f: ldloc.3 + IL_0020: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_002b: tail. + IL_002d: 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_0032: ret + } // end of method 'f3@14-1'::Invoke + + } // end of class 'f3@14-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@13-9' + 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 part1 + .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 part1, + 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 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-9'::part1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-9'::part2 + IL_0014: ret + } // end of method 'f3@13-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 21 (0x15) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-9'::part1 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-9'::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 'f3@13-9'::Invoke + + } // end of class 'f3@13-9' + + .class auto ansi serializable sealed nested assembly beforefieldinit f3@13 + 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 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f3@13::builder@ + IL_000d: ret + } // end of method f3@13::.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 46 (0x2e) + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_4) + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f3@13::builder@ + IL_0006: stloc.0 + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f3@13::builder@ + IL_0013: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0018: stloc.2 + IL_0019: ldloc.1 + IL_001a: stloc.3 + IL_001b: ldloc.2 + IL_001c: stloc.s V_4 + IL_001e: ldloc.3 + IL_001f: ldloc.s V_4 + IL_0021: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0026: tail. + IL_0028: 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_002d: ret + } // end of method f3@13::Invoke + + } // end of class f3@13 + + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + f2() cil managed + { + // Code size 21 (0x15) + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: stloc.0 + 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) + IL_000d: tail. + IL_000f: 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_0014: ret + } // end of method AsyncExpressionSteppingTest6::f2 + + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + f3() cil managed + { + // Code size 21 (0x15) + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: stloc.0 + 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) + IL_000d: tail. + IL_000f: 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_0014: ret + } // end of method AsyncExpressionSteppingTest6::f3 + + } // end of class AsyncExpressionSteppingTest6 + +} // end of class AsyncExpressionSteppingTest6 + +.class private abstract auto ansi sealed ''.$AsyncExpressionSteppingTest6 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 18 (0x12) + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f3() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.1 + IL_0008: ldloc.1 + IL_0009: ldnull + IL_000a: ldnull + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync::RunSynchronously(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1) + IL_0010: pop + IL_0011: ret + } // end of method $AsyncExpressionSteppingTest6::.cctor + +} // end of class ''.$AsyncExpressionSteppingTest6 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\AsyncExpressionStepping\AsyncExpressionSteppingTest6_fs\AsyncExpressionSteppingTest6.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.il.release.bsl similarity index 89% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.il.release.bsl index 6cf7f4b83d6..f208991ec37 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.il.release.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -22,27 +21,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest6 { - // Offset: 0x00000000 Length: 0x00000297 + // Offset: 0x00000000 Length: 0x000002E3 + // WARNING: managed resource file FSharpSignatureData.AsyncExpressionSteppingTest6 created } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest6 { - // Offset: 0x000002A0 Length: 0x000000BE + // Offset: 0x000002E8 Length: 0x000000BE + // WARNING: managed resource file FSharpOptimizationData.AsyncExpressionSteppingTest6 created } .module AsyncExpressionSteppingTest6.dll -// MVID: {61F2D6A5-6394-4FAD-A745-0383A5D6F261} +// MVID: {622719B0-6394-4FAD-A745-0383B0192762} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05370000 +// Image base: 0x00DB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -118,48 +119,49 @@ .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 67 (0x43) - .maxstack 6 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, - [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, - [2] int32 z, - [3] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3, - [4] int32 V_4) - .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' + // Code size 83 (0x53) + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_1, + int32 V_2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3, + int32 V_4) IL_0000: ldc.i4.0 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 - .line 6,6 : 17,23 '' 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 - .line 7,7 : 17,30 '' - IL_000e: ldc.i4.0 - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0014: stloc.1 - .line 8,8 : 17,23 '' - IL_0015: ldloc.1 - IL_0016: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_001b: nop - .line 9,9 : 17,32 '' - IL_001c: ldloc.0 - IL_001d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0022: ldloc.1 - IL_0023: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0028: add - IL_0029: stloc.2 - .line 10,10 : 17,25 '' - IL_002a: ldarg.0 - IL_002b: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f2@5::builder@ - IL_0030: stloc.3 - IL_0031: ldloc.2 - IL_0032: stloc.s V_4 - IL_0034: ldloc.s V_4 - IL_0036: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f2@10-1'::.ctor(int32) - IL_003b: tail. - IL_003d: 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_0042: ret + IL_0008: ldloc.0 + IL_0009: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0015: nop + IL_0016: ldc.i4.0 + IL_0017: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_001c: stloc.1 + IL_001d: ldloc.1 + IL_001e: ldloc.1 + IL_001f: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0024: ldc.i4.1 + IL_0025: add + IL_0026: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_002b: nop + IL_002c: ldloc.0 + IL_002d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0032: ldloc.1 + IL_0033: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0038: add + IL_0039: stloc.2 + IL_003a: ldarg.0 + IL_003b: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f2@5::builder@ + IL_0040: stloc.3 + IL_0041: ldloc.2 + IL_0042: stloc.s V_4 + IL_0044: ldloc.s V_4 + IL_0046: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f2@10-1'::.ctor(int32) + IL_004b: tail. + IL_004d: 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_0052: ret } // end of method f2@5::Invoke } // end of class f2@5 @@ -239,24 +241,21 @@ { // Code size 46 (0x2e) .maxstack 6 - .locals init ([0] int32 x4, - [1] int32 z, - [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, - [3] int32 V_3) - .line 100001,100001 : 0,0 '' + .locals init (int32 V_0, + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + int32 V_3) IL_0000: ldarg.1 IL_0001: stloc.0 - .line 19,19 : 17,37 '' IL_0002: ldarg.0 IL_0003: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::x1 IL_0008: ldarg.0 IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::y - IL_000e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000e: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() IL_0013: add IL_0014: ldloc.0 IL_0015: add IL_0016: stloc.1 - .line 20,20 : 17,25 '' IL_0017: ldarg.0 IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::builder@ IL_001d: stloc.2 @@ -350,46 +349,46 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg3) cil managed { - // Code size 65 (0x41) + // Code size 73 (0x49) .maxstack 7 - .locals init ([0] int32 x3, - [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, - [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 100001,100001 : 0,0 '' + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_4) IL_0000: ldarg.1 IL_0001: stloc.0 - .line 16,16 : 17,30 '' IL_0002: ldc.i4.0 IL_0003: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0008: stloc.1 - .line 17,17 : 17,23 '' IL_0009: ldloc.1 - IL_000a: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_000f: nop - .line 18,18 : 17,31 '' - IL_0010: ldarg.0 - IL_0011: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::builder@ - IL_0016: stloc.2 - IL_0017: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() - IL_001c: stloc.3 - IL_001d: ldarg.0 - IL_001e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::builder@ - IL_0023: ldarg.0 - IL_0024: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::x1 - IL_0029: ldloc.1 - IL_002a: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + IL_000a: ldloc.1 + IL_000b: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0010: ldc.i4.1 + IL_0011: add + IL_0012: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0017: nop + IL_0018: ldarg.0 + IL_0019: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::builder@ + IL_001e: stloc.2 + IL_001f: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() + IL_0024: stloc.3 + IL_0025: ldarg.0 + IL_0026: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::builder@ + IL_002b: ldarg.0 + IL_002c: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-3'::x1 + IL_0031: ldloc.1 + IL_0032: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, int32, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_002f: stloc.s V_4 - IL_0031: ldloc.3 - IL_0032: ldloc.s V_4 - IL_0034: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-6'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + IL_0037: stloc.s V_4 + IL_0039: ldloc.3 + IL_003a: ldloc.s V_4 + IL_003c: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-6'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0039: tail. - 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: ret + IL_0041: tail. + IL_0043: 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_0048: ret } // end of method 'f3@16-3'::Invoke } // end of class 'f3@16-3' @@ -475,14 +474,12 @@ { // Code size 48 (0x30) .maxstack 6 - .locals init ([0] int32 x2, - [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 100001,100001 : 0,0 '' + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) IL_0000: ldarg.1 IL_0001: stloc.0 - .line 15,15 : 17,31 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-2'::builder@ IL_0008: stloc.1 @@ -582,14 +579,12 @@ { // Code size 43 (0x2b) .maxstack 6 - .locals init ([0] int32 x1, - [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 100001,100001 : 0,0 '' + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) IL_0000: ldarg.1 IL_0001: stloc.0 - .line 14,14 : 17,31 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-1'::builder@ IL_0008: stloc.1 @@ -688,10 +683,9 @@ { // Code size 40 (0x28) .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.Core.FSharpFunc`2> V_2) - .line 13,13 : 17,31 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f3@13::builder@ IL_0006: stloc.0 @@ -717,8 +711,7 @@ { // Code size 21 (0x15) .maxstack 4 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - .line 5,5 : 9,14 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -734,8 +727,7 @@ { // Code size 21 (0x15) .maxstack 4 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - .line 13,13 : 9,14 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -762,12 +754,10 @@ { // Code size 18 (0x12) .maxstack 5 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 'Pipe #1 input at line 22', - [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) - .line 22,22 : 13,17 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f3() IL_0005: stloc.0 - .line 22,22 : 21,43 '' IL_0006: ldloc.0 IL_0007: stloc.1 IL_0008: ldloc.1 @@ -786,3 +776,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\AsyncExpressionStepping\AsyncExpressionSteppingTest6_fs\AsyncExpressionSteppingTest6.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs new file mode 100644 index 00000000000..a650d9f215a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs @@ -0,0 +1,30 @@ +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module AttributeTargets = + + let verifyCompilation compilation = + compilation + |> asFs + |> withOptions [ "--test:EmitFeeFeeAs100001" ] + |> withNoOptimize + |> withEmbeddedPdb + |> withEmbedAllSource + |> ignoreWarnings + |> verifyBaseline + |> verifyILBaseline + + [] + let ``Default_fs`` compilation = + verifyCompilation compilation + + [] + let ``Field_fs`` compilation = + verifyCompilation compilation + + [] + let ``Property_fs`` compilation = + verifyCompilation compilation diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.il.debug.bsl new file mode 100644 index 00000000000..d4e92d150ff --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.il.debug.bsl @@ -0,0 +1,125 @@ + + + + + + +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 6:0:0:0 +} +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.module assembly.dll + +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed M + extends [runtime]System.Object +{ + .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 ) + .class auto ansi serializable nested public ExportAttribute + extends [runtime]System.Attribute + { + .custom instance void [runtime]System.AttributeUsageAttribute::.ctor(valuetype [runtime]System.AttributeTargets) = ( 01 00 80 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + + } + + .method public specialname static int32 + get_T() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$M::T@12 + IL_0005: ret + } + + .property int32 T() + { + .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 M::get_T() + } +} + +.class private abstract auto ansi sealed ''.$M + extends [runtime]System.Object +{ + .field static assembly initonly int32 T@12 + .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static + void .cctor() cil managed + { + + .maxstack 4 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop + IL_0011: ldc.i4.1 + IL_0012: dup + IL_0013: stsfld int32 ''.$M::T@12 + IL_0018: stloc.0 + IL_0019: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.il.release.bsl new file mode 100644 index 00000000000..29593702143 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.il.release.bsl @@ -0,0 +1,125 @@ + + + + + + +.assembly extern System.Runtime +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 6:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 6:0:0:0 +} +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.module assembly.dll + +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed M + extends [runtime]System.Object +{ + .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 ) + .class auto ansi serializable nested public ExportAttribute + extends [runtime]System.Attribute + { + .custom instance void [runtime]System.AttributeUsageAttribute::.ctor(valuetype [runtime]System.AttributeTargets) = ( 01 00 80 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + + } + + .method public specialname static int32 + get_T() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$M::T@12 + IL_0005: ret + } + + .property int32 T() + { + .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 M::get_T() + } +} + +.class private abstract auto ansi sealed ''.$M + extends [runtime]System.Object +{ + .field static assembly initonly int32 T@12 + .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static + void .cctor() cil managed + { + + .maxstack 4 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop + IL_0011: ldc.i4.1 + IL_0012: dup + IL_0013: stsfld int32 ''.$M::T@12 + IL_0018: stloc.0 + IL_0019: ret + } + +} + + + + + + diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.il.debug.bsl new file mode 100644 index 00000000000..df46a81be8f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.il.debug.bsl @@ -0,0 +1,124 @@ + + + + + + +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 6:0:0:0 +} +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.module assembly.dll + +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed M + extends [runtime]System.Object +{ + .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 ) + .class auto ansi serializable nested public ExportAttribute + extends [runtime]System.Attribute + { + .custom instance void [runtime]System.AttributeUsageAttribute::.ctor(valuetype [runtime]System.AttributeTargets) = ( 01 00 80 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + + } + + .method public specialname static int32 + get_T() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$M::T@12 + IL_0005: ret + } + + .property int32 T() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 M::get_T() + } +} + +.class private abstract auto ansi sealed ''.$M + extends [runtime]System.Object +{ + .field static assembly initonly int32 T@12 + .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static + void .cctor() cil managed + { + + .maxstack 4 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop + IL_0011: ldc.i4.1 + IL_0012: dup + IL_0013: stsfld int32 ''.$M::T@12 + IL_0018: stloc.0 + IL_0019: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.il.release.bsl new file mode 100644 index 00000000000..47ff2492e42 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.il.release.bsl @@ -0,0 +1,124 @@ + + + + + + +.assembly extern System.Runtime +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 6:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 6:0:0:0 +} +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.module assembly.dll + +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed M + extends [runtime]System.Object +{ + .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 ) + .class auto ansi serializable nested public ExportAttribute + extends [runtime]System.Attribute + { + .custom instance void [runtime]System.AttributeUsageAttribute::.ctor(valuetype [runtime]System.AttributeTargets) = ( 01 00 80 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + + } + + .method public specialname static int32 + get_T() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$M::T@12 + IL_0005: ret + } + + .property int32 T() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 M::get_T() + } +} + +.class private abstract auto ansi sealed ''.$M + extends [runtime]System.Object +{ + .field static assembly initonly int32 T@12 + .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static + void .cctor() cil managed + { + + .maxstack 4 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop + IL_0011: ldc.i4.1 + IL_0012: dup + IL_0013: stsfld int32 ''.$M::T@12 + IL_0018: stloc.0 + IL_0019: ret + } + +} + + + + + + diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.il.debug.bsl new file mode 100644 index 00000000000..555f2aed928 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.il.debug.bsl @@ -0,0 +1,124 @@ + + + + + + +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 6:0:0:0 +} +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.module assembly.dll + +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed M + extends [runtime]System.Object +{ + .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 ) + .class auto ansi serializable nested public ExportAttribute + extends [runtime]System.Attribute + { + .custom instance void [runtime]System.AttributeUsageAttribute::.ctor(valuetype [runtime]System.AttributeTargets) = ( 01 00 80 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + + } + + .method public specialname static int32 + get_T() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$M::T@12 + IL_0005: ret + } + + .property int32 T() + { + .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 M::get_T() + } +} + +.class private abstract auto ansi sealed ''.$M + extends [runtime]System.Object +{ + .field static assembly initonly int32 T@12 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static + void .cctor() cil managed + { + + .maxstack 4 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop + IL_0011: ldc.i4.1 + IL_0012: dup + IL_0013: stsfld int32 ''.$M::T@12 + IL_0018: stloc.0 + IL_0019: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.il.release.bsl new file mode 100644 index 00000000000..8af0223d739 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.il.release.bsl @@ -0,0 +1,124 @@ + + + + + + +.assembly extern System.Runtime +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 6:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 6:0:0:0 +} +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.module assembly.dll + +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed M + extends [runtime]System.Object +{ + .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 ) + .class auto ansi serializable nested public ExportAttribute + extends [runtime]System.Attribute + { + .custom instance void [runtime]System.AttributeUsageAttribute::.ctor(valuetype [runtime]System.AttributeTargets) = ( 01 00 80 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + + } + + .method public specialname static int32 + get_T() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$M::T@12 + IL_0005: ret + } + + .property int32 T() + { + .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 M::get_T() + } +} + +.class private abstract auto ansi sealed ''.$M + extends [runtime]System.Object +{ + .field static assembly initonly int32 T@12 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static + void .cctor() cil managed + { + + .maxstack 4 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop + IL_0011: ldc.i4.1 + IL_0012: dup + IL_0013: stsfld int32 ''.$M::T@12 + IL_0018: stloc.0 + IL_0019: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs new file mode 100644 index 00000000000..63014121e81 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs @@ -0,0 +1,46 @@ +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module CCtorDUWithMember = + + let verifyCompilation compilation = + compilation + |> withOptions [ "--test:EmitFeeFeeAs100001" ] + |> asExe + |> withNoOptimize + |> withEmbeddedPdb + |> withEmbedAllSource + |> ignoreWarnings + |> verifyBaseline + |> verifyILBaseline + + [] + let ``CCtorDUWithMember01a_fs`` compilation = + compilation + |> asFs + |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember01.fs")) + |> verifyCompilation + + [] + let ``CCtorDUWithMember02a_fs`` compilation = + compilation + |> asFs + |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember02.fs")) + |> verifyCompilation + + [] + let ``CCtorDUWithMember03a_fs`` compilation = + compilation + |> asFs + |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember03.fs")) + |> verifyCompilation + + [] + let ``CCtorDUWithMember04a_fs`` compilation = + compilation + |> asFs + |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember04.fs")) + |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.fs new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.il.bsl similarity index 79% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.il.bsl index 8503e1b52d6..5c7b6e8b573 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -15,34 +14,36 @@ .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 6:0:0:0 } -.assembly CCtorDUWithMember01 +.assembly CCtorDUWithMember01a { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, int32, int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } -.mresource public FSharpSignatureData.CCtorDUWithMember01 +.mresource public FSharpSignatureData.CCtorDUWithMember01a { - // Offset: 0x00000000 Length: 0x0000077A + // Offset: 0x00000000 Length: 0x000007EE + // WARNING: managed resource file FSharpSignatureData.CCtorDUWithMember01a created } -.mresource public FSharpOptimizationData.CCtorDUWithMember01 +.mresource public FSharpOptimizationData.CCtorDUWithMember01a { - // Offset: 0x00000780 Length: 0x00000227 + // Offset: 0x000007F8 Length: 0x00000228 + // WARNING: managed resource file FSharpOptimizationData.CCtorDUWithMember01a created } -.module CCtorDUWithMember01.exe -// MVID: {6220E156-26F1-14EE-A745-038356E12062} +.module CCtorDUWithMember01a.exe +// MVID: {62442376-6E33-4ECE-A745-038376234462} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x050C0000 +// Image base: 0x00D00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,37 +54,18 @@ .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 ) } // end of class CCtorDUWithMember01 -.class private abstract auto ansi sealed ''.$CCtorDUWithMember01 +.class private abstract auto ansi sealed ''.$CCtorDUWithMember01 extends [mscorlib]System.Object { - .field static assembly int32 init@ - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .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 public static void main@() cil managed { .entrypoint - // Code size 53 (0x35) + // Code size 1 (0x1) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .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,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) - IL_0029: call class CCtorDUWithMember01a/C CCtorDUWithMember01a::get_e2() - IL_002e: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0033: pop - IL_0034: ret + IL_0000: ret } // end of method $CCtorDUWithMember01::main@ -} // end of class ''.$CCtorDUWithMember01 +} // end of class ''.$CCtorDUWithMember01 .class public abstract auto ansi sealed CCtorDUWithMember01a extends [mscorlib]System.Object @@ -245,51 +227,41 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 39 (0x27) .maxstack 4 - .locals init ([0] int32 V_0, - [1] int32 V_1) - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember01a.fs' + .locals init (int32 V_0, + int32 V_1) IL_0000: ldarg.0 IL_0001: brfalse.s IL_0020 - .line 100001,100001 : 0,0 '' IL_0003: ldarg.1 IL_0004: brfalse.s IL_001e - .line 100001,100001 : 0,0 '' IL_0006: ldarg.0 IL_0007: ldfld int32 CCtorDUWithMember01a/C::_tag IL_000c: stloc.0 IL_000d: ldarg.1 IL_000e: ldfld int32 CCtorDUWithMember01a/C::_tag IL_0013: stloc.1 - .line 100001,100001 : 0,0 '' IL_0014: ldloc.0 IL_0015: ldloc.1 IL_0016: bne.un.s IL_001a - .line 100001,100001 : 0,0 '' IL_0018: ldc.i4.0 IL_0019: ret - .line 100001,100001 : 0,0 '' IL_001a: ldloc.0 IL_001b: ldloc.1 IL_001c: sub IL_001d: ret - .line 100001,100001 : 0,0 '' IL_001e: ldc.i4.1 IL_001f: ret - .line 100001,100001 : 0,0 '' IL_0020: ldarg.1 IL_0021: brfalse.s IL_0025 - .line 100001,100001 : 0,0 '' IL_0023: ldc.i4.m1 IL_0024: ret - .line 100001,100001 : 0,0 '' IL_0025: ldc.i4.0 IL_0026: ret } // end of method C::CompareTo @@ -314,58 +286,47 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 56 (0x38) .maxstack 4 - .locals init ([0] class CCtorDUWithMember01a/C V_0, - [1] int32 V_1, - [2] int32 V_2) - .line 100001,100001 : 0,0 '' + .locals init (class CCtorDUWithMember01a/C V_0, + int32 V_1, + int32 V_2) IL_0000: ldarg.1 IL_0001: unbox.any CCtorDUWithMember01a/C IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: brfalse.s IL_002c - .line 100001,100001 : 0,0 '' IL_000a: ldarg.1 IL_000b: unbox.any CCtorDUWithMember01a/C IL_0010: brfalse.s IL_002a - .line 100001,100001 : 0,0 '' IL_0012: ldarg.0 IL_0013: ldfld int32 CCtorDUWithMember01a/C::_tag IL_0018: stloc.1 IL_0019: ldloc.0 IL_001a: ldfld int32 CCtorDUWithMember01a/C::_tag IL_001f: stloc.2 - .line 100001,100001 : 0,0 '' IL_0020: ldloc.1 IL_0021: ldloc.2 IL_0022: bne.un.s IL_0026 - .line 100001,100001 : 0,0 '' IL_0024: ldc.i4.0 IL_0025: ret - .line 100001,100001 : 0,0 '' IL_0026: ldloc.1 IL_0027: ldloc.2 IL_0028: sub IL_0029: ret - .line 100001,100001 : 0,0 '' IL_002a: ldc.i4.1 IL_002b: ret - .line 100001,100001 : 0,0 '' IL_002c: ldarg.1 IL_002d: unbox.any CCtorDUWithMember01a/C IL_0032: brfalse.s IL_0036 - .line 100001,100001 : 0,0 '' IL_0034: ldc.i4.m1 IL_0035: ret - .line 100001,100001 : 0,0 '' IL_0036: ldc.i4.0 IL_0037: ret } // end of method C::CompareTo @@ -376,19 +337,16 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 3 - .locals init ([0] int32 V_0) - .line 100001,100001 : 0,0 '' + .locals init (int32 V_0) IL_0000: ldarg.0 IL_0001: brfalse.s IL_000c - .line 100001,100001 : 0,0 '' IL_0003: ldc.i4.0 IL_0004: stloc.0 IL_0005: ldarg.0 IL_0006: ldfld int32 CCtorDUWithMember01a/C::_tag IL_000b: ret - .line 100001,100001 : 0,0 '' IL_000c: ldc.i4.0 IL_000d: ret } // end of method C::GetHashCode @@ -412,23 +370,19 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 44 (0x2c) .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 100001,100001 : 0,0 '' + .locals init (class CCtorDUWithMember01a/C V_0, + class CCtorDUWithMember01a/C V_1, + int32 V_2, + int32 V_3) IL_0000: ldarg.0 IL_0001: brfalse.s IL_0024 - .line 100001,100001 : 0,0 '' IL_0003: ldarg.1 IL_0004: isinst CCtorDUWithMember01a/C IL_0009: stloc.0 - .line 100001,100001 : 0,0 '' IL_000a: ldloc.0 IL_000b: brfalse.s IL_0022 - .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 IL_000e: stloc.1 IL_000f: ldarg.0 @@ -437,17 +391,14 @@ IL_0016: ldloc.1 IL_0017: ldfld int32 CCtorDUWithMember01a/C::_tag IL_001c: stloc.3 - .line 100001,100001 : 0,0 '' IL_001d: ldloc.2 IL_001e: ldloc.3 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 @@ -461,11 +412,9 @@ { // Code size 4 (0x4) .maxstack 3 - .locals init ([0] class CCtorDUWithMember01a/C x) - .line 100001,100001 : 0,0 '' + .locals init (class CCtorDUWithMember01a/C V_0) IL_0000: ldarg.0 IL_0001: stloc.0 - .line 6,6 : 18,19 '' IL_0002: ldc.i4.1 IL_0003: ret } // end of method C::get_P @@ -476,34 +425,28 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 35 (0x23) .maxstack 4 - .locals init ([0] int32 V_0, - [1] int32 V_1) - .line 100001,100001 : 0,0 '' + .locals init (int32 V_0, + int32 V_1) IL_0000: ldarg.0 IL_0001: brfalse.s IL_001b - .line 100001,100001 : 0,0 '' IL_0003: ldarg.1 IL_0004: brfalse.s IL_0019 - .line 100001,100001 : 0,0 '' IL_0006: ldarg.0 IL_0007: ldfld int32 CCtorDUWithMember01a/C::_tag IL_000c: stloc.0 IL_000d: ldarg.1 IL_000e: ldfld int32 CCtorDUWithMember01a/C::_tag IL_0013: stloc.1 - .line 100001,100001 : 0,0 '' IL_0014: ldloc.0 IL_0015: ldloc.1 IL_0016: ceq IL_0018: ret - .line 100001,100001 : 0,0 '' IL_0019: ldc.i4.0 IL_001a: ret - .line 100001,100001 : 0,0 '' IL_001b: ldarg.1 IL_001c: ldnull IL_001d: cgt.un @@ -518,22 +461,18 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 20 (0x14) .maxstack 4 - .locals init ([0] class CCtorDUWithMember01a/C V_0) - .line 100001,100001 : 0,0 '' + .locals init (class CCtorDUWithMember01a/C V_0) IL_0000: ldarg.1 IL_0001: isinst CCtorDUWithMember01a/C IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 - .line 100001,100001 : 0,0 '' IL_000a: ldarg.0 IL_000b: ldloc.0 IL_000c: callvirt instance bool CCtorDUWithMember01a/C::Equals(class CCtorDUWithMember01a/C) IL_0011: ret - .line 100001,100001 : 0,0 '' IL_0012: ldc.i4.0 IL_0013: ret } // end of method C::Equals @@ -598,7 +537,7 @@ } // end of property CCtorDUWithMember01a::e2 } // end of class CCtorDUWithMember01a -.class private abstract auto ansi sealed ''.$CCtorDUWithMember01a +.class private abstract auto ansi sealed ''.$CCtorDUWithMember01a extends [mscorlib]System.Object { .field static assembly int32 init@ @@ -610,16 +549,16 @@ { // Code size 7 (0x7) .maxstack 3 - .locals init ([0] class CCtorDUWithMember01a/C e2) - .line 8,8 : 1,13 '' + .locals init (class CCtorDUWithMember01a/C V_0) IL_0000: call class CCtorDUWithMember01a/C CCtorDUWithMember01a::get_e2() IL_0005: stloc.0 IL_0006: ret } // end of method $CCtorDUWithMember01a::.cctor -} // end of class ''.$CCtorDUWithMember01a +} // end of class ''.$CCtorDUWithMember01a // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\CCtorDUWithMember\CCtorDUWithMember01a_fs\CCtorDUWithMember01a.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.fs new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.il.bsl similarity index 72% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.il.bsl index 8d2ee1bc997..a8f4a96fe87 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -15,34 +14,36 @@ .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 6:0:0:0 } -.assembly CCtorDUWithMember02 +.assembly CCtorDUWithMember02a { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, int32, int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } -.mresource public FSharpSignatureData.CCtorDUWithMember02 +.mresource public FSharpSignatureData.CCtorDUWithMember02a { - // Offset: 0x00000000 Length: 0x00000302 + // Offset: 0x00000000 Length: 0x00000342 + // WARNING: managed resource file FSharpSignatureData.CCtorDUWithMember02a created } -.mresource public FSharpOptimizationData.CCtorDUWithMember02 +.mresource public FSharpOptimizationData.CCtorDUWithMember02a { - // Offset: 0x00000308 Length: 0x000000E4 + // Offset: 0x00000348 Length: 0x000000E5 + // WARNING: managed resource file FSharpOptimizationData.CCtorDUWithMember02a created } -.module CCtorDUWithMember02.exe -// MVID: {61E07031-D176-C99D-A745-03833170E061} +.module CCtorDUWithMember02a.exe +// MVID: {62441EFB-2F82-BE2F-A745-0383FB1E4462} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06750000 +// Image base: 0x00D70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,30 +54,18 @@ .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 ) } // end of class CCtorDUWithMember02 -.class private abstract auto ansi sealed ''.$CCtorDUWithMember02 +.class private abstract auto ansi sealed ''.$CCtorDUWithMember02 extends [mscorlib]System.Object { - .field static assembly int32 init@ - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .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 public static void main@() cil managed { .entrypoint - // Code size 27 (0x1b) + // Code size 1 (0x1) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .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) - IL_000f: call int32 CCtorDUWithMember02a::get_y() - IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0019: pop - IL_001a: ret + IL_0000: ret } // end of method $CCtorDUWithMember02::main@ -} // end of class ''.$CCtorDUWithMember02 +} // end of class ''.$CCtorDUWithMember02 .class public abstract auto ansi sealed CCtorDUWithMember02a extends [mscorlib]System.Object @@ -91,7 +80,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld int32 ''.$CCtorDUWithMember02a::x@7 + IL_0000: ldsfld int32 ''.$CCtorDUWithMember02a::x@7 IL_0005: ret } // end of method M::get_x @@ -101,7 +90,7 @@ // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 - IL_0001: stsfld int32 ''.$CCtorDUWithMember02a::x@7 + IL_0001: stsfld int32 ''.$CCtorDUWithMember02a::x@7 IL_0006: ret } // end of method M::set_x @@ -118,7 +107,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld int32 ''.$CCtorDUWithMember02a::y@9 + IL_0000: ldsfld int32 ''.$CCtorDUWithMember02a::y@9 IL_0005: ret } // end of method CCtorDUWithMember02a::get_y @@ -129,7 +118,7 @@ } // end of property CCtorDUWithMember02a::y } // end of class CCtorDUWithMember02a -.class private abstract auto ansi sealed ''.$CCtorDUWithMember02a +.class private abstract auto ansi sealed ''.$CCtorDUWithMember02a extends [mscorlib]System.Object { .field static assembly int32 x@7 @@ -145,39 +134,34 @@ { // Code size 77 (0x4d) .maxstack 4 - .locals init ([0] int32 y) - .line 3,3 : 1,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember02a.fs' + .locals init (int32 V_0) IL_0000: ldstr "hello1" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: pop - .line 6,6 : 5,21 '' IL_0010: ldstr "hello2" IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_001f: pop - .line 7,7 : 5,33 '' IL_0020: ldstr "1" IL_0025: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_002a: stsfld int32 ''.$CCtorDUWithMember02a::x@7 - .line 9,9 : 1,32 '' + IL_002a: stsfld int32 ''.$CCtorDUWithMember02a::x@7 IL_002f: nop - .line 9,9 : 10,26 '' IL_0030: ldstr "hello3" 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 - .line 9,9 : 28,31 '' IL_0040: call int32 CCtorDUWithMember02a/M::get_x() IL_0045: dup - IL_0046: stsfld int32 ''.$CCtorDUWithMember02a::y@9 + IL_0046: stsfld int32 ''.$CCtorDUWithMember02a::y@9 IL_004b: stloc.0 IL_004c: ret } // end of method $CCtorDUWithMember02a::.cctor -} // end of class ''.$CCtorDUWithMember02a +} // end of class ''.$CCtorDUWithMember02a // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\CCtorDUWithMember\CCtorDUWithMember02a_fs\CCtorDUWithMember02a.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.fs new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.il.bsl similarity index 59% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.il.bsl index 540d2b297fd..e6519ea0b4f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -15,34 +14,36 @@ .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 6:0:0:0 } -.assembly CCtorDUWithMember03 +.assembly CCtorDUWithMember03a { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, int32, int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } -.mresource public FSharpSignatureData.CCtorDUWithMember03 +.mresource public FSharpSignatureData.CCtorDUWithMember03a { - // Offset: 0x00000000 Length: 0x00000293 + // Offset: 0x00000000 Length: 0x000002D3 + // WARNING: managed resource file FSharpSignatureData.CCtorDUWithMember03a created } -.mresource public FSharpOptimizationData.CCtorDUWithMember03 +.mresource public FSharpOptimizationData.CCtorDUWithMember03a { - // Offset: 0x00000298 Length: 0x000000B2 + // Offset: 0x000002D8 Length: 0x000000B3 + // WARNING: managed resource file FSharpOptimizationData.CCtorDUWithMember03a created } -.module CCtorDUWithMember03.exe -// MVID: {61E07031-C97B-D207-A745-03833170E061} +.module CCtorDUWithMember03a.exe +// MVID: {62441EFB-10BD-0BE8-A745-0383FB1E4462} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x09130000 +// Image base: 0x05470000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,30 +54,18 @@ .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 ) } // end of class CCtorDUWithMember03 -.class private abstract auto ansi sealed ''.$CCtorDUWithMember03 +.class private abstract auto ansi sealed ''.$CCtorDUWithMember03 extends [mscorlib]System.Object { - .field static assembly int32 init@ - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .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 public static void main@() cil managed { .entrypoint - // Code size 27 (0x1b) + // Code size 1 (0x1) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .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) - IL_000f: call int32 CCtorDUWithMember03a::get_x() - IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0019: pop - IL_001a: ret + IL_0000: ret } // end of method $CCtorDUWithMember03::main@ -} // end of class ''.$CCtorDUWithMember03 +} // end of class ''.$CCtorDUWithMember03 .class public abstract auto ansi sealed CCtorDUWithMember03a extends [mscorlib]System.Object @@ -87,7 +76,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld int32 ''.$CCtorDUWithMember03a::x@3 + IL_0000: ldsfld int32 ''.$CCtorDUWithMember03a::x@3 IL_0005: ret } // end of method CCtorDUWithMember03a::get_x @@ -97,7 +86,7 @@ // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 - IL_0001: stsfld int32 ''.$CCtorDUWithMember03a::x@3 + IL_0001: stsfld int32 ''.$CCtorDUWithMember03a::x@3 IL_0006: ret } // end of method CCtorDUWithMember03a::set_x @@ -109,7 +98,7 @@ } // end of property CCtorDUWithMember03a::x } // end of class CCtorDUWithMember03a -.class private abstract auto ansi sealed ''.$CCtorDUWithMember03a +.class private abstract auto ansi sealed ''.$CCtorDUWithMember03a extends [mscorlib]System.Object { .field static assembly int32 x@3 @@ -123,15 +112,15 @@ { // Code size 7 (0x7) .maxstack 8 - .line 3,3 : 1,18 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember03a.fs' IL_0000: ldc.i4.1 - IL_0001: stsfld int32 ''.$CCtorDUWithMember03a::x@3 + IL_0001: stsfld int32 ''.$CCtorDUWithMember03a::x@3 IL_0006: ret } // end of method $CCtorDUWithMember03a::.cctor -} // end of class ''.$CCtorDUWithMember03a +} // end of class ''.$CCtorDUWithMember03a // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\CCtorDUWithMember\CCtorDUWithMember03a_fs\CCtorDUWithMember03a.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.fs similarity index 85% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.fs index bdf676085b1..41bce046054 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.fs @@ -1,2 +1,3 @@ // #NoMono #NoMT #CodeGen #EmittedIL #Unions +module Program printfn "File1.x = %A" CCtorDUWithMember04a.x diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.il.bsl similarity index 78% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.il.bsl index ef407e0a161..f29c596412b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -15,45 +14,47 @@ .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 6:0:0:0 } -.assembly CCtorDUWithMember04 +.assembly CCtorDUWithMember04a { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, int32, int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } -.mresource public FSharpSignatureData.CCtorDUWithMember04 +.mresource public FSharpSignatureData.CCtorDUWithMember04a { - // Offset: 0x00000000 Length: 0x00000293 + // Offset: 0x00000000 Length: 0x000002FB + // WARNING: managed resource file FSharpSignatureData.CCtorDUWithMember04a created } -.mresource public FSharpOptimizationData.CCtorDUWithMember04 +.mresource public FSharpOptimizationData.CCtorDUWithMember04a { - // Offset: 0x00000298 Length: 0x000000B2 + // Offset: 0x00000300 Length: 0x000000A7 + // WARNING: managed resource file FSharpOptimizationData.CCtorDUWithMember04a created } -.module CCtorDUWithMember04.exe -// MVID: {61E07031-CF28-717B-A745-03833170E061} +.module CCtorDUWithMember04a.exe +// MVID: {62441BC0-1BBC-A5C0-A745-0383C01B4462} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06910000 +// Image base: 0x02FC0000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed CCtorDUWithMember04 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) -} // end of class CCtorDUWithMember04 +} // end of class Program -.class private abstract auto ansi sealed ''.$CCtorDUWithMember04 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .field static assembly int32 init@ @@ -65,8 +66,6 @@ .entrypoint // 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,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) @@ -74,9 +73,9 @@ IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0019: pop IL_001a: ret - } // end of method $CCtorDUWithMember04::main@ + } // end of method $Program::main@ -} // end of class ''.$CCtorDUWithMember04 +} // end of class ''.$Program .class public abstract auto ansi sealed CCtorDUWithMember04a extends [mscorlib]System.Object @@ -99,7 +98,7 @@ } // end of property CCtorDUWithMember04a::x } // end of class CCtorDUWithMember04a -.class private abstract auto ansi sealed ''.$CCtorDUWithMember04a +.class private abstract auto ansi sealed ''.$CCtorDUWithMember04a extends [mscorlib]System.Object { .field static assembly int32 init@ @@ -111,16 +110,16 @@ { // Code size 7 (0x7) .maxstack 3 - .locals init ([0] int32 x) - .line 3,3 : 1,10 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember04a.fs' + .locals init (int32 V_0) IL_0000: call int32 CCtorDUWithMember04a::get_x() IL_0005: stloc.0 IL_0006: ret } // end of method $CCtorDUWithMember04a::.cctor -} // end of class ''.$CCtorDUWithMember04a +} // end of class ''.$CCtorDUWithMember04a // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\CCtorDUWithMember\CCtorDUWithMember04a_fs\CCtorDUWithMember04a.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs new file mode 100644 index 00000000000..3af2f1ec758 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs @@ -0,0 +1,51 @@ +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module CompiledNameAttribute = + + let verifyCompilation compilation = + compilation + |> asFs + |> withOptions [ "--test:EmitFeeFeeAs100001" ] + |> asExe + |> withNoOptimize + |> withEmbeddedPdb + |> withEmbedAllSource + |> ignoreWarnings + |> verifyBaseline + |> verifyILBaseline + + [] + let ``CompiledNameAttribute01_fs`` compilation = + compilation + |> verifyCompilation + + [] + let ``CompiledNameAttribute02_fs`` compilation = + compilation + |> verifyCompilation + + [] + let ``CompiledNameAttribute03_fs`` compilation = + compilation + |> verifyCompilation + + [] + let ``CompiledNameAttribute04_fs`` compilation = + compilation + |> verifyCompilation + + [] + let ``CompiledNameAttribute05_fs`` compilation = + compilation + |> asFs + |> asExe + |> withEmbeddedPdb + |> withEmbedAllSource + |> withNoWarn 988 + |> compile + |> shouldSucceed + |> ignore diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs similarity index 93% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs index da460708fc2..06a73b511d7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs @@ -1,4 +1,7 @@ // #NoMono #NoMT #CodeGen #EmittedIL #Attributes // EXPECTED behavior: compile to an assembly where "f" has custom attribute Microsoft.FSharp.Core.CompilationSourceNameAttribute with value "f" + +module Program + [] let f x = x diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs.il.debug.bsl similarity index 69% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs.il.debug.bsl index 0b9f0b91042..6ea28c18ccc 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs.il.debug.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 CompiledNameAttribute01 { @@ -22,32 +21,34 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.CompiledNameAttribute01 { - // Offset: 0x00000000 Length: 0x00000272 + // Offset: 0x00000000 Length: 0x000002BA + // WARNING: managed resource file FSharpSignatureData.CompiledNameAttribute01 created } .mresource public FSharpOptimizationData.CompiledNameAttribute01 { - // Offset: 0x00000278 Length: 0x00000086 + // Offset: 0x000002C0 Length: 0x00000076 + // WARNING: managed resource file FSharpOptimizationData.CompiledNameAttribute01 created } .module CompiledNameAttribute01.exe -// MVID: {59B1923F-EF5A-FC2A-A745-03833F92B159} +// MVID: {62286B41-EF5A-FC2A-A745-0383416B2862} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00ED0000 +// Image base: 0x03360000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed CompiledNameAttribute01 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) @@ -56,15 +57,13 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 01 66 00 00 ) // ...f.. // Code size 2 (0x2) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 4,4 : 11,12 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\CompiledNameAttribute\\CompiledNameAttribute01.fs' IL_0000: ldarg.0 IL_0001: ret - } // end of method CompiledNameAttribute01::SomeCompiledName + } // end of method Program::SomeCompiledName -} // end of class CompiledNameAttribute01 +} // end of class Program -.class private abstract auto ansi sealed ''.$CompiledNameAttribute01 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -73,11 +72,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $CompiledNameAttribute01::main@ + } // end of method $Program::main@ -} // end of class ''.$CompiledNameAttribute01 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\CompiledNameAttribute\CompiledNameAttribute01_fs\CompiledNameAttribute01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs.il.release.bsl new file mode 100644 index 00000000000..1e30bc3c9b3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute01.fs.il.release.bsl @@ -0,0 +1,83 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly CompiledNameAttribute01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.CompiledNameAttribute01 +{ + // Offset: 0x00000000 Length: 0x000002BE + // WARNING: managed resource file FSharpSignatureData.CompiledNameAttribute01 created +} +.mresource public FSharpOptimizationData.CompiledNameAttribute01 +{ + // Offset: 0x000002C8 Length: 0x00000076 + // WARNING: managed resource file FSharpOptimizationData.CompiledNameAttribute01 created +} +.module CompiledNameAttribute01.exe +// MVID: {623F69BA-EF5A-FC2A-A745-0383BA693F62} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x03270000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Program + extends [mscorlib]System.Object +{ + .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 !!a SomeCompiledName(!!a x) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 01 66 00 00 ) // ...f.. + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } // end of method Program::SomeCompiledName + +} // end of class Program + +.class private abstract auto ansi sealed ''.$Program + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $Program::main@ + +} // end of class ''.$Program + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\CompiledNameAttribute\CompiledNameAttribute01_fs\CompiledNameAttribute01.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs similarity index 94% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs index 55d6104e3ee..07a882ab4eb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs @@ -1,5 +1,7 @@ // #NoMono #NoMT #CodeGen #EmittedIL #Attributes // EXPECTED behavior: compile to an assembly where "Method" has custom attribute Microsoft.FSharp.Core.CompilationSourceNameAttribute with value "Method" +module Program + type T = [] member a.Method(x,y) = x + y diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs.il.debug.bsl similarity index 73% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs.il.debug.bsl index cc0468b88a0..363f8fc2540 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs.il.debug.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 CompiledNameAttribute02 { @@ -22,32 +21,34 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.CompiledNameAttribute02 { - // Offset: 0x00000000 Length: 0x000002E4 + // Offset: 0x00000000 Length: 0x00000338 + // WARNING: managed resource file FSharpSignatureData.CompiledNameAttribute02 created } .mresource public FSharpOptimizationData.CompiledNameAttribute02 { - // Offset: 0x000002E8 Length: 0x000000CD + // Offset: 0x00000340 Length: 0x000000BD + // WARNING: managed resource file FSharpOptimizationData.CompiledNameAttribute02 created } .module CompiledNameAttribute02.exe -// MVID: {6124062C-F755-F3C0-A745-03832C062461} +// MVID: {62286C21-F755-F3C0-A745-0383216C2862} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A90000 +// Image base: 0x036B0000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed CompiledNameAttribute02 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) @@ -62,12 +63,9 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 06 4D 65 74 68 6F 64 00 00 ) // ...Method.. // Code size 6 (0x6) .maxstack 4 - .locals init ([0] class CompiledNameAttribute02/T a) - .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\\CompiledNameAttribute\\CompiledNameAttribute02.fs' + .locals init (class Program/T V_0) IL_0000: ldarg.0 IL_0001: stloc.0 - .line 5,5 : 34,39 '' IL_0002: ldarg.1 IL_0003: ldarg.2 IL_0004: add @@ -76,9 +74,9 @@ } // end of class T -} // end of class CompiledNameAttribute02 +} // end of class Program -.class private abstract auto ansi sealed ''.$CompiledNameAttribute02 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -87,11 +85,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $CompiledNameAttribute02::main@ + } // end of method $Program::main@ -} // end of class ''.$CompiledNameAttribute02 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\CompiledNameAttribute\CompiledNameAttribute02_fs\CompiledNameAttribute02.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs.il.release.bsl new file mode 100644 index 00000000000..ddf5d0f124b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute02.fs.il.release.bsl @@ -0,0 +1,96 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly CompiledNameAttribute02 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.CompiledNameAttribute02 +{ + // Offset: 0x00000000 Length: 0x0000033C + // WARNING: managed resource file FSharpSignatureData.CompiledNameAttribute02 created +} +.mresource public FSharpOptimizationData.CompiledNameAttribute02 +{ + // Offset: 0x00000340 Length: 0x000000BD + // WARNING: managed resource file FSharpOptimizationData.CompiledNameAttribute02 created +} +.module CompiledNameAttribute02.exe +// MVID: {6228DDFE-F755-F3C0-A745-0383FEDD2862} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x03A10000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Program + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable nested public T + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig instance int32 + SomeCompiledName(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 06 4D 65 74 68 6F 64 00 00 ) // ...Method.. + // Code size 6 (0x6) + .maxstack 4 + .locals init (class Program/T V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.1 + IL_0003: ldarg.2 + IL_0004: add + IL_0005: ret + } // end of method T::SomeCompiledName + + } // end of class T + +} // end of class Program + +.class private abstract auto ansi sealed ''.$Program + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $Program::main@ + +} // end of class ''.$Program + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\CompiledNameAttribute\CompiledNameAttribute02_fs\CompiledNameAttribute02.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs similarity index 93% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs index b3d792bbe3c..74758e3dbdd 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs @@ -1,4 +1,7 @@ // #NoMono #NoMT #CodeGen #EmittedIL #Attributes // EXPECTED behavior: compile to an assembly where "f" has custom attribute Microsoft.FSharp.Core.CompilationSourceNameAttribute with value "f" + +module Program + [] let rec f x = f ( x - 1) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs.il.debug.bsl similarity index 70% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs.il.debug.bsl index 228aa3dd3bb..78b0de8e016 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs.il.debug.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 CompiledNameAttribute03 { @@ -22,32 +21,34 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.CompiledNameAttribute03 { - // Offset: 0x00000000 Length: 0x0000027D + // Offset: 0x00000000 Length: 0x000002C5 + // WARNING: managed resource file FSharpSignatureData.CompiledNameAttribute03 created } .mresource public FSharpOptimizationData.CompiledNameAttribute03 { - // Offset: 0x00000288 Length: 0x00000086 + // Offset: 0x000002D0 Length: 0x00000076 + // WARNING: managed resource file FSharpOptimizationData.CompiledNameAttribute03 created } .module CompiledNameAttribute03.exe -// MVID: {59B1923F-2CE4-60B9-A745-03833F92B159} +// MVID: {62286C21-2CE4-60B9-A745-0383216C2862} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x03120000 +// Image base: 0x00A90000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed CompiledNameAttribute03 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) @@ -56,18 +57,16 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 01 66 00 00 ) // ...f.. // Code size 7 (0x7) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 4,4 : 15,25 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\CompiledNameAttribute\\CompiledNameAttribute03.fs' IL_0000: ldarg.0 IL_0001: ldc.i4.1 IL_0002: sub IL_0003: starg.s x IL_0005: br.s IL_0000 - } // end of method CompiledNameAttribute03::SomeCompiledName + } // end of method Program::SomeCompiledName -} // end of class CompiledNameAttribute03 +} // end of class Program -.class private abstract auto ansi sealed ''.$CompiledNameAttribute03 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -76,11 +75,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $CompiledNameAttribute03::main@ + } // end of method $Program::main@ -} // end of class ''.$CompiledNameAttribute03 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\CompiledNameAttribute\CompiledNameAttribute03_fs\CompiledNameAttribute03.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs.il.release.bsl new file mode 100644 index 00000000000..f3d48acb29c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute03.fs.il.release.bsl @@ -0,0 +1,86 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly CompiledNameAttribute03 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.CompiledNameAttribute03 +{ + // Offset: 0x00000000 Length: 0x000002C9 + // WARNING: managed resource file FSharpSignatureData.CompiledNameAttribute03 created +} +.mresource public FSharpOptimizationData.CompiledNameAttribute03 +{ + // Offset: 0x000002D0 Length: 0x00000076 + // WARNING: managed resource file FSharpOptimizationData.CompiledNameAttribute03 created +} +.module CompiledNameAttribute03.exe +// MVID: {6228DDFE-2CE4-60B9-A745-0383FEDD2862} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x03830000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Program + extends [mscorlib]System.Object +{ + .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 !!a SomeCompiledName(int32 x) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 01 66 00 00 ) // ...f.. + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.1 + IL_0002: sub + IL_0003: starg.s x + IL_0005: br.s IL_0000 + } // end of method Program::SomeCompiledName + +} // end of class Program + +.class private abstract auto ansi sealed ''.$Program + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $Program::main@ + +} // end of class ''.$Program + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\CompiledNameAttribute\CompiledNameAttribute03_fs\CompiledNameAttribute03.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs similarity index 98% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs index 1c1ecae9649..24c007eee73 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs @@ -7,7 +7,7 @@ // Regression test for FSharp1.0:5684 // Title: We should align generation of IL code for pseudo-custom attributes like PreserveSigAttribute for all language constructs (currently, it is incorrect for object expressions) - +module Program open System open System.Runtime.InteropServices diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.net472.debug.bsl similarity index 75% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.net472.debug.bsl index ff9c17c6517..f166e2eeaeb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.net472.debug.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -22,32 +21,34 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.CompiledNameAttribute04 { - // Offset: 0x00000000 Length: 0x00000CD9 + // Offset: 0x00000000 Length: 0x00000D2D + // WARNING: managed resource file FSharpSignatureData.CompiledNameAttribute04 created } .mresource public FSharpOptimizationData.CompiledNameAttribute04 { - // Offset: 0x00000CE0 Length: 0x000002CB + // Offset: 0x00000D38 Length: 0x000002BB + // WARNING: managed resource file FSharpOptimizationData.CompiledNameAttribute04 created } .module CompiledNameAttribute04.exe -// MVID: {6220CCA3-34DF-584F-A745-0383A3CC2062} +// MVID: {623F5F36-34DF-584F-A745-0383365F3F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07130000 +// Image base: 0x053F0000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed CompiledNameAttribute04 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) @@ -73,8 +74,6 @@ { // 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 @@ -87,7 +86,6 @@ { // Code size 2 (0x2) .maxstack 8 - .line 21,21 : 19,20 '' IL_0000: ldc.i4.1 IL_0001: ret } // end of method C::get_P @@ -99,7 +97,6 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) // Code size 4 (0x4) .maxstack 8 - .line 22,22 : 24,29 '' IL_0000: ldarg.1 IL_0001: ldarg.2 IL_0002: add @@ -111,14 +108,13 @@ { // Code size 2 (0x2) .maxstack 8 - .line 24,24 : 22,23 '' IL_0000: ldarg.1 IL_0001: ret } // end of method C::M2 .property instance int32 P() { - .get instance int32 CompiledNameAttribute04/C::get_P() + .get instance int32 Program/C::get_P() } // end of property C::P } // end of class C @@ -134,9 +130,9 @@ .class sequential ansi serializable sealed nested public S extends [mscorlib]System.ValueType - implements class [mscorlib]System.IEquatable`1, + implements class [mscorlib]System.IEquatable`1, [mscorlib]System.Collections.IStructuralEquatable, - class [mscorlib]System.IComparable`1, + class [mscorlib]System.IComparable`1, [mscorlib]System.IComparable, [mscorlib]System.Collections.IStructuralComparable { @@ -144,12 +140,12 @@ .size 1 .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) .method public hidebysig virtual final - instance int32 CompareTo(valuetype CompiledNameAttribute04/S obj) cil managed + instance int32 CompareTo(valuetype Program/S obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 5 (0x5) .maxstack 3 - .locals init (valuetype CompiledNameAttribute04/S& V_0) + .locals init (valuetype Program/S& V_0) IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: ldc.i4.0 @@ -164,8 +160,8 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: unbox.any CompiledNameAttribute04/S - IL_0007: call instance int32 CompiledNameAttribute04/S::CompareTo(valuetype CompiledNameAttribute04/S) + IL_0002: unbox.any Program/S + IL_0007: call instance int32 Program/S::CompareTo(valuetype Program/S) IL_000c: ret } // end of method S::CompareTo @@ -176,10 +172,10 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 3 - .locals init (valuetype CompiledNameAttribute04/S V_0, - valuetype CompiledNameAttribute04/S& V_1) + .locals init (valuetype Program/S V_0, + valuetype Program/S& V_1) IL_0000: ldarg.1 - IL_0001: unbox.any CompiledNameAttribute04/S + IL_0001: unbox.any Program/S IL_0006: stloc.0 IL_0007: ldloca.s V_0 IL_0009: stloc.1 @@ -205,7 +201,7 @@ .maxstack 8 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) + IL_0006: call instance int32 Program/S::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) IL_000b: ret } // end of method S::GetHashCode @@ -216,28 +212,25 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 27 (0x1b) .maxstack 3 - .locals init ([0] object V_0, - [1] valuetype CompiledNameAttribute04/S V_1, - [2] valuetype CompiledNameAttribute04/S& V_2) - .line 100001,100001 : 0,0 '' + .locals init (object V_0, + valuetype Program/S V_1, + valuetype Program/S& V_2) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 - IL_0003: isinst CompiledNameAttribute04/S + IL_0003: isinst Program/S IL_0008: ldnull IL_0009: cgt.un IL_000b: brfalse.s IL_0019 - .line 100001,100001 : 0,0 '' IL_000d: ldarg.1 - IL_000e: unbox.any CompiledNameAttribute04/S + IL_000e: unbox.any Program/S IL_0013: stloc.1 IL_0014: ldloca.s V_1 IL_0016: stloc.2 IL_0017: ldc.i4.1 IL_0018: ret - .line 100001,100001 : 0,0 '' IL_0019: ldc.i4.0 IL_001a: ret } // end of method S::Equals @@ -247,18 +240,17 @@ { // Code size 2 (0x2) .maxstack 8 - .line 40,40 : 24,25 '' IL_0000: ldarg.1 IL_0001: ret } // end of method S::M1 .method public hidebysig virtual final - instance bool Equals(valuetype CompiledNameAttribute04/S obj) cil managed + instance bool Equals(valuetype Program/S obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 5 (0x5) .maxstack 3 - .locals init (valuetype CompiledNameAttribute04/S& V_0) + .locals init (valuetype Program/S& V_0) IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: ldc.i4.1 @@ -271,27 +263,24 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] object V_0, - [1] valuetype CompiledNameAttribute04/S V_1) - .line 100001,100001 : 0,0 '' + .locals init (object V_0, + valuetype Program/S V_1) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 - IL_0003: isinst CompiledNameAttribute04/S + IL_0003: isinst Program/S IL_0008: ldnull IL_0009: cgt.un IL_000b: brfalse.s IL_001c - .line 100001,100001 : 0,0 '' IL_000d: ldarg.1 - IL_000e: unbox.any CompiledNameAttribute04/S + IL_000e: unbox.any Program/S IL_0013: stloc.1 IL_0014: ldarg.0 IL_0015: ldloc.1 - IL_0016: call instance bool CompiledNameAttribute04/S::Equals(valuetype CompiledNameAttribute04/S) + IL_0016: call instance bool Program/S::Equals(valuetype Program/S) IL_001b: ret - .line 100001,100001 : 0,0 '' IL_001c: ldc.i4.0 IL_001d: ret } // end of method S::Equals @@ -310,7 +299,7 @@ .class auto autochar serializable sealed nested assembly beforefieldinit specialname a@49 extends [mscorlib]System.Object - implements CompiledNameAttribute04/ITestInterface + implements Program/ITestInterface { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .method public specialname rtspecialname @@ -326,18 +315,17 @@ } // end of method a@49::.ctor .method private hidebysig newslot virtual final - instance int32 CompiledNameAttribute04.ITestInterface.M(int32 x) cil managed + instance int32 Program.ITestInterface.M(int32 x) cil managed { .custom instance void [mscorlib]System.Runtime.InteropServices.PreserveSigAttribute::.ctor() = ( 01 00 00 00 ) - .override CompiledNameAttribute04/ITestInterface::M + .override Program/ITestInterface::M // Code size 4 (0x4) .maxstack 8 - .line 51,51 : 33,38 '' IL_0000: ldarg.1 IL_0001: ldc.i4.1 IL_0002: add IL_0003: ret - } // end of method a@49::CompiledNameAttribute04.ITestInterface.M + } // end of method a@49::Program.ITestInterface.M } // end of class a@49 @@ -347,43 +335,40 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) // Code size 4 (0x4) .maxstack 8 - .line 16,16 : 14,19 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: add IL_0003: ret - } // end of method CompiledNameAttribute04::f1 + } // end of method Program::f1 .method public static !!a f2(!!a x) cil managed { // Code size 2 (0x2) .maxstack 8 - .line 17,17 : 12,13 '' IL_0000: ldarg.0 IL_0001: ret - } // end of method CompiledNameAttribute04::f2 + } // end of method Program::f2 - .method public specialname static class CompiledNameAttribute04/ITestInterface + .method public specialname static class Program/ITestInterface get_a() cil managed { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class CompiledNameAttribute04/ITestInterface ''.$CompiledNameAttribute04::a@49 + IL_0000: ldsfld class Program/ITestInterface ''.$Program::a@49 IL_0005: ret - } // end of method CompiledNameAttribute04::get_a + } // end of method Program::get_a - .property class CompiledNameAttribute04/ITestInterface - a() + .property class Program/ITestInterface a() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class CompiledNameAttribute04/ITestInterface CompiledNameAttribute04::get_a() - } // end of property CompiledNameAttribute04::a -} // end of class CompiledNameAttribute04 + .get class Program/ITestInterface Program::get_a() + } // end of property Program::a +} // end of class Program -.class private abstract auto ansi sealed ''.$CompiledNameAttribute04 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { - .field static assembly class CompiledNameAttribute04/ITestInterface a@49 + .field static assembly class Program/ITestInterface a@49 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -394,18 +379,18 @@ .entrypoint // Code size 13 (0xd) .maxstack 4 - .locals init ([0] class CompiledNameAttribute04/ITestInterface a) - .line 49,51 : 1,40 '' - IL_0000: newobj instance void CompiledNameAttribute04/a@49::.ctor() + .locals init (class Program/ITestInterface V_0) + IL_0000: newobj instance void Program/a@49::.ctor() IL_0005: dup - IL_0006: stsfld class CompiledNameAttribute04/ITestInterface ''.$CompiledNameAttribute04::a@49 + IL_0006: stsfld class Program/ITestInterface ''.$Program::a@49 IL_000b: stloc.0 IL_000c: ret - } // end of method $CompiledNameAttribute04::main@ + } // end of method $Program::main@ -} // end of class ''.$CompiledNameAttribute04 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\CompiledNameAttribute\CompiledNameAttribute04_fs\CompiledNameAttribute04.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.net472.release.bsl new file mode 100644 index 00000000000..6327bcbfdea --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.net472.release.bsl @@ -0,0 +1,396 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly CompiledNameAttribute04 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.CompiledNameAttribute04 +{ + // Offset: 0x00000000 Length: 0x00000D31 + // WARNING: managed resource file FSharpSignatureData.CompiledNameAttribute04 created +} +.mresource public FSharpOptimizationData.CompiledNameAttribute04 +{ + // Offset: 0x00000D38 Length: 0x000002BB + // WARNING: managed resource file FSharpOptimizationData.CompiledNameAttribute04 created +} +.module CompiledNameAttribute04.exe +// MVID: {623F6991-34DF-584F-A745-038391693F62} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x038C0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Program + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi serializable nested public C + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.AbstractClassAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig abstract virtual + instance int32 A1(int32 A_1, + int32 A_2) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + } // end of method C::A1 + + .method public hidebysig abstract virtual + instance int32 A2(int32 A_1) cil managed + { + } // end of method C::A2 + + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } // end of method C::.ctor + + .method public hidebysig specialname + instance int32 get_P() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ret + } // end of method C::get_P + + .method public hidebysig instance int32 + M1(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 4 (0x4) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: add + IL_0003: ret + } // end of method C::M1 + + .method public hidebysig instance !!a + M2(!!a x) cil managed preservesig + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } // end of method C::M2 + + .property instance int32 P() + { + .get instance int32 Program/C::get_P() + } // end of property C::P + } // end of class C + + .class interface abstract auto ansi serializable nested public IInterface + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig abstract virtual + instance int32 SomeMethod(int32 A_1) cil managed preservesig + { + } // end of method IInterface::SomeMethod + + } // end of class IInterface + + .class sequential ansi serializable sealed nested public S + extends [mscorlib]System.ValueType + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .pack 0 + .size 1 + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig virtual final + instance int32 CompareTo(valuetype Program/S obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 5 (0x5) + .maxstack 3 + .locals init (valuetype Program/S& V_0) + IL_0000: ldarga.s obj + IL_0002: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: ret + } // end of method S::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any Program/S + IL_0007: call instance int32 Program/S::CompareTo(valuetype Program/S) + IL_000c: ret + } // end of method S::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 3 + .locals init (valuetype Program/S V_0, + valuetype Program/S& V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any Program/S + IL_0006: stloc.0 + IL_0007: ldloca.s V_0 + IL_0009: stloc.1 + IL_000a: ldc.i4.0 + IL_000b: ret + } // end of method S::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method S::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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 Program/S::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_000b: ret + } // end of method S::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 27 (0x1b) + .maxstack 3 + .locals init (object V_0, + valuetype Program/S V_1, + valuetype Program/S& V_2) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Program/S + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0019 + + IL_000d: ldarg.1 + IL_000e: unbox.any Program/S + IL_0013: stloc.1 + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldc.i4.1 + IL_0018: ret + + IL_0019: ldc.i4.0 + IL_001a: ret + } // end of method S::Equals + + .method public hidebysig instance !!a + M1(!!a x) cil managed preservesig + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } // end of method S::M1 + + .method public hidebysig virtual final + instance bool Equals(valuetype Program/S obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 5 (0x5) + .maxstack 3 + .locals init (valuetype Program/S& V_0) + IL_0000: ldarga.s obj + IL_0002: stloc.0 + IL_0003: ldc.i4.1 + IL_0004: ret + } // end of method S::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 30 (0x1e) + .maxstack 4 + .locals init (object V_0, + valuetype Program/S V_1) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Program/S + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c + + IL_000d: ldarg.1 + IL_000e: unbox.any Program/S + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool Program/S::Equals(valuetype Program/S) + IL_001b: ret + + IL_001c: ldc.i4.0 + IL_001d: ret + } // end of method S::Equals + + } // end of class S + + .class interface abstract auto ansi serializable nested public ITestInterface + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig abstract virtual + instance int32 M(int32 A_1) cil managed + { + } // end of method ITestInterface::M + + } // end of class ITestInterface + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname a@49 + extends [mscorlib]System.Object + implements Program/ITestInterface + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } // end of method a@49::.ctor + + .method private hidebysig newslot virtual final + instance int32 Program.ITestInterface.M(int32 x) cil managed + { + .custom instance void [mscorlib]System.Runtime.InteropServices.PreserveSigAttribute::.ctor() = ( 01 00 00 00 ) + .override Program/ITestInterface::M + // Code size 4 (0x4) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldc.i4.1 + IL_0002: add + IL_0003: ret + } // end of method a@49::Program.ITestInterface.M + + } // end of class a@49 + + .method public static int32 f1(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: add + IL_0003: ret + } // end of method Program::f1 + + .method public static !!a f2(!!a x) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } // end of method Program::f2 + + .method public specialname static class Program/ITestInterface + get_a() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class Program/ITestInterface ''.$Program::a@49 + IL_0005: ret + } // end of method Program::get_a + + .property class Program/ITestInterface a() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class Program/ITestInterface Program::get_a() + } // end of property Program::a +} // end of class Program + +.class private abstract auto ansi sealed ''.$Program + extends [mscorlib]System.Object +{ + .field static assembly class Program/ITestInterface a@49 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 13 (0xd) + .maxstack 4 + .locals init (class Program/ITestInterface V_0) + IL_0000: newobj instance void Program/a@49::.ctor() + IL_0005: dup + IL_0006: stsfld class Program/ITestInterface ''.$Program::a@49 + IL_000b: stloc.0 + IL_000c: ret + } // end of method $Program::main@ + +} // end of class ''.$Program + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\CompiledNameAttribute\CompiledNameAttribute04_fs\CompiledNameAttribute04.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.netcore.debug.bsl new file mode 100644 index 00000000000..7d12e40578a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.netcore.debug.bsl @@ -0,0 +1,401 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern System.Runtime +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern System.Runtime.InteropServices +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly CompiledNameAttribute04 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.CompiledNameAttribute04 +{ + // Offset: 0x00000000 Length: 0x00000D69 + // WARNING: managed resource file FSharpSignatureData.CompiledNameAttribute04 created +} +.mresource public FSharpOptimizationData.CompiledNameAttribute04 +{ + // Offset: 0x00000D70 Length: 0x000002C1 + // WARNING: managed resource file FSharpOptimizationData.CompiledNameAttribute04 created +} +.module CompiledNameAttribute04.exe +// MVID: {623F5E75-0386-3430-A745-0383755E3F62} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x0000023C6AAC0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Program + extends [System.Runtime]System.Object +{ + .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 ) + .class abstract auto ansi serializable nested public C + extends [System.Runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.AbstractClassAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig abstract virtual + instance int32 A1(int32 A_1, + int32 A_2) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + } // end of method C::A1 + + .method public hidebysig abstract virtual + instance int32 A2(int32 A_1) cil managed + { + } // end of method C::A2 + + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [System.Runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } // end of method C::.ctor + + .method public hidebysig specialname + instance int32 get_P() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ret + } // end of method C::get_P + + .method public hidebysig instance int32 + M1(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 4 (0x4) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: add + IL_0003: ret + } // end of method C::M1 + + .method public hidebysig instance !!a + M2(!!a x) cil managed preservesig + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } // end of method C::M2 + + .property instance int32 P() + { + .get instance int32 Program/C::get_P() + } // end of property C::P + } // end of class C + + .class interface abstract auto ansi serializable nested public IInterface + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig abstract virtual + instance int32 SomeMethod(int32 A_1) cil managed preservesig + { + } // end of method IInterface::SomeMethod + + } // end of class IInterface + + .class sequential ansi serializable sealed nested public S + extends [System.Runtime]System.ValueType + implements class [System.Runtime]System.IEquatable`1, + [System.Runtime]System.Collections.IStructuralEquatable, + class [System.Runtime]System.IComparable`1, + [System.Runtime]System.IComparable, + [System.Runtime]System.Collections.IStructuralComparable + { + .pack 0 + .size 1 + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig virtual final + instance int32 CompareTo(valuetype Program/S obj) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 5 (0x5) + .maxstack 3 + .locals init (valuetype Program/S& V_0) + IL_0000: ldarga.s obj + IL_0002: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: ret + } // end of method S::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any Program/S + IL_0007: call instance int32 Program/S::CompareTo(valuetype Program/S) + IL_000c: ret + } // end of method S::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [System.Runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 3 + .locals init (valuetype Program/S V_0, + valuetype Program/S& V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any Program/S + IL_0006: stloc.0 + IL_0007: ldloca.s V_0 + IL_0009: stloc.1 + IL_000a: ldc.i4.0 + IL_000b: ret + } // end of method S::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method S::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [System.Runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: call instance int32 Program/S::GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } // end of method S::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 27 (0x1b) + .maxstack 3 + .locals init (object V_0, + valuetype Program/S V_1, + valuetype Program/S& V_2) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Program/S + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0019 + + IL_000d: ldarg.1 + IL_000e: unbox.any Program/S + IL_0013: stloc.1 + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldc.i4.1 + IL_0018: ret + + IL_0019: ldc.i4.0 + IL_001a: ret + } // end of method S::Equals + + .method public hidebysig instance !!a + M1(!!a x) cil managed preservesig + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } // end of method S::M1 + + .method public hidebysig virtual final + instance bool Equals(valuetype Program/S obj) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 5 (0x5) + .maxstack 3 + .locals init (valuetype Program/S& V_0) + IL_0000: ldarga.s obj + IL_0002: stloc.0 + IL_0003: ldc.i4.1 + IL_0004: ret + } // end of method S::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 30 (0x1e) + .maxstack 4 + .locals init (object V_0, + valuetype Program/S V_1) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Program/S + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c + + IL_000d: ldarg.1 + IL_000e: unbox.any Program/S + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool Program/S::Equals(valuetype Program/S) + IL_001b: ret + + IL_001c: ldc.i4.0 + IL_001d: ret + } // end of method S::Equals + + } // end of class S + + .class interface abstract auto ansi serializable nested public ITestInterface + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig abstract virtual + instance int32 M(int32 A_1) cil managed + { + } // end of method ITestInterface::M + + } // end of class ITestInterface + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname a@49 + extends [System.Runtime]System.Object + implements Program/ITestInterface + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [System.Runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } // end of method a@49::.ctor + + .method private hidebysig newslot virtual final + instance int32 Program.ITestInterface.M(int32 x) cil managed + { + .custom instance void [System.Runtime.InteropServices]System.Runtime.InteropServices.PreserveSigAttribute::.ctor() = ( 01 00 00 00 ) + .override Program/ITestInterface::M + // Code size 4 (0x4) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldc.i4.1 + IL_0002: add + IL_0003: ret + } // end of method a@49::Program.ITestInterface.M + + } // end of class a@49 + + .method public static int32 f1(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: add + IL_0003: ret + } // end of method Program::f1 + + .method public static !!a f2(!!a x) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } // end of method Program::f2 + + .method public specialname static class Program/ITestInterface + get_a() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class Program/ITestInterface ''.$Program::a@49 + IL_0005: ret + } // end of method Program::get_a + + .property class Program/ITestInterface a() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class Program/ITestInterface Program::get_a() + } // end of property Program::a +} // end of class Program + +.class private abstract auto ansi sealed ''.$Program + extends [System.Runtime]System.Object +{ + .field static assembly class Program/ITestInterface a@49 + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + // Code size 13 (0xd) + .maxstack 4 + .locals init (class Program/ITestInterface V_0) + IL_0000: newobj instance void Program/a@49::.ctor() + IL_0005: dup + IL_0006: stsfld class Program/ITestInterface ''.$Program::a@49 + IL_000b: stloc.0 + IL_000c: ret + } // end of method $Program::main@ + +} // end of class ''.$Program + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net6.0\tests\EmittedIL\CompiledNameAttribute\CompiledNameAttribute04_fs\CompiledNameAttribute04.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.netcore.release.bsl new file mode 100644 index 00000000000..766e85b9ec1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.il.netcore.release.bsl @@ -0,0 +1,401 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern System.Runtime +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern System.Runtime.InteropServices +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly CompiledNameAttribute04 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.CompiledNameAttribute04 +{ + // Offset: 0x00000000 Length: 0x00000D6D + // WARNING: managed resource file FSharpSignatureData.CompiledNameAttribute04 created +} +.mresource public FSharpOptimizationData.CompiledNameAttribute04 +{ + // Offset: 0x00000D78 Length: 0x000002C1 + // WARNING: managed resource file FSharpOptimizationData.CompiledNameAttribute04 created +} +.module CompiledNameAttribute04.exe +// MVID: {623FA13F-348E-22FD-A745-03833FA13F62} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x000002529FB70000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Program + extends [System.Runtime]System.Object +{ + .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 ) + .class abstract auto ansi serializable nested public C + extends [System.Runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.AbstractClassAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig abstract virtual + instance int32 A1(int32 A_1, + int32 A_2) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + } // end of method C::A1 + + .method public hidebysig abstract virtual + instance int32 A2(int32 A_1) cil managed + { + } // end of method C::A2 + + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [System.Runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } // end of method C::.ctor + + .method public hidebysig specialname + instance int32 get_P() cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ret + } // end of method C::get_P + + .method public hidebysig instance int32 + M1(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 4 (0x4) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: add + IL_0003: ret + } // end of method C::M1 + + .method public hidebysig instance !!a + M2(!!a x) cil managed preservesig + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } // end of method C::M2 + + .property instance int32 P() + { + .get instance int32 Program/C::get_P() + } // end of property C::P + } // end of class C + + .class interface abstract auto ansi serializable nested public IInterface + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig abstract virtual + instance int32 SomeMethod(int32 A_1) cil managed preservesig + { + } // end of method IInterface::SomeMethod + + } // end of class IInterface + + .class sequential ansi serializable sealed nested public S + extends [System.Runtime]System.ValueType + implements class [System.Runtime]System.IEquatable`1, + [System.Runtime]System.Collections.IStructuralEquatable, + class [System.Runtime]System.IComparable`1, + [System.Runtime]System.IComparable, + [System.Runtime]System.Collections.IStructuralComparable + { + .pack 0 + .size 1 + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig virtual final + instance int32 CompareTo(valuetype Program/S obj) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 5 (0x5) + .maxstack 3 + .locals init (valuetype Program/S& V_0) + IL_0000: ldarga.s obj + IL_0002: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: ret + } // end of method S::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any Program/S + IL_0007: call instance int32 Program/S::CompareTo(valuetype Program/S) + IL_000c: ret + } // end of method S::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [System.Runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 3 + .locals init (valuetype Program/S V_0, + valuetype Program/S& V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any Program/S + IL_0006: stloc.0 + IL_0007: ldloca.s V_0 + IL_0009: stloc.1 + IL_000a: ldc.i4.0 + IL_000b: ret + } // end of method S::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method S::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [System.Runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: call instance int32 Program/S::GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } // end of method S::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 27 (0x1b) + .maxstack 3 + .locals init (object V_0, + valuetype Program/S V_1, + valuetype Program/S& V_2) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Program/S + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0019 + + IL_000d: ldarg.1 + IL_000e: unbox.any Program/S + IL_0013: stloc.1 + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldc.i4.1 + IL_0018: ret + + IL_0019: ldc.i4.0 + IL_001a: ret + } // end of method S::Equals + + .method public hidebysig instance !!a + M1(!!a x) cil managed preservesig + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } // end of method S::M1 + + .method public hidebysig virtual final + instance bool Equals(valuetype Program/S obj) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 5 (0x5) + .maxstack 3 + .locals init (valuetype Program/S& V_0) + IL_0000: ldarga.s obj + IL_0002: stloc.0 + IL_0003: ldc.i4.1 + IL_0004: ret + } // end of method S::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 30 (0x1e) + .maxstack 4 + .locals init (object V_0, + valuetype Program/S V_1) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Program/S + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c + + IL_000d: ldarg.1 + IL_000e: unbox.any Program/S + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool Program/S::Equals(valuetype Program/S) + IL_001b: ret + + IL_001c: ldc.i4.0 + IL_001d: ret + } // end of method S::Equals + + } // end of class S + + .class interface abstract auto ansi serializable nested public ITestInterface + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig abstract virtual + instance int32 M(int32 A_1) cil managed + { + } // end of method ITestInterface::M + + } // end of class ITestInterface + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname a@49 + extends [System.Runtime]System.Object + implements Program/ITestInterface + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [System.Runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } // end of method a@49::.ctor + + .method private hidebysig newslot virtual final + instance int32 Program.ITestInterface.M(int32 x) cil managed + { + .custom instance void [System.Runtime.InteropServices]System.Runtime.InteropServices.PreserveSigAttribute::.ctor() = ( 01 00 00 00 ) + .override Program/ITestInterface::M + // Code size 4 (0x4) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldc.i4.1 + IL_0002: add + IL_0003: ret + } // end of method a@49::Program.ITestInterface.M + + } // end of class a@49 + + .method public static int32 f1(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: add + IL_0003: ret + } // end of method Program::f1 + + .method public static !!a f2(!!a x) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } // end of method Program::f2 + + .method public specialname static class Program/ITestInterface + get_a() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class Program/ITestInterface ''.$Program::a@49 + IL_0005: ret + } // end of method Program::get_a + + .property class Program/ITestInterface a() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class Program/ITestInterface Program::get_a() + } // end of property Program::a +} // end of class Program + +.class private abstract auto ansi sealed ''.$Program + extends [System.Runtime]System.Object +{ + .field static assembly class Program/ITestInterface a@49 + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + // Code size 13 (0xd) + .maxstack 4 + .locals init (class Program/ITestInterface V_0) + IL_0000: newobj instance void Program/a@49::.ctor() + IL_0005: dup + IL_0006: stsfld class Program/ITestInterface ''.$Program::a@49 + IL_000b: stloc.0 + IL_000c: ret + } // end of method $Program::main@ + +} // end of class ''.$Program + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net6.0\tests\EmittedIL\CompiledNameAttribute\CompiledNameAttribute04_fs\CompiledNameAttribute04.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute05.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute05.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute05.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute05.fs diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr01.fs similarity index 93% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr01.fs index 2eb38a0f7f6..3503a35f05c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr01.fs @@ -1,6 +1,8 @@ // #Regression #NoMono #NoMT #CodeGen #EmittedIL #ComputationExpressions // Regression test for FSHARP1.0:4972 // Debug ranges for computation expressions +module Program + open Library let res1 = diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr01.fs.il.bsl similarity index 76% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr01.fs.il.bsl index 8cb3a7dadd6..4809aaf984c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr01.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -26,36 +25,38 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.ComputationExpr01 { - // Offset: 0x00000000 Length: 0x0000020E + // Offset: 0x00000000 Length: 0x00000261 + // WARNING: managed resource file FSharpSignatureData.ComputationExpr01 created } .mresource public FSharpOptimizationData.ComputationExpr01 { - // Offset: 0x00000218 Length: 0x0000007D + // Offset: 0x00000268 Length: 0x00000073 + // WARNING: managed resource file FSharpOptimizationData.ComputationExpr01 created } .module ComputationExpr01.exe -// MVID: {61F2D6A5-3703-E566-A745-0383A5D6F261} +// MVID: {62299EC0-3703-E566-A745-0383C09E2962} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07190000 +// Image base: 0x03A80000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed ComputationExpr01 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class auto ansi serializable sealed nested assembly beforefieldinit res1@8 + .class auto ansi serializable sealed nested assembly beforefieldinit res1@10 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -73,48 +74,46 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr01/res1@8::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res1@10::builder@ IL_000d: ret - } // end of method res1@8::.ctor + } // end of method res1@10::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // Code size 15 (0xf) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 8,8 : 9,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr01.fs' IL_0000: ldarg.0 - IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr01/res1@8::builder@ + IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res1@10::builder@ IL_0006: ldc.i4.1 IL_0007: tail. IL_0009: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) IL_000e: ret - } // end of method res1@8::Invoke + } // end of method res1@10::Invoke - } // end of class res1@8 + } // end of class res1@10 .method public specialname static class [ComputationExprLibrary]Library.Eventually`1 get_res1() cil managed { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr01::res1@6 + IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res1@8 IL_0005: ret - } // end of method ComputationExpr01::get_res1 + } // end of method Program::get_res1 .property class [ComputationExprLibrary]Library.Eventually`1 res1() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr01::get_res1() - } // end of property ComputationExpr01::res1 -} // end of class ComputationExpr01 + .get class [ComputationExprLibrary]Library.Eventually`1 Program::get_res1() + } // end of property Program::res1 +} // end of class Program -.class private abstract auto ansi sealed ''.$ComputationExpr01 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { - .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res1@6 + .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res1@8 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -125,32 +124,30 @@ .entrypoint // Code size 39 (0x27) .maxstack 4 - .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 7,7 : 5,15 '' + .locals init (class [ComputationExprLibrary]Library.Eventually`1 V_0, + class [ComputationExprLibrary]Library.EventuallyBuilder V_1, + class [ComputationExprLibrary]Library.Eventually`1 V_2) IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 IL_0006: ldloc.1 IL_0007: ldloc.1 - IL_0008: newobj instance void ComputationExpr01/res1@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_0008: newobj instance void Program/res1@10::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_000d: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0012: dup - IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr01::res1@6 + IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res1@8 IL_0018: stloc.0 - .line 10,10 : 1,5 '' - IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr01::get_res1() + IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 Program::get_res1() IL_001e: stloc.2 - .line 10,10 : 9,25 '' IL_001f: ldloc.2 IL_0020: call !!0 [ComputationExprLibrary]Library.EventuallyModule::force(class [ComputationExprLibrary]Library.Eventually`1) IL_0025: pop IL_0026: ret - } // end of method $ComputationExpr01::main@ + } // end of method $Program::main@ -} // end of class ''.$ComputationExpr01 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\ComputationExpressions\ComputationExpr01_fs\ComputationExpr01.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr02.fs similarity index 95% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr02.fs index cf181340526..a91c3760a6d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr02.fs @@ -1,6 +1,7 @@ // #Regression #NoMono #NoMT #CodeGen #EmittedIL #ComputationExpressions // Regression test for FSHARP1.0:4972 // Debug ranges for computation expressions +module Program open Library let res2 = diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr02.fs.il.bsl similarity index 78% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr02.fs.il.bsl index f2c964aa910..b668949a772 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr02.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -26,36 +25,38 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.ComputationExpr02 { - // Offset: 0x00000000 Length: 0x0000020E + // Offset: 0x00000000 Length: 0x00000261 + // WARNING: managed resource file FSharpSignatureData.ComputationExpr02 created } .mresource public FSharpOptimizationData.ComputationExpr02 { - // Offset: 0x00000218 Length: 0x0000007D + // Offset: 0x00000268 Length: 0x00000073 + // WARNING: managed resource file FSharpOptimizationData.ComputationExpr02 created } .module ComputationExpr02.exe -// MVID: {61F2D6A5-3624-E566-A745-0383A5D6F261} +// MVID: {6229A41C-3624-E566-A745-03831CA42962} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071D0000 +// Image base: 0x00D30000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed ComputationExpr02 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class auto ansi serializable sealed nested assembly beforefieldinit res2@8 + .class auto ansi serializable sealed nested assembly beforefieldinit res2@9 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -73,62 +74,57 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr02/res2@8::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res2@9::builder@ IL_000d: ret - } // end of method res2@8::.ctor + } // end of method res2@9::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // Code size 45 (0x2d) .maxstack 7 - .locals init ([0] int32 x) - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 8,8 : 9,50 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr02.fs' + .locals init (int32 V_0) IL_0000: nop - .line 8,8 : 18,33 '' IL_0001: ldstr "hello" IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0010: pop - .line 8,8 : 35,49 '' IL_0011: ldstr "hello" IL_0016: callvirt instance int32 [mscorlib]System.String::get_Length() IL_001b: stloc.0 - .line 9,9 : 9,21 '' IL_001c: ldarg.0 - IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr02/res2@8::builder@ + IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res2@9::builder@ IL_0022: ldloc.0 IL_0023: ldloc.0 IL_0024: add IL_0025: tail. IL_0027: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) IL_002c: ret - } // end of method res2@8::Invoke + } // end of method res2@9::Invoke - } // end of class res2@8 + } // end of class res2@9 .method public specialname static class [ComputationExprLibrary]Library.Eventually`1 get_res2() cil managed { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr02::res2@6 + IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res2@7 IL_0005: ret - } // end of method ComputationExpr02::get_res2 + } // end of method Program::get_res2 .property class [ComputationExprLibrary]Library.Eventually`1 res2() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr02::get_res2() - } // end of property ComputationExpr02::res2 -} // end of class ComputationExpr02 + .get class [ComputationExprLibrary]Library.Eventually`1 Program::get_res2() + } // end of property Program::res2 +} // end of class Program -.class private abstract auto ansi sealed ''.$ComputationExpr02 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { - .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res2@6 + .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res2@7 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -139,32 +135,30 @@ .entrypoint // Code size 39 (0x27) .maxstack 4 - .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 7,7 : 5,15 '' + .locals init (class [ComputationExprLibrary]Library.Eventually`1 V_0, + class [ComputationExprLibrary]Library.EventuallyBuilder V_1, + class [ComputationExprLibrary]Library.Eventually`1 V_2) IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 IL_0006: ldloc.1 IL_0007: ldloc.1 - IL_0008: newobj instance void ComputationExpr02/res2@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_0008: newobj instance void Program/res2@9::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_000d: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0012: dup - IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr02::res2@6 + IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res2@7 IL_0018: stloc.0 - .line 10,10 : 1,5 '' - IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr02::get_res2() + IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 Program::get_res2() IL_001e: stloc.2 - .line 10,10 : 9,25 '' IL_001f: ldloc.2 IL_0020: call !!0 [ComputationExprLibrary]Library.EventuallyModule::force(class [ComputationExprLibrary]Library.Eventually`1) IL_0025: pop IL_0026: ret - } // end of method $ComputationExpr02::main@ + } // end of method $Program::main@ -} // end of class ''.$ComputationExpr02 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\ComputationExpressions\ComputationExpr02_fs\ComputationExpr02.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr03.fs similarity index 97% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr03.fs index 8761f08adef..be4e644fee1 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr03.fs @@ -1,6 +1,7 @@ // #Regression #NoMono #NoMT #CodeGen #EmittedIL #ComputationExpressions // Regression test for FSHARP1.0:4972 // Debug ranges for computation expressions +module Program open Library let res2 = diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr03.fs.il.bsl similarity index 79% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr03.fs.il.bsl index b61b543873a..c8575c37f8a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr03.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -26,36 +25,38 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.ComputationExpr03 { - // Offset: 0x00000000 Length: 0x00000238 + // Offset: 0x00000000 Length: 0x0000028B + // WARNING: managed resource file FSharpSignatureData.ComputationExpr03 created } .mresource public FSharpOptimizationData.ComputationExpr03 { - // Offset: 0x00000240 Length: 0x0000008C + // Offset: 0x00000290 Length: 0x00000082 + // WARNING: managed resource file FSharpOptimizationData.ComputationExpr03 created } .module ComputationExpr03.exe -// MVID: {61F2D6A5-3649-E566-A745-0383A5D6F261} +// MVID: {6229A4F2-3649-E566-A745-0383F2A42962} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07320000 +// Image base: 0x007F0000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed ComputationExpr03 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class auto ansi serializable sealed nested assembly beforefieldinit res2@8 + .class auto ansi serializable sealed nested assembly beforefieldinit res2@9 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -73,42 +74,37 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/res2@8::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res2@9::builder@ IL_000d: ret - } // end of method res2@8::.ctor + } // end of method res2@9::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // Code size 45 (0x2d) .maxstack 7 - .locals init ([0] int32 x) - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 8,8 : 9,50 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr03.fs' + .locals init (int32 V_0) IL_0000: nop - .line 8,8 : 18,33 '' IL_0001: ldstr "hello" IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0010: pop - .line 8,8 : 35,49 '' IL_0011: ldstr "hello" IL_0016: callvirt instance int32 [mscorlib]System.String::get_Length() IL_001b: stloc.0 - .line 9,9 : 9,21 '' IL_001c: ldarg.0 - IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/res2@8::builder@ + IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res2@9::builder@ IL_0022: ldloc.0 IL_0023: ldloc.0 IL_0024: add IL_0025: tail. IL_0027: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) IL_002c: ret - } // end of method res2@8::Invoke + } // end of method res2@9::Invoke - } // end of class res2@8 + } // end of class res2@9 - .class auto ansi serializable sealed nested assembly beforefieldinit 'res3@17-2' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res3@18-2' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -126,39 +122,35 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@17-2'::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res3@18-2'::builder@ IL_000d: ret - } // end of method 'res3@17-2'::.ctor + } // end of method 'res3@18-2'::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // Code size 43 (0x2b) .maxstack 6 - .locals init ([0] int32 x) - .line 17,17 : 17,58 '' + .locals init (int32 V_0) IL_0000: nop - .line 17,17 : 26,41 '' IL_0001: ldstr "hello" IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0010: pop - .line 17,17 : 43,57 '' IL_0011: ldstr "hello" IL_0016: callvirt instance int32 [mscorlib]System.String::get_Length() IL_001b: stloc.0 - .line 18,18 : 17,25 '' IL_001c: ldarg.0 - IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@17-2'::builder@ + IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res3@18-2'::builder@ IL_0022: ldc.i4.1 IL_0023: tail. IL_0025: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) IL_002a: ret - } // end of method 'res3@17-2'::Invoke + } // end of method 'res3@18-2'::Invoke - } // end of class 'res3@17-2' + } // end of class 'res3@18-2' - .class auto ansi serializable sealed nested assembly beforefieldinit 'res3@20-3' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res3@21-3' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -176,31 +168,29 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@20-3'::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res3@21-3'::builder@ IL_000d: ret - } // end of method 'res3@20-3'::.ctor + } // end of method 'res3@21-3'::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(int32 _arg2) cil managed { // Code size 17 (0x11) .maxstack 6 - .locals init ([0] int32 x) - .line 100001,100001 : 0,0 '' + .locals init (int32 V_0) IL_0000: ldarg.1 IL_0001: stloc.0 - .line 20,20 : 9,17 '' IL_0002: ldarg.0 - IL_0003: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@20-3'::builder@ + IL_0003: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res3@21-3'::builder@ IL_0008: ldc.i4.1 IL_0009: tail. IL_000b: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) IL_0010: ret - } // end of method 'res3@20-3'::Invoke + } // end of method 'res3@21-3'::Invoke - } // end of class 'res3@20-3' + } // end of class 'res3@21-3' - .class auto ansi serializable sealed nested assembly beforefieldinit 'res3@15-1' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res3@16-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -218,41 +208,39 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@15-1'::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res3@16-1'::builder@ IL_000d: ret - } // end of method 'res3@15-1'::.ctor + } // end of method 'res3@16-1'::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(int32 _arg1) cil managed { // Code size 45 (0x2d) .maxstack 7 - .locals init ([0] int32 x, - [1] class [ComputationExprLibrary]Library.EventuallyBuilder V_1) - .line 100001,100001 : 0,0 '' + .locals init (int32 V_0, + class [ComputationExprLibrary]Library.EventuallyBuilder V_1) IL_0000: ldarg.1 IL_0001: stloc.0 - .line 15,19 : 9,14 '' IL_0002: ldarg.0 - IL_0003: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@15-1'::builder@ + IL_0003: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res3@16-1'::builder@ IL_0008: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_000d: stloc.1 IL_000e: ldloc.1 IL_000f: ldloc.1 - IL_0010: newobj instance void ComputationExpr03/'res3@17-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_0010: newobj instance void Program/'res3@18-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_0015: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_001a: ldarg.0 - IL_001b: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@15-1'::builder@ - IL_0020: newobj instance void ComputationExpr03/'res3@20-3'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_001b: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res3@16-1'::builder@ + IL_0020: newobj instance void Program/'res3@21-3'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_0025: tail. IL_0027: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Bind(class [ComputationExprLibrary]Library.Eventually`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_002c: ret - } // end of method 'res3@15-1'::Invoke + } // end of method 'res3@16-1'::Invoke - } // end of class 'res3@15-1' + } // end of class 'res3@16-1' - .class auto ansi serializable sealed nested assembly beforefieldinit res3@14 + .class auto ansi serializable sealed nested assembly beforefieldinit res3@15 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -270,68 +258,67 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/res3@14::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res3@15::builder@ IL_000d: ret - } // end of method res3@14::.ctor + } // end of method res3@15::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // Code size 30 (0x1e) .maxstack 8 - .line 14,14 : 9,23 '' IL_0000: ldarg.0 - IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/res3@14::builder@ - IL_0006: call class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr03::get_res2() + IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res3@15::builder@ + IL_0006: call class [ComputationExprLibrary]Library.Eventually`1 Program::get_res2() IL_000b: ldarg.0 - IL_000c: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/res3@14::builder@ - IL_0011: newobj instance void ComputationExpr03/'res3@15-1'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_000c: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res3@15::builder@ + IL_0011: newobj instance void Program/'res3@16-1'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_0016: tail. IL_0018: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Bind(class [ComputationExprLibrary]Library.Eventually`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_001d: ret - } // end of method res3@14::Invoke + } // end of method res3@15::Invoke - } // end of class res3@14 + } // end of class res3@15 .method public specialname static class [ComputationExprLibrary]Library.Eventually`1 get_res2() cil managed { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr03::res2@6 + IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res2@7 IL_0005: ret - } // end of method ComputationExpr03::get_res2 + } // end of method Program::get_res2 .method public specialname static class [ComputationExprLibrary]Library.Eventually`1 get_res3() cil managed { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr03::res3@12 + IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res3@13 IL_0005: ret - } // end of method ComputationExpr03::get_res3 + } // end of method Program::get_res3 .property class [ComputationExprLibrary]Library.Eventually`1 res2() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr03::get_res2() - } // end of property ComputationExpr03::res2 + .get class [ComputationExprLibrary]Library.Eventually`1 Program::get_res2() + } // end of property Program::res2 .property class [ComputationExprLibrary]Library.Eventually`1 res3() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr03::get_res3() - } // end of property ComputationExpr03::res3 -} // end of class ComputationExpr03 + .get class [ComputationExprLibrary]Library.Eventually`1 Program::get_res3() + } // end of property Program::res3 +} // end of class Program -.class private abstract auto ansi sealed ''.$ComputationExpr03 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { - .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res2@6 + .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res2@7 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res3@12 + .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res3@13 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -342,52 +329,47 @@ .entrypoint // Code size 82 (0x52) .maxstack 4 - .locals init ([0] class [ComputationExprLibrary]Library.Eventually`1 res2, - [1] class [ComputationExprLibrary]Library.Eventually`1 res3, - [2] class [ComputationExprLibrary]Library.EventuallyBuilder V_2, - [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 7,7 : 5,15 '' + .locals init (class [ComputationExprLibrary]Library.Eventually`1 V_0, + class [ComputationExprLibrary]Library.Eventually`1 V_1, + class [ComputationExprLibrary]Library.EventuallyBuilder V_2, + class [ComputationExprLibrary]Library.Eventually`1 V_3, + class [ComputationExprLibrary]Library.EventuallyBuilder V_4, + class [ComputationExprLibrary]Library.Eventually`1 V_5) IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.2 IL_0006: ldloc.2 IL_0007: ldloc.2 - IL_0008: newobj instance void ComputationExpr03/res2@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_0008: newobj instance void Program/res2@9::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_000d: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0012: dup - IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr03::res2@6 + IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res2@7 IL_0018: stloc.0 - .line 10,10 : 1,5 '' - IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr03::get_res2() + IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 Program::get_res2() IL_001e: stloc.3 - .line 10,10 : 9,25 '' 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 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) + IL_0031: newobj instance void Program/res3@15::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_0036: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_003b: dup - IL_003c: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr03::res3@12 + IL_003c: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res3@13 IL_0041: stloc.1 - .line 22,22 : 1,5 '' - IL_0042: call class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr03::get_res3() - IL_0047: stloc.s 'Pipe #2 input at line 22' - .line 22,22 : 10,26 '' - IL_0049: ldloc.s 'Pipe #2 input at line 22' + IL_0042: call class [ComputationExprLibrary]Library.Eventually`1 Program::get_res3() + IL_0047: stloc.s V_5 + IL_0049: ldloc.s V_5 IL_004b: call !!0 [ComputationExprLibrary]Library.EventuallyModule::force(class [ComputationExprLibrary]Library.Eventually`1) IL_0050: pop IL_0051: ret - } // end of method $ComputationExpr03::main@ + } // end of method $Program::main@ -} // end of class ''.$ComputationExpr03 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\ComputationExpressions\ComputationExpr03_fs\ComputationExpr03.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr04.fs similarity index 95% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr04.fs index 92dd72abcba..ef7562113fb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr04.fs @@ -1,4 +1,5 @@ // #NoMono #NoMT #CodeGen #EmittedIL #ComputationExpressions +module Program open Library let res4 = diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr04.fs.il.bsl similarity index 80% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr04.fs.il.bsl index 35d59d998d9..c3454ee0ffe 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr04.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -26,36 +25,38 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.ComputationExpr04 { - // Offset: 0x00000000 Length: 0x0000020E + // Offset: 0x00000000 Length: 0x00000261 + // WARNING: managed resource file FSharpSignatureData.ComputationExpr04 created } .mresource public FSharpOptimizationData.ComputationExpr04 { - // Offset: 0x00000218 Length: 0x0000007D + // Offset: 0x00000268 Length: 0x00000073 + // WARNING: managed resource file FSharpOptimizationData.ComputationExpr04 created } .module ComputationExpr04.exe -// MVID: {61F2D6A5-366A-E566-A745-0383A5D6F261} +// MVID: {6229A4F2-366A-E566-A745-0383F2A42962} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E30000 +// Image base: 0x00D80000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed ComputationExpr04 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'res4@7-1' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res4@8-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -73,32 +74,26 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/'res4@7-1'::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res4@8-1'::builder@ IL_000d: ret - } // end of method 'res4@7-1'::.ctor + } // end of method 'res4@8-1'::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // 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 6,6 : 9,12 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr04.fs' + .locals init (int32 V_0, + string V_1) IL_0000: nop - .line 7,7 : 13,54 '' IL_0001: nop - .line 7,7 : 22,37 '' 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_0012: ldstr "hello" IL_0017: callvirt instance int32 [mscorlib]System.String::get_Length() IL_001c: stloc.0 - .line 8,8 : 13,28 '' IL_001d: ldstr "fail" IL_0022: stloc.1 IL_0023: ldc.i4.0 @@ -113,18 +108,17 @@ IL_0034: throw IL_0035: pop - .line 9,9 : 13,21 '' IL_0036: ldarg.0 - IL_0037: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/'res4@7-1'::builder@ + IL_0037: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res4@8-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 method 'res4@8-1'::Invoke - } // end of class 'res4@7-1' + } // end of class 'res4@8-1' - .class auto ansi serializable sealed nested assembly beforefieldinit 'res4@6-2' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res4@7-2' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -142,43 +136,38 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/'res4@6-2'::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res4@7-2'::builder@ IL_000d: ret - } // end of method 'res4@6-2'::.ctor + } // end of method 'res4@7-2'::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [mscorlib]System.Exception _arg1) cil managed { // Code size 45 (0x2d) .maxstack 6 - .locals init ([0] class [mscorlib]System.Exception V_0, - [1] int32 x) - .line 10,10 : 9,13 '' + .locals init (class [mscorlib]System.Exception V_0, + int32 V_1) IL_0000: ldarg.1 IL_0001: stloc.0 - .line 11,11 : 13,54 '' IL_0002: nop - .line 11,11 : 22,37 '' IL_0003: ldstr "hello" IL_0008: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0012: pop - .line 11,11 : 39,53 '' IL_0013: ldstr "hello" IL_0018: callvirt instance int32 [mscorlib]System.String::get_Length() IL_001d: stloc.1 - .line 12,12 : 13,21 '' IL_001e: ldarg.0 - IL_001f: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/'res4@6-2'::builder@ + IL_001f: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res4@7-2'::builder@ IL_0024: ldloc.1 IL_0025: tail. IL_0027: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) IL_002c: ret - } // end of method 'res4@6-2'::Invoke + } // end of method 'res4@7-2'::Invoke - } // end of class 'res4@6-2' + } // end of class 'res4@7-2' - .class auto ansi serializable sealed nested assembly beforefieldinit res4@6 + .class auto ansi serializable sealed nested assembly beforefieldinit res4@7 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -196,9 +185,9 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/res4@6::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res4@7::builder@ IL_000d: ret - } // end of method res4@6::.ctor + } // end of method res4@7::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed @@ -206,45 +195,45 @@ // Code size 47 (0x2f) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/res4@6::builder@ + IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res4@7::builder@ IL_0006: ldarg.0 - IL_0007: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/res4@6::builder@ + IL_0007: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res4@7::builder@ IL_000c: ldarg.0 - IL_000d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/res4@6::builder@ - IL_0012: newobj instance void ComputationExpr04/'res4@7-1'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_000d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res4@7::builder@ + IL_0012: newobj instance void Program/'res4@8-1'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_0017: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_001c: ldarg.0 - IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/res4@6::builder@ - IL_0022: newobj instance void ComputationExpr04/'res4@6-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res4@7::builder@ + IL_0022: newobj instance void Program/'res4@7-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_0027: tail. IL_0029: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::TryWith(class [ComputationExprLibrary]Library.Eventually`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_002e: ret - } // end of method res4@6::Invoke + } // end of method res4@7::Invoke - } // end of class res4@6 + } // end of class res4@7 .method public specialname static class [ComputationExprLibrary]Library.Eventually`1 get_res4() cil managed { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr04::res4@4 + IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res4@5 IL_0005: ret - } // end of method ComputationExpr04::get_res4 + } // end of method Program::get_res4 .property class [ComputationExprLibrary]Library.Eventually`1 res4() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr04::get_res4() - } // end of property ComputationExpr04::res4 -} // end of class ComputationExpr04 + .get class [ComputationExprLibrary]Library.Eventually`1 Program::get_res4() + } // end of property Program::res4 +} // end of class Program -.class private abstract auto ansi sealed ''.$ComputationExpr04 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { - .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res4@4 + .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res4@5 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -255,32 +244,30 @@ .entrypoint // Code size 39 (0x27) .maxstack 4 - .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 5,5 : 5,15 '' + .locals init (class [ComputationExprLibrary]Library.Eventually`1 V_0, + class [ComputationExprLibrary]Library.EventuallyBuilder V_1, + class [ComputationExprLibrary]Library.Eventually`1 V_2) IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 IL_0006: ldloc.1 IL_0007: ldloc.1 - IL_0008: newobj instance void ComputationExpr04/res4@6::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_0008: newobj instance void Program/res4@7::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_000d: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0012: dup - IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr04::res4@4 + IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res4@5 IL_0018: stloc.0 - .line 14,14 : 1,5 '' - IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr04::get_res4() + IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 Program::get_res4() IL_001e: stloc.2 - .line 14,14 : 9,25 '' IL_001f: ldloc.2 IL_0020: call !!0 [ComputationExprLibrary]Library.EventuallyModule::force(class [ComputationExprLibrary]Library.Eventually`1) IL_0025: pop IL_0026: ret - } // end of method $ComputationExpr04::main@ + } // end of method $Program::main@ -} // end of class ''.$ComputationExpr04 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\ComputationExpressions\ComputationExpr04_fs\ComputationExpr04.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr05.fs similarity index 96% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr05.fs index d6717666b66..98b389ab87a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr05.fs @@ -1,6 +1,7 @@ // #Regression #NoMono #NoMT #CodeGen #EmittedIL #ComputationExpressions // Regression test for FSHARP1.0:4972 // Debug ranges for computation expressions +module Program open Library let res5 = diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr05.fs.il.bsl similarity index 78% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr05.fs.il.bsl index c16eee3c74d..395fd9f6ba4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr05.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -26,36 +25,38 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.ComputationExpr05 { - // Offset: 0x00000000 Length: 0x0000020E + // Offset: 0x00000000 Length: 0x00000261 + // WARNING: managed resource file FSharpSignatureData.ComputationExpr05 created } .mresource public FSharpOptimizationData.ComputationExpr05 { - // Offset: 0x00000218 Length: 0x0000007D + // Offset: 0x00000268 Length: 0x00000073 + // WARNING: managed resource file FSharpOptimizationData.ComputationExpr05 created } .module ComputationExpr05.exe -// MVID: {61F2D6A5-3687-E566-A745-0383A5D6F261} +// MVID: {6229A4F2-3687-E566-A745-0383F2A42962} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E50000 +// Image base: 0x03130000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed ComputationExpr05 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'res5@9-1' + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'res5@10-1' extends [mscorlib]System.Object implements [mscorlib]System.IDisposable { @@ -70,7 +71,7 @@ IL_0006: ldarg.0 IL_0007: pop IL_0008: ret - } // end of method 'res5@9-1'::.ctor + } // end of method 'res5@10-1'::.ctor .method private hidebysig newslot virtual final instance void System.IDisposable.Dispose() cil managed @@ -78,18 +79,15 @@ .override [mscorlib]System.IDisposable::Dispose // Code size 3 (0x3) .maxstack 4 - .locals init ([0] class [mscorlib]System.IDisposable 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\\ComputationExpressions\\ComputationExpr05.fs' + .locals init (class [mscorlib]System.IDisposable V_0) IL_0000: ldarg.0 IL_0001: stloc.0 - .line 9,9 : 68,70 '' IL_0002: ret - } // end of method 'res5@9-1'::System.IDisposable.Dispose + } // end of method 'res5@10-1'::System.IDisposable.Dispose - } // end of class 'res5@9-1' + } // end of class 'res5@10-1' - .class auto ansi serializable sealed nested assembly beforefieldinit 'res5@10-2' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res5@11-2' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -107,43 +105,38 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr05/'res5@10-2'::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res5@11-2'::builder@ IL_000d: ret - } // end of method 'res5@10-2'::.ctor + } // end of method 'res5@11-2'::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [mscorlib]System.IDisposable _arg1) cil managed { // Code size 45 (0x2d) .maxstack 6 - .locals init ([0] class [mscorlib]System.IDisposable 'x (shadowed)', - [1] int32 x) - .line 100001,100001 : 0,0 '' + .locals init (class [mscorlib]System.IDisposable V_0, + int32 V_1) IL_0000: ldarg.1 IL_0001: stloc.0 - .line 10,10 : 9,50 '' IL_0002: nop - .line 10,10 : 18,33 '' IL_0003: ldstr "hello" IL_0008: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0012: pop - .line 10,10 : 35,49 '' IL_0013: ldstr "hello" IL_0018: callvirt instance int32 [mscorlib]System.String::get_Length() IL_001d: stloc.1 - .line 11,11 : 9,17 '' IL_001e: ldarg.0 - IL_001f: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr05/'res5@10-2'::builder@ + IL_001f: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res5@11-2'::builder@ IL_0024: ldc.i4.1 IL_0025: tail. IL_0027: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) IL_002c: ret - } // end of method 'res5@10-2'::Invoke + } // end of method 'res5@11-2'::Invoke - } // end of class 'res5@10-2' + } // end of class 'res5@11-2' - .class auto ansi serializable sealed nested assembly beforefieldinit res5@8 + .class auto ansi serializable sealed nested assembly beforefieldinit res5@9 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -161,65 +154,60 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr05/res5@8::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res5@9::builder@ IL_000d: ret - } // end of method res5@8::.ctor + } // end of method res5@9::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // Code size 59 (0x3b) .maxstack 7 - .locals init ([0] int32 x) - .line 9,9 : 9,72 '' + .locals init (int32 V_0) IL_0000: nop - .line 8,8 : 9,50 '' IL_0001: nop - .line 8,8 : 18,33 '' 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_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_001e: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res5@9::builder@ + IL_0023: newobj instance void Program/'res5@10-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_0029: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res5@9::builder@ + IL_002e: newobj instance void Program/'res5@11-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_003a: ret - } // end of method res5@8::Invoke + } // end of method res5@9::Invoke - } // end of class res5@8 + } // end of class res5@9 .method public specialname static class [ComputationExprLibrary]Library.Eventually`1 get_res5() cil managed { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr05::res5@6 + IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res5@7 IL_0005: ret - } // end of method ComputationExpr05::get_res5 + } // end of method Program::get_res5 .property class [ComputationExprLibrary]Library.Eventually`1 res5() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr05::get_res5() - } // end of property ComputationExpr05::res5 -} // end of class ComputationExpr05 + .get class [ComputationExprLibrary]Library.Eventually`1 Program::get_res5() + } // end of property Program::res5 +} // end of class Program -.class private abstract auto ansi sealed ''.$ComputationExpr05 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { - .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res5@6 + .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res5@7 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -230,32 +218,30 @@ .entrypoint // Code size 39 (0x27) .maxstack 4 - .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 7,7 : 5,15 '' + .locals init (class [ComputationExprLibrary]Library.Eventually`1 V_0, + class [ComputationExprLibrary]Library.EventuallyBuilder V_1, + class [ComputationExprLibrary]Library.Eventually`1 V_2) IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 IL_0006: ldloc.1 IL_0007: ldloc.1 - IL_0008: newobj instance void ComputationExpr05/res5@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_0008: newobj instance void Program/res5@9::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_000d: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0012: dup - IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr05::res5@6 + IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res5@7 IL_0018: stloc.0 - .line 13,13 : 1,5 '' - IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr05::get_res5() + IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 Program::get_res5() IL_001e: stloc.2 - .line 13,13 : 9,25 '' IL_001f: ldloc.2 IL_0020: call !!0 [ComputationExprLibrary]Library.EventuallyModule::force(class [ComputationExprLibrary]Library.Eventually`1) IL_0025: pop IL_0026: ret - } // end of method $ComputationExpr05::main@ + } // end of method $Program::main@ -} // end of class ''.$ComputationExpr05 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\ComputationExpressions\ComputationExpr05_fs\ComputationExpr05.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr06.fs similarity index 74% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr06.fs index 4ee79bc8fd9..6b1a39f5ae5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr06.fs @@ -1,18 +1,19 @@ // #Regression #NoMono #NoMT #CodeGen #EmittedIL #ComputationExpressions // Regression test for FSHARP1.0:4972 // Debug ranges for computation expressions +module Program open Library let res6 = eventually { - let x = ref 1 - while !x > 0 do + let mutable x = 1 + while x > 0 do printfn "hello" printfn "hello" printfn "hello" printfn "hello" printfn "hello" - decr x + x <- x - 1 return 1 } -res6 |> Eventually.force +res6 |> Eventually.force |> ignore diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr06.fs.il.bsl similarity index 79% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr06.fs.il.bsl index 368de5fccbb..343c589bdd6 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr06.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -26,36 +25,38 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.ComputationExpr06 { - // Offset: 0x00000000 Length: 0x0000020E + // Offset: 0x00000000 Length: 0x00000261 + // WARNING: managed resource file FSharpSignatureData.ComputationExpr06 created } .mresource public FSharpOptimizationData.ComputationExpr06 { - // Offset: 0x00000218 Length: 0x0000007D + // Offset: 0x00000268 Length: 0x00000073 + // WARNING: managed resource file FSharpOptimizationData.ComputationExpr06 created } .module ComputationExpr06.exe -// MVID: {61F2E23B-35A8-E566-A745-03833BE2F261} +// MVID: {6229AFEB-35A8-E566-A745-0383EBAF2962} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07210000 +// Image base: 0x03960000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed ComputationExpr06 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'res6@9-1' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res6@10-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x @@ -70,28 +71,26 @@ 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.FSharpRef`1 ComputationExpr06/'res6@9-1'::x + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 Program/'res6@10-1'::x IL_000d: ret - } // end of method 'res6@9-1'::.ctor + } // end of method 'res6@10-1'::.ctor .method public strict virtual instance bool Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // 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: 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_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 Program/'res6@10-1'::x + IL_0006: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() IL_000b: ldc.i4.0 IL_000c: cgt IL_000e: ret - } // end of method 'res6@9-1'::Invoke + } // end of method 'res6@10-1'::Invoke - } // end of class 'res6@9-1' + } // end of class 'res6@10-1' - .class auto ansi serializable sealed nested assembly beforefieldinit 'res6@10-2' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res6@11-2' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -111,58 +110,56 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/'res6@10-2'::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res6@11-2'::builder@ IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr06/'res6@10-2'::x + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 Program/'res6@11-2'::x IL_0014: ret - } // end of method 'res6@10-2'::.ctor + } // end of method 'res6@11-2'::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 106 (0x6a) - .maxstack 5 - .line 10,10 : 13,28 '' + // Code size 118 (0x76) + .maxstack 7 IL_0000: ldstr "hello" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: pop - .line 11,11 : 13,28 '' IL_0010: ldstr "hello" IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_001f: pop - .line 12,12 : 13,28 '' IL_0020: ldstr "hello" IL_0025: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_002a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_002f: pop - .line 13,13 : 13,28 '' 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 - .line 14,14 : 13,28 '' IL_0040: ldstr "hello" IL_0045: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_004a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_004f: pop - .line 15,15 : 13,19 '' IL_0050: ldarg.0 - IL_0051: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr06/'res6@10-2'::x - IL_0056: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Decrement(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_005b: nop - IL_005c: ldarg.0 - IL_005d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/'res6@10-2'::builder@ - IL_0062: tail. - IL_0064: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Zero() - IL_0069: ret - } // end of method 'res6@10-2'::Invoke + IL_0051: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 Program/'res6@11-2'::x + IL_0056: ldarg.0 + IL_0057: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 Program/'res6@11-2'::x + IL_005c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0061: ldc.i4.1 + IL_0062: sub + IL_0063: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0068: ldarg.0 + IL_0069: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res6@11-2'::builder@ + IL_006e: tail. + IL_0070: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Zero() + IL_0075: ret + } // end of method 'res6@11-2'::Invoke - } // end of class 'res6@10-2' + } // end of class 'res6@11-2' - .class auto ansi serializable sealed nested assembly beforefieldinit 'res6@16-3' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res6@17-3' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -180,27 +177,26 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/'res6@16-3'::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res6@17-3'::builder@ IL_000d: ret - } // end of method 'res6@16-3'::.ctor + } // end of method 'res6@17-3'::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // Code size 15 (0xf) .maxstack 8 - .line 16,16 : 9,17 '' IL_0000: ldarg.0 - IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/'res6@16-3'::builder@ + IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res6@17-3'::builder@ IL_0006: ldc.i4.1 IL_0007: tail. IL_0009: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) IL_000e: ret - } // end of method 'res6@16-3'::Invoke + } // end of method 'res6@17-3'::Invoke - } // end of class 'res6@16-3' + } // end of class 'res6@17-3' - .class auto ansi serializable sealed nested assembly beforefieldinit res6@8 + .class auto ansi serializable sealed nested assembly beforefieldinit res6@9 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -218,71 +214,70 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/res6@8::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res6@9::builder@ IL_000d: ret - } // end of method res6@8::.ctor + } // end of method res6@9::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // Code size 83 (0x53) .maxstack 10 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) - .line 8,8 : 9,22 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0) 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_0001: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) IL_0006: stloc.0 IL_0007: ldarg.0 - IL_0008: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/res6@8::builder@ + IL_0008: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res6@9::builder@ IL_000d: ldarg.0 - IL_000e: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/res6@8::builder@ + IL_000e: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res6@9::builder@ IL_0013: ldloc.0 - IL_0014: newobj instance void ComputationExpr06/'res6@9-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0014: newobj instance void Program/'res6@10-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_0019: ldarg.0 - IL_001a: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/res6@8::builder@ + IL_001a: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res6@9::builder@ IL_001f: ldarg.0 - IL_0020: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/res6@8::builder@ + IL_0020: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res6@9::builder@ IL_0025: ldloc.0 - IL_0026: newobj instance void ComputationExpr06/'res6@10-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0026: newobj instance void Program/'res6@11-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_002b: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0030: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [ComputationExprLibrary]Library.Eventually`1) IL_0035: ldarg.0 - IL_0036: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/res6@8::builder@ + IL_0036: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res6@9::builder@ IL_003b: ldarg.0 - IL_003c: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/res6@8::builder@ - IL_0041: newobj instance void ComputationExpr06/'res6@16-3'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_003c: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res6@9::builder@ + IL_0041: newobj instance void Program/'res6@17-3'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_0046: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_004b: tail. IL_004d: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Combine(class [ComputationExprLibrary]Library.Eventually`1, class [ComputationExprLibrary]Library.Eventually`1) IL_0052: ret - } // end of method res6@8::Invoke + } // end of method res6@9::Invoke - } // end of class res6@8 + } // end of class res6@9 .method public specialname static class [ComputationExprLibrary]Library.Eventually`1 get_res6() cil managed { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr06::res6@6 + IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res6@7 IL_0005: ret - } // end of method ComputationExpr06::get_res6 + } // end of method Program::get_res6 .property class [ComputationExprLibrary]Library.Eventually`1 res6() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr06::get_res6() - } // end of property ComputationExpr06::res6 -} // end of class ComputationExpr06 + .get class [ComputationExprLibrary]Library.Eventually`1 Program::get_res6() + } // end of property Program::res6 +} // end of class Program -.class private abstract auto ansi sealed ''.$ComputationExpr06 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { - .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res6@6 + .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res6@7 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -291,34 +286,36 @@ .method public static void main@() cil managed { .entrypoint - // Code size 39 (0x27) + // Code size 42 (0x2a) .maxstack 4 - .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 7,7 : 5,15 '' + .locals init (class [ComputationExprLibrary]Library.Eventually`1 V_0, + class [ComputationExprLibrary]Library.EventuallyBuilder V_1, + class [ComputationExprLibrary]Library.Eventually`1 V_2, + int32 V_3, + int32 V_4) IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 IL_0006: ldloc.1 IL_0007: ldloc.1 - IL_0008: newobj instance void ComputationExpr06/res6@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_0008: newobj instance void Program/res6@9::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_000d: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0012: dup - IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr06::res6@6 + IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res6@7 IL_0018: stloc.0 - .line 18,18 : 1,5 '' - IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr06::get_res6() + IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 Program::get_res6() IL_001e: stloc.2 - .line 18,18 : 9,25 '' IL_001f: ldloc.2 IL_0020: call !!0 [ComputationExprLibrary]Library.EventuallyModule::force(class [ComputationExprLibrary]Library.Eventually`1) - IL_0025: pop - IL_0026: ret - } // end of method $ComputationExpr06::main@ + IL_0025: stloc.3 + IL_0026: ldloc.3 + IL_0027: stloc.s V_4 + IL_0029: ret + } // end of method $Program::main@ -} // end of class ''.$ComputationExpr06 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\ComputationExpressions\ComputationExpr06_fs\ComputationExpr06.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs similarity index 67% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs index 341a176b99a..aa1bf720e49 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs @@ -1,13 +1,14 @@ // #Regression #NoMono #NoMT #CodeGen #EmittedIL #ComputationExpressions // Regression test for FSHARP1.0:4972 // Debug ranges for computation expressions +module Program open Library let res7 = eventually { - let x = ref 1 + let mutable x = 1 for v in [0 .. 3] do - x := !x - v - return !x + x <- x - v + return x } -res7 |> Eventually.force +res7 |> Eventually.force |> ignore diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs.il.bsl similarity index 75% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs.il.bsl index f1c492b2867..cfe8102dff3 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -26,36 +25,38 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.ComputationExpr07 { - // Offset: 0x00000000 Length: 0x0000020E + // Offset: 0x00000000 Length: 0x00000261 + // WARNING: managed resource file FSharpSignatureData.ComputationExpr07 created } .mresource public FSharpOptimizationData.ComputationExpr07 { - // Offset: 0x00000218 Length: 0x0000007D + // Offset: 0x00000268 Length: 0x00000073 + // WARNING: managed resource file FSharpOptimizationData.ComputationExpr07 created } .module ComputationExpr07.exe -// MVID: {61F2D6A5-35BD-E566-A745-0383A5D6F261} +// MVID: {6229B0E2-35BD-E566-A745-0383E2B02962} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07190000 +// Image base: 0x00ED0000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed ComputationExpr07 +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'res7@9-1' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res7@10-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -75,44 +76,39 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/'res7@9-1'::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res7@10-1'::builder@ IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr07/'res7@9-1'::x + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 Program/'res7@10-1'::x IL_0014: ret - } // end of method 'res7@9-1'::.ctor + } // end of method 'res7@10-1'::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(int32 _arg1) cil managed { - // Code size 41 (0x29) + // Code size 40 (0x28) .maxstack 7 - .locals init ([0] int32 v) - .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\\ComputationExpressions\\ComputationExpr07.fs' + .locals init (int32 V_0) IL_0000: ldarg.1 IL_0001: stloc.0 - .line 10,10 : 13,24 '' IL_0002: ldarg.0 - IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr07/'res7@9-1'::x + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 Program/'res7@10-1'::x IL_0008: ldarg.0 - IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr07/'res7@9-1'::x - IL_000e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 Program/'res7@10-1'::x + IL_000e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() IL_0013: ldloc.0 IL_0014: sub - IL_0015: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::op_ColonEquals(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - !!0) - IL_001a: nop - IL_001b: ldarg.0 - IL_001c: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/'res7@9-1'::builder@ - IL_0021: tail. - IL_0023: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Zero() - IL_0028: ret - } // end of method 'res7@9-1'::Invoke + IL_0015: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_001a: ldarg.0 + IL_001b: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res7@10-1'::builder@ + IL_0020: tail. + IL_0022: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Zero() + IL_0027: ret + } // end of method 'res7@10-1'::Invoke - } // end of class 'res7@9-1' + } // end of class 'res7@10-1' - .class auto ansi serializable sealed nested assembly beforefieldinit 'res7@11-2' + .class auto ansi serializable sealed nested assembly beforefieldinit 'res7@12-2' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -132,32 +128,31 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/'res7@11-2'::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res7@12-2'::builder@ IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr07/'res7@11-2'::x + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 Program/'res7@12-2'::x IL_0014: ret - } // end of method 'res7@11-2'::.ctor + } // end of method 'res7@12-2'::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // Code size 25 (0x19) .maxstack 8 - .line 11,11 : 9,18 '' IL_0000: ldarg.0 - IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/'res7@11-2'::builder@ + IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/'res7@12-2'::builder@ IL_0006: ldarg.0 - IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr07/'res7@11-2'::x - IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 Program/'res7@12-2'::x + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() IL_0011: tail. IL_0013: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) IL_0018: ret - } // end of method 'res7@11-2'::Invoke + } // end of method 'res7@12-2'::Invoke - } // end of class 'res7@11-2' + } // end of class 'res7@12-2' - .class auto ansi serializable sealed nested assembly beforefieldinit res7@8 + .class auto ansi serializable sealed nested assembly beforefieldinit res7@9 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [ComputationExprLibrary]Library.EventuallyBuilder builder@ @@ -175,25 +170,23 @@ 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 [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/res7@8::builder@ + IL_0008: stfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ IL_000d: ret - } // end of method res7@8::.ctor + } // end of method res7@9::.ctor .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { // Code size 85 (0x55) .maxstack 9 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) - .line 8,8 : 9,22 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0) 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_0001: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) IL_0006: stloc.0 IL_0007: ldarg.0 - IL_0008: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/res7@8::builder@ - .line 9,9 : 9,12 '' + IL_0008: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ IL_000d: ldarg.0 - IL_000e: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/res7@8::builder@ + IL_000e: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ IL_0013: ldc.i4.0 IL_0014: ldc.i4.1 IL_0015: ldc.i4.3 @@ -203,49 +196,49 @@ IL_001b: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0020: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0025: ldarg.0 - IL_0026: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/res7@8::builder@ + IL_0026: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ IL_002b: ldloc.0 - IL_002c: newobj instance void ComputationExpr07/'res7@9-1'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_002c: newobj instance void Program/'res7@10-1'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_0031: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::For(class [mscorlib]System.Collections.Generic.IEnumerable`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0036: ldarg.0 - IL_0037: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/res7@8::builder@ + IL_0037: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ IL_003c: ldarg.0 - IL_003d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/res7@8::builder@ + IL_003d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ IL_0042: ldloc.0 - IL_0043: newobj instance void ComputationExpr07/'res7@11-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0043: newobj instance void Program/'res7@12-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_0048: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_004d: tail. IL_004f: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Combine(class [ComputationExprLibrary]Library.Eventually`1, class [ComputationExprLibrary]Library.Eventually`1) IL_0054: ret - } // end of method res7@8::Invoke + } // end of method res7@9::Invoke - } // end of class res7@8 + } // end of class res7@9 .method public specialname static class [ComputationExprLibrary]Library.Eventually`1 get_res7() cil managed { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr07::res7@6 + IL_0000: ldsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res7@7 IL_0005: ret - } // end of method ComputationExpr07::get_res7 + } // end of method Program::get_res7 .property class [ComputationExprLibrary]Library.Eventually`1 res7() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr07::get_res7() - } // end of property ComputationExpr07::res7 -} // end of class ComputationExpr07 + .get class [ComputationExprLibrary]Library.Eventually`1 Program::get_res7() + } // end of property Program::res7 +} // end of class Program -.class private abstract auto ansi sealed ''.$ComputationExpr07 +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { - .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res7@6 + .field static assembly class [ComputationExprLibrary]Library.Eventually`1 res7@7 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -254,34 +247,36 @@ .method public static void main@() cil managed { .entrypoint - // Code size 39 (0x27) + // Code size 42 (0x2a) .maxstack 4 - .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 7,7 : 5,15 '' + .locals init (class [ComputationExprLibrary]Library.Eventually`1 V_0, + class [ComputationExprLibrary]Library.EventuallyBuilder V_1, + class [ComputationExprLibrary]Library.Eventually`1 V_2, + int32 V_3, + int32 V_4) IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 IL_0006: ldloc.1 IL_0007: ldloc.1 - IL_0008: newobj instance void ComputationExpr07/res7@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_0008: newobj instance void Program/res7@9::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) IL_000d: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0012: dup - IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$ComputationExpr07::res7@6 + IL_0013: stsfld class [ComputationExprLibrary]Library.Eventually`1 ''.$Program::res7@7 IL_0018: stloc.0 - .line 13,13 : 1,5 '' - IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 ComputationExpr07::get_res7() + IL_0019: call class [ComputationExprLibrary]Library.Eventually`1 Program::get_res7() IL_001e: stloc.2 - .line 13,13 : 9,25 '' IL_001f: ldloc.2 IL_0020: call !!0 [ComputationExprLibrary]Library.EventuallyModule::force(class [ComputationExprLibrary]Library.Eventually`1) - IL_0025: pop - IL_0026: ret - } // end of method $ComputationExpr07::main@ + IL_0025: stloc.3 + IL_0026: ldloc.3 + IL_0027: stloc.s V_4 + IL_0029: ret + } // end of method $Program::main@ -} // end of class ''.$ComputationExpr07 +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\ComputationExpressions\ComputationExpr07_fs\ComputationExpr07.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExprLibrary.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExprLibrary.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExprLibrary.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExprLibrary.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs new file mode 100644 index 00000000000..0c1610a85f9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs @@ -0,0 +1,59 @@ +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open System.IO +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module ComputationExpressions = + + let computationExprLibrary = + Fsx (loadSourceFromFile (Path.Combine(__SOURCE_DIRECTORY__, "ComputationExprLibrary.fs"))) + |> withName "ComputationExprLibrary" + + let verifyCompilation compilation = + compilation + |> asFs + |> withOptions ["--test:EmitFeeFeeAs100001"] + |> asExe + |> withReferences [computationExprLibrary] + |> withNoOptimize + |> withEmbeddedPdb + |> withEmbedAllSource + |> ignoreWarnings + |> verifyILBaseline + + [] + let ``ComputationExpr01_fs`` compilation = + compilation + |> verifyCompilation + + [] + let ``ComputationExpr02_fs`` compilation = + compilation + |> verifyCompilation + + [] + let ``ComputationExpr03_fs`` compilation = + compilation + |> verifyCompilation + + [] + let ``ComputationExpr04_fs`` compilation = + compilation + |> verifyCompilation + + [] + let ``ComputationExpr05_fs`` compilation = + compilation + |> verifyCompilation + + [] + let ``ComputationExpr06_fs`` compilation = + compilation + |> verifyCompilation + + [] + let ``ComputationExpr07_fs`` compilation = + compilation + |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs new file mode 100644 index 00000000000..9c76d744692 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs @@ -0,0 +1,96 @@ +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open System.IO +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module DoNotBoxStruct = + + let computationExprLibrary = + FsxFromPath (Path.Combine(__SOURCE_DIRECTORY__, "DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs")) + |> withName "DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth_fs" + + let verifyCompilation compilation = + compilation + |> asFs + |> withOptions ["--test:EmitFeeFeeAs100001"] + |> asExe + |> withReferences [computationExprLibrary] + |> withNoOptimize + |> withEmbeddedPdb + |> withEmbedAllSource + |> ignoreWarnings + |> verifyILBaseline + + //SOURCE=DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs + [] + let ``DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_Array_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs + [] + let ``DoNotBoxStruct_Array_FSInterface_NoExtMeth_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs - + [] + let ``DoNotBoxStruct_MDArray_FSInterface_NoExtMeth_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs - + [] + let ``DoNotBoxStruct_NoArray_FSInterface_NoExtMeth_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_ArrayOfArray_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ArrayOfArray_CSInterface.exe" # DoNotBoxStruct_ArrayOfArray_CSInterface.fs + [] + let ``DoNotBoxStruct_ArrayOfArray_CSInterface_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_Array_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_Array_CSInterface.exe" # DoNotBoxStruct_Array_CSInterface.fs + [] + let ``DoNotBoxStruct_Array_CSInterface_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_Array_FSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_Array_FSInterface.exe" # DoNotBoxStruct_Array_FSInterface.fs - + [] + let ``DoNotBoxStruct_Array_FSInterface_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_MDArray_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_MDArray_CSInterface.exe" # DoNotBoxStruct_MDArray_CSInterface.fs - + [] + let ``DoNotBoxStruct_MDArray_CSInterface_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_MDArray_FSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_MDArray_FSInterface.exe" # DoNotBoxStruct_MDArray_FSInterface.fs - + [] + let ``DoNotBoxStruct_MDArray_FSInterface_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_NoArray_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_NoArray_CSInterface.exe" # DoNotBoxStruct_NoArray_CSInterface.fs + [] + let ``DoNotBoxStruct_NoArray_CSInterface_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_NoArray_FSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_NoArray_FSInterface.exe" # DoNotBoxStruct_NoArray_FSInterface.fs - + [] + let ``DoNotBoxStruct_NoArray_FSInterface_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=DoNotBoxStruct_ToString.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ToString.exe" # DoNotBoxStruct_ToString.fs + [] + let ``DoNotBoxStruct_ToString_fs`` compilation = + compilation + |> verifyCompilation diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs similarity index 94% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs index 8a5d4156983..2f6ff63d2a2 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs @@ -2,4 +2,5 @@ // Regression test for FSHARP1.0:4237 // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Array of array +module Program let F<'T when 'T :> System.IDisposable>(x : 'T[][]) = x.[0].[0].Dispose() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs.il.bsl similarity index 70% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs.il.bsl index 70c28499d91..9d95e463b77 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_CSInterface.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_ArrayOfArray_CSInterface { @@ -22,32 +21,34 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_ArrayOfArray_CSInterface { - // Offset: 0x00000000 Length: 0x0000026E + // Offset: 0x00000000 Length: 0x000002C5 + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_ArrayOfArray_CSInterface created } .mresource public FSharpOptimizationData.DoNotBoxStruct_ArrayOfArray_CSInterface { - // Offset: 0x00000278 Length: 0x000000A6 + // Offset: 0x000002D0 Length: 0x00000086 + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_ArrayOfArray_CSInterface created } .module DoNotBoxStruct_ArrayOfArray_CSInterface.exe -// MVID: {59B1920A-FF24-C89E-A745-03830A92B159} +// MVID: {622FB092-FF24-C89E-A745-038392B02F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x015B0000 +// Image base: 0x034F0000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_ArrayOfArray_CSInterface +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) @@ -55,8 +56,6 @@ { // Code size 27 (0x1b) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 55,74 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_ArrayOfArray_CSInterface.fs' IL_0000: ldarg.0 IL_0001: ldc.i4.0 IL_0002: ldelem !!T[] @@ -66,11 +65,11 @@ IL_000f: constrained. !!T IL_0015: callvirt instance void [mscorlib]System.IDisposable::Dispose() IL_001a: ret - } // end of method DoNotBoxStruct_ArrayOfArray_CSInterface::F + } // end of method Program::F -} // end of class DoNotBoxStruct_ArrayOfArray_CSInterface +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_ArrayOfArray_CSInterface +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -79,11 +78,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_ArrayOfArray_CSInterface::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_ArrayOfArray_CSInterface +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_ArrayOfArray_CSInterface_fs\DoNotBoxStruct_ArrayOfArray_CSInterface.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs.il.bsl similarity index 73% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs.il.bsl index ca9de145cae..54d723a207e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth { @@ -22,32 +21,34 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth { - // Offset: 0x00000000 Length: 0x0000028D + // Offset: 0x00000000 Length: 0x00000309 + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth created } .mresource public FSharpOptimizationData.DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth { - // Offset: 0x00000298 Length: 0x000000BA + // Offset: 0x00000310 Length: 0x000000B2 + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth created } .module DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.exe -// MVID: {60E47018-1475-D984-A745-03831870E460} +// MVID: {622F94EB-1475-D984-A745-0383EB942F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07120000 +// Image base: 0x03590000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth +.class public abstract auto ansi sealed Temp_d9c57b50_f08f_4213_8e13_980a9d7127e0 extends [mscorlib]System.Object { .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 ) @@ -60,8 +61,6 @@ { // Code size 1 (0x1) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 80,82 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs' IL_0000: ret } // end of method F@6::Invoke @@ -71,7 +70,6 @@ { // Code size 40 (0x28) .maxstack 8 - .line 6,6 : 48,83 '' IL_0000: ldarg.0 IL_0001: ldc.i4.0 IL_0002: ldelem !!T[] @@ -79,19 +77,19 @@ IL_0008: readonly. IL_000a: ldelema !!T IL_000f: ldnull - IL_0010: ldftn void DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth/F@6::Invoke(object, - int32) + IL_0010: ldftn void Temp_d9c57b50_f08f_4213_8e13_980a9d7127e0/F@6::Invoke(object, + int32) IL_0016: newobj instance void class [FSharp.Core]Microsoft.FSharp.Control.FSharpHandler`1::.ctor(object, native int) IL_001b: constrained. !!T IL_0021: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Control.IDelegateEvent`1>::AddHandler(!0) IL_0026: nop IL_0027: ret - } // end of method DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth::F + } // end of method Temp_d9c57b50_f08f_4213_8e13_980a9d7127e0::F -} // end of class DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth +} // end of class Temp_d9c57b50_f08f_4213_8e13_980a9d7127e0 -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth +.class private abstract auto ansi sealed ''.$Temp_d9c57b50_f08f_4213_8e13_980a9d7127e0 extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -100,11 +98,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth::main@ + } // end of method $Temp_d9c57b50_f08f_4213_8e13_980a9d7127e0::main@ -} // end of class ''.$DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth +} // end of class ''.$Temp_d9c57b50_f08f_4213_8e13_980a9d7127e0 // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth_fs\DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs similarity index 96% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs index 1c8d12e46e2..693ccf9749b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs @@ -3,4 +3,5 @@ // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Array of array - use an F# interface (IEvent<'a> for example) // Note: the 'AddHandler' is some non-extension method +module Program let F<'T when 'T :> IEvent>(x : 'T[][]) = x.[0].[0].AddHandler(fun x _ -> ()) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs.il.bsl new file mode 100644 index 00000000000..f027f67781a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs.il.bsl @@ -0,0 +1,109 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth +{ + // Offset: 0x00000000 Length: 0x000002E7 + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth created +} +.mresource public FSharpOptimizationData.DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth +{ + // Offset: 0x000002F0 Length: 0x00000090 + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth created +} +.module DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.exe +// MVID: {622F9D84-1475-D984-A745-0383849D2F62} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x03760000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Program + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname F@7 + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .method assembly static void Invoke(object x, + int32 _arg1) cil managed + { + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method F@7::Invoke + + } // end of class F@7 + + .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T[][] x) cil managed + { + // Code size 40 (0x28) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldelem !!T[] + IL_0007: ldc.i4.0 + IL_0008: readonly. + IL_000a: ldelema !!T + IL_000f: ldnull + IL_0010: ldftn void Program/F@7::Invoke(object, + int32) + IL_0016: newobj instance void class [FSharp.Core]Microsoft.FSharp.Control.FSharpHandler`1::.ctor(object, + native int) + IL_001b: constrained. !!T + IL_0021: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Control.IDelegateEvent`1>::AddHandler(!0) + IL_0026: nop + IL_0027: ret + } // end of method Program::F + +} // end of class Program + +.class private abstract auto ansi sealed ''.$Program + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $Program::main@ + +} // end of class ''.$Program + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth_fs\DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs similarity index 94% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs index d73c20662b8..b9652b34734 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs @@ -2,4 +2,5 @@ // Regression test for FSHARP1.0:4237 // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Single dimentional array +module Program let F<'T when 'T :> System.IDisposable>(x : 'T[]) = x.[0].Dispose() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs.il.bsl similarity index 70% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs.il.bsl index ca6aa2077fe..d68c309ba45 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_CSInterface.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_Array_CSInterface { @@ -22,32 +21,34 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_Array_CSInterface { - // Offset: 0x00000000 Length: 0x00000255 + // Offset: 0x00000000 Length: 0x000002AC + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_Array_CSInterface created } .mresource public FSharpOptimizationData.DoNotBoxStruct_Array_CSInterface { - // Offset: 0x00000260 Length: 0x00000098 + // Offset: 0x000002B0 Length: 0x0000007F + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_Array_CSInterface created } .module DoNotBoxStruct_Array_CSInterface.exe -// MVID: {59B1920A-1735-654E-A745-03830A92B159} +// MVID: {622FACDF-1735-654E-A745-0383DFAC2F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x031D0000 +// Image base: 0x03D60000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_Array_CSInterface +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) @@ -55,8 +56,6 @@ { // 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 : 53,68 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_Array_CSInterface.fs' IL_0000: ldarg.0 IL_0001: ldc.i4.0 IL_0002: readonly. @@ -64,11 +63,11 @@ IL_0009: constrained. !!T IL_000f: callvirt instance void [mscorlib]System.IDisposable::Dispose() IL_0014: ret - } // end of method DoNotBoxStruct_Array_CSInterface::F + } // end of method Program::F -} // end of class DoNotBoxStruct_Array_CSInterface +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_Array_CSInterface +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -77,11 +76,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_Array_CSInterface::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_Array_CSInterface +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_Array_CSInterface_fs\DoNotBoxStruct_Array_CSInterface.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs similarity index 95% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs index 0e2fd8e7234..ddcecaceaab 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs @@ -2,4 +2,5 @@ // Regression test for FSHARP1.0:4237 // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Single dimentional array - use an F# interface (IEvent<'a> for example) +module Program let F<'T when 'T :> IEvent>(x : 'T[]) = x.[0].Add(fun x -> ()) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs.il.bsl similarity index 72% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs.il.bsl index ac37c4ffa3f..ea3628c5c49 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_Array_FSInterface { @@ -22,39 +21,41 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_Array_FSInterface { - // Offset: 0x00000000 Length: 0x00000255 + // Offset: 0x00000000 Length: 0x000002B0 + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_Array_FSInterface created } .mresource public FSharpOptimizationData.DoNotBoxStruct_Array_FSInterface { - // Offset: 0x00000260 Length: 0x00000098 + // Offset: 0x000002B8 Length: 0x0000007F + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_Array_FSInterface created } .module DoNotBoxStruct_Array_FSInterface.exe -// MVID: {5FCFFD0B-1737-9DA5-A745-03830BFDCF5F} +// MVID: {622FB008-1737-9DA5-A745-038308B02F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07340000 +// Image base: 0x035E0000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_Array_FSInterface +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class auto ansi serializable sealed nested assembly beforefieldinit F@5 + .class auto ansi serializable sealed nested assembly beforefieldinit F@6 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field static assembly initonly class DoNotBoxStruct_Array_FSInterface/F@5 @_instance + .field static assembly initonly class Program/F@6 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { @@ -65,51 +66,48 @@ IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ret - } // end of method F@5::.ctor + } // end of method F@6::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(int32 x) cil managed { // Code size 2 (0x2) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 65,67 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_Array_FSInterface.fs' IL_0000: ldnull IL_0001: ret - } // end of method F@5::Invoke + } // end of method F@6::Invoke .method private specialname rtspecialname static void .cctor() cil managed { // Code size 11 (0xb) .maxstack 10 - IL_0000: newobj instance void DoNotBoxStruct_Array_FSInterface/F@5::.ctor() - IL_0005: stsfld class DoNotBoxStruct_Array_FSInterface/F@5 DoNotBoxStruct_Array_FSInterface/F@5::@_instance + IL_0000: newobj instance void Program/F@6::.ctor() + IL_0005: stsfld class Program/F@6 Program/F@6::@_instance IL_000a: ret - } // end of method F@5::.cctor + } // end of method F@6::.cctor - } // end of class F@5 + } // end of class F@6 .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T[] x) cil managed { // Code size 30 (0x1e) .maxstack 8 - .line 5,5 : 46,68 '' IL_0000: ldarg.0 IL_0001: ldc.i4.0 IL_0002: ldelem !!T IL_0007: box !!T IL_000c: unbox.any class [mscorlib]System.IObservable`1 - IL_0011: ldsfld class DoNotBoxStruct_Array_FSInterface/F@5 DoNotBoxStruct_Array_FSInterface/F@5::@_instance + IL_0011: ldsfld class Program/F@6 Program/F@6::@_instance IL_0016: tail. IL_0018: call void [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::AddToObservable(class [mscorlib]System.IObservable`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) IL_001d: ret - } // end of method DoNotBoxStruct_Array_FSInterface::F + } // end of method Program::F -} // end of class DoNotBoxStruct_Array_FSInterface +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_Array_FSInterface +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -118,11 +116,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_Array_FSInterface::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_Array_FSInterface +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_Array_FSInterface_fs\DoNotBoxStruct_Array_FSInterface.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs similarity index 96% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs index db2a824cd41..015ba793522 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs @@ -3,4 +3,5 @@ // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Single dimentional array - use an F# interface (IEvent<'a> for example) // Note: the 'AddHandler' is some non-extension method +module Program let F<'T when 'T :> IEvent>(x : 'T[]) = x.[0].AddHandler(fun x _ -> ()) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs.il.bsl similarity index 71% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs.il.bsl index 49e25d8ea32..94c94be7f2e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_Array_FSInterface_NoExtMeth { @@ -22,36 +21,38 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_Array_FSInterface_NoExtMeth { - // Offset: 0x00000000 Length: 0x00000273 + // Offset: 0x00000000 Length: 0x000002CE + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_Array_FSInterface_NoExtMeth created } .mresource public FSharpOptimizationData.DoNotBoxStruct_Array_FSInterface_NoExtMeth { - // Offset: 0x00000278 Length: 0x000000AC + // Offset: 0x000002D8 Length: 0x00000089 + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_Array_FSInterface_NoExtMeth created } .module DoNotBoxStruct_Array_FSInterface_NoExtMeth.exe -// MVID: {60E47018-8127-3EE3-A745-03831870E460} +// MVID: {622FA2D8-8127-3EE3-A745-0383D8A22F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x054A0000 +// Image base: 0x03730000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_Array_FSInterface_NoExtMeth +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname F@6 + .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname F@7 extends [mscorlib]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) @@ -60,36 +61,33 @@ { // Code size 1 (0x1) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 74,76 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs' IL_0000: ret - } // end of method F@6::Invoke + } // end of method F@7::Invoke - } // end of class F@6 + } // end of class F@7 .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T[] x) cil managed { // Code size 34 (0x22) .maxstack 8 - .line 6,6 : 46,77 '' IL_0000: ldarg.0 IL_0001: ldc.i4.0 IL_0002: readonly. IL_0004: ldelema !!T IL_0009: ldnull - IL_000a: ldftn void DoNotBoxStruct_Array_FSInterface_NoExtMeth/F@6::Invoke(object, - int32) + IL_000a: ldftn void Program/F@7::Invoke(object, + int32) IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Control.FSharpHandler`1::.ctor(object, native int) IL_0015: constrained. !!T IL_001b: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Control.IDelegateEvent`1>::AddHandler(!0) IL_0020: nop IL_0021: ret - } // end of method DoNotBoxStruct_Array_FSInterface_NoExtMeth::F + } // end of method Program::F -} // end of class DoNotBoxStruct_Array_FSInterface_NoExtMeth +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_Array_FSInterface_NoExtMeth +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -98,11 +96,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_Array_FSInterface_NoExtMeth::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_Array_FSInterface_NoExtMeth +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_Array_FSInterface_NoExtMeth_fs\DoNotBoxStruct_Array_FSInterface_NoExtMeth.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs similarity index 94% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs index d4613d97757..bdf6e8880cf 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs @@ -2,4 +2,5 @@ // Regression test for FSHARP1.0:4237 // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Multi-dimentional array +module Program let F<'T when 'T :> System.IDisposable>(x : 'T[,]) = x.[0,0].Dispose() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs.il.bsl similarity index 71% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs.il.bsl index cfeba995ccf..5fdd0dae5b6 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_CSInterface.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_MDArray_CSInterface { @@ -22,32 +21,34 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_MDArray_CSInterface { - // Offset: 0x00000000 Length: 0x0000025C + // Offset: 0x00000000 Length: 0x000002B3 + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_MDArray_CSInterface created } .mresource public FSharpOptimizationData.DoNotBoxStruct_MDArray_CSInterface { - // Offset: 0x00000260 Length: 0x0000009C + // Offset: 0x000002B8 Length: 0x00000081 + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_MDArray_CSInterface created } .module DoNotBoxStruct_MDArray_CSInterface.exe -// MVID: {59B1920A-24A8-8796-A745-03830A92B159} +// MVID: {622FB5B7-24A8-8796-A745-0383B7B52F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00DD0000 +// Image base: 0x04810000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_MDArray_CSInterface +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) @@ -55,8 +56,6 @@ { // Code size 22 (0x16) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 54,71 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_MDArray_CSInterface.fs' IL_0000: ldarg.0 IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 @@ -66,11 +65,11 @@ IL_000a: constrained. !!T IL_0010: callvirt instance void [mscorlib]System.IDisposable::Dispose() IL_0015: ret - } // end of method DoNotBoxStruct_MDArray_CSInterface::F + } // end of method Program::F -} // end of class DoNotBoxStruct_MDArray_CSInterface +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_MDArray_CSInterface +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -79,11 +78,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_MDArray_CSInterface::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_MDArray_CSInterface +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_MDArray_CSInterface_fs\DoNotBoxStruct_MDArray_CSInterface.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs similarity index 95% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs index 127177c89e2..97947096935 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs @@ -2,4 +2,5 @@ // Regression test for FSHARP1.0:4237 // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Multi-dimentional array - use an F# interface (IEvent<'a> for example) +module Program let F<'T when 'T :> IEvent>(x : 'T[,]) = x.[0,0].Add(fun x -> ()) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs.il.bsl similarity index 72% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs.il.bsl index f2c29723485..7139275e41b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_MDArray_FSInterface { @@ -22,39 +21,41 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_MDArray_FSInterface { - // Offset: 0x00000000 Length: 0x0000025C + // Offset: 0x00000000 Length: 0x000002B7 + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_MDArray_FSInterface created } .mresource public FSharpOptimizationData.DoNotBoxStruct_MDArray_FSInterface { - // Offset: 0x00000260 Length: 0x0000009C + // Offset: 0x000002C0 Length: 0x00000081 + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_MDArray_FSInterface created } .module DoNotBoxStruct_MDArray_FSInterface.exe -// MVID: {5FCFFD0B-8279-DA45-A745-03830BFDCF5F} +// MVID: {622FB34C-8279-DA45-A745-03834CB32F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A00000 +// Image base: 0x04FD0000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_MDArray_FSInterface +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class auto ansi serializable sealed nested assembly beforefieldinit F@5 + .class auto ansi serializable sealed nested assembly beforefieldinit F@6 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field static assembly initonly class DoNotBoxStruct_MDArray_FSInterface/F@5 @_instance + .field static assembly initonly class Program/F@6 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { @@ -65,36 +66,33 @@ IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ret - } // end of method F@5::.ctor + } // end of method F@6::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(int32 x) cil managed { // Code size 2 (0x2) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 68,70 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_MDArray_FSInterface.fs' IL_0000: ldnull IL_0001: ret - } // end of method F@5::Invoke + } // end of method F@6::Invoke .method private specialname rtspecialname static void .cctor() cil managed { // Code size 11 (0xb) .maxstack 10 - IL_0000: newobj instance void DoNotBoxStruct_MDArray_FSInterface/F@5::.ctor() - IL_0005: stsfld class DoNotBoxStruct_MDArray_FSInterface/F@5 DoNotBoxStruct_MDArray_FSInterface/F@5::@_instance + IL_0000: newobj instance void Program/F@6::.ctor() + IL_0005: stsfld class Program/F@6 Program/F@6::@_instance IL_000a: ret - } // end of method F@5::.cctor + } // end of method F@6::.cctor - } // end of class F@5 + } // end of class F@6 .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T[0...,0...] x) cil managed { // Code size 31 (0x1f) .maxstack 8 - .line 5,5 : 47,71 '' IL_0000: ldarg.0 IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 @@ -102,16 +100,16 @@ int32) IL_0008: box !!T IL_000d: unbox.any class [mscorlib]System.IObservable`1 - IL_0012: ldsfld class DoNotBoxStruct_MDArray_FSInterface/F@5 DoNotBoxStruct_MDArray_FSInterface/F@5::@_instance + IL_0012: ldsfld class Program/F@6 Program/F@6::@_instance IL_0017: tail. IL_0019: call void [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::AddToObservable(class [mscorlib]System.IObservable`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) IL_001e: ret - } // end of method DoNotBoxStruct_MDArray_FSInterface::F + } // end of method Program::F -} // end of class DoNotBoxStruct_MDArray_FSInterface +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_MDArray_FSInterface +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -120,11 +118,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_MDArray_FSInterface::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_MDArray_FSInterface +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_MDArray_FSInterface_fs\DoNotBoxStruct_MDArray_FSInterface.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs similarity index 96% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs index 91ffd0ec026..017f7530e56 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs @@ -3,4 +3,5 @@ // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Multi-dimentional array - use an F# interface (IEvent<'a> for example) // Note: the 'AddHandler' is some non-extension method +module Program let F<'T when 'T :> IEvent>(x : 'T[,]) = x.[0,0].AddHandler(fun x _ -> ()) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs.il.bsl similarity index 71% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs.il.bsl index 5112dc687d5..cfbb65d2a68 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_MDArray_FSInterface_NoExtMeth { @@ -22,36 +21,38 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_MDArray_FSInterface_NoExtMeth { - // Offset: 0x00000000 Length: 0x0000027A + // Offset: 0x00000000 Length: 0x000002D5 + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_MDArray_FSInterface_NoExtMeth created } .mresource public FSharpOptimizationData.DoNotBoxStruct_MDArray_FSInterface_NoExtMeth { - // Offset: 0x00000280 Length: 0x000000B0 + // Offset: 0x000002E0 Length: 0x0000008B + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_MDArray_FSInterface_NoExtMeth created } .module DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.exe -// MVID: {60E47018-A67D-867A-A745-03831870E460} +// MVID: {622FAC66-A67D-867A-A745-038366AC2F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x056F0000 +// Image base: 0x00D00000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_MDArray_FSInterface_NoExtMeth +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname F@6 + .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname F@7 extends [mscorlib]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) @@ -60,18 +61,15 @@ { // Code size 1 (0x1) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 77,79 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs' IL_0000: ret - } // end of method F@6::Invoke + } // end of method F@7::Invoke - } // end of class F@6 + } // end of class F@7 .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T[0...,0...] x) cil managed { // Code size 35 (0x23) .maxstack 8 - .line 6,6 : 47,80 '' IL_0000: ldarg.0 IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 @@ -79,19 +77,19 @@ IL_0005: call instance !!T& !!T[0...,0...]::Address(int32, int32) IL_000a: ldnull - IL_000b: ldftn void DoNotBoxStruct_MDArray_FSInterface_NoExtMeth/F@6::Invoke(object, - int32) + IL_000b: ldftn void Program/F@7::Invoke(object, + int32) IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Control.FSharpHandler`1::.ctor(object, native int) IL_0016: constrained. !!T IL_001c: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Control.IDelegateEvent`1>::AddHandler(!0) IL_0021: nop IL_0022: ret - } // end of method DoNotBoxStruct_MDArray_FSInterface_NoExtMeth::F + } // end of method Program::F -} // end of class DoNotBoxStruct_MDArray_FSInterface_NoExtMeth +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_MDArray_FSInterface_NoExtMeth +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -100,11 +98,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_MDArray_FSInterface_NoExtMeth::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_MDArray_FSInterface_NoExtMeth +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_MDArray_FSInterface_NoExtMeth_fs\DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs similarity index 94% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs index d11b2f2659f..ad1ea5ea6a9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs @@ -2,4 +2,5 @@ // Regression test for FSHARP1.0:4237 // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Non-array +module Program let F<'T when 'T :> System.IDisposable>(x : 'T) = x.Dispose() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs.il.bsl similarity index 69% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs.il.bsl index 4b9a226ab6a..6d922982582 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_CSInterface.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_NoArray_CSInterface { @@ -22,32 +21,34 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_NoArray_CSInterface { - // Offset: 0x00000000 Length: 0x0000024C + // Offset: 0x00000000 Length: 0x000002A3 + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_NoArray_CSInterface created } .mresource public FSharpOptimizationData.DoNotBoxStruct_NoArray_CSInterface { - // Offset: 0x00000250 Length: 0x0000009C + // Offset: 0x000002A8 Length: 0x00000081 + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_NoArray_CSInterface created } .module DoNotBoxStruct_NoArray_CSInterface.exe -// MVID: {59B1920A-5654-8082-A745-03830A92B159} +// MVID: {622FB542-5654-8082-A745-038342B52F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00B50000 +// Image base: 0x00C60000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_NoArray_CSInterface +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) @@ -55,20 +56,18 @@ { // Code size 16 (0x10) .maxstack 3 - .locals init ([0] !!T V_0) - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 51,62 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_NoArray_CSInterface.fs' + .locals init (!!T V_0) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloca.s V_0 IL_0004: constrained. !!T IL_000a: callvirt instance void [mscorlib]System.IDisposable::Dispose() IL_000f: ret - } // end of method DoNotBoxStruct_NoArray_CSInterface::F + } // end of method Program::F -} // end of class DoNotBoxStruct_NoArray_CSInterface +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_NoArray_CSInterface +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -77,11 +76,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_NoArray_CSInterface::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_NoArray_CSInterface +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_NoArray_CSInterface_fs\DoNotBoxStruct_NoArray_CSInterface.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs similarity index 95% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs index 33ba70a5866..e0ace1ac393 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs @@ -2,4 +2,5 @@ // Regression test for FSHARP1.0:4237 // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Non-array - use an F# interface (IEvent<'a> for example) +module Program let F<'T when 'T :> IEvent>(x : 'T) = x.Add(fun x -> ()) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs.il.bsl similarity index 71% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs.il.bsl index 4df05e344dd..3a98dc77e35 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_NoArray_FSInterface { @@ -22,39 +21,41 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_NoArray_FSInterface { - // Offset: 0x00000000 Length: 0x0000024C + // Offset: 0x00000000 Length: 0x000002A7 + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_NoArray_FSInterface created } .mresource public FSharpOptimizationData.DoNotBoxStruct_NoArray_FSInterface { - // Offset: 0x00000250 Length: 0x0000009C + // Offset: 0x000002B0 Length: 0x00000081 + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_NoArray_FSInterface created } .module DoNotBoxStruct_NoArray_FSInterface.exe -// MVID: {5FCFFD0B-3F8A-B9D0-A745-03830BFDCF5F} +// MVID: {622FB631-3F8A-B9D0-A745-038331B62F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AB0000 +// Image base: 0x00D20000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_NoArray_FSInterface +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class auto ansi serializable sealed nested assembly beforefieldinit F@5 + .class auto ansi serializable sealed nested assembly beforefieldinit F@6 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field static assembly initonly class DoNotBoxStruct_NoArray_FSInterface/F@5 @_instance + .field static assembly initonly class Program/F@6 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { @@ -65,49 +66,46 @@ IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ret - } // end of method F@5::.ctor + } // end of method F@6::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(int32 x) cil managed { // Code size 2 (0x2) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 59,61 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_NoArray_FSInterface.fs' IL_0000: ldnull IL_0001: ret - } // end of method F@5::Invoke + } // end of method F@6::Invoke .method private specialname rtspecialname static void .cctor() cil managed { // Code size 11 (0xb) .maxstack 10 - IL_0000: newobj instance void DoNotBoxStruct_NoArray_FSInterface/F@5::.ctor() - IL_0005: stsfld class DoNotBoxStruct_NoArray_FSInterface/F@5 DoNotBoxStruct_NoArray_FSInterface/F@5::@_instance + IL_0000: newobj instance void Program/F@6::.ctor() + IL_0005: stsfld class Program/F@6 Program/F@6::@_instance IL_000a: ret - } // end of method F@5::.cctor + } // end of method F@6::.cctor - } // end of class F@5 + } // end of class F@6 .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T x) cil managed { // Code size 24 (0x18) .maxstack 8 - .line 5,5 : 44,62 '' IL_0000: ldarg.0 IL_0001: box !!T IL_0006: unbox.any class [mscorlib]System.IObservable`1 - IL_000b: ldsfld class DoNotBoxStruct_NoArray_FSInterface/F@5 DoNotBoxStruct_NoArray_FSInterface/F@5::@_instance + IL_000b: ldsfld class Program/F@6 Program/F@6::@_instance IL_0010: tail. IL_0012: call void [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::AddToObservable(class [mscorlib]System.IObservable`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) IL_0017: ret - } // end of method DoNotBoxStruct_NoArray_FSInterface::F + } // end of method Program::F -} // end of class DoNotBoxStruct_NoArray_FSInterface +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_NoArray_FSInterface +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -116,11 +114,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_NoArray_FSInterface::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_NoArray_FSInterface +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_NoArray_FSInterface_fs\DoNotBoxStruct_NoArray_FSInterface.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs similarity index 96% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs index f26527fc854..82842076f61 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs @@ -3,4 +3,5 @@ // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // Non-array - use an F# interface (IEvent<'a> for example) // Note: the 'AddHandler' is some non-extension method +module Program let F<'T when 'T :> IEvent>(x : 'T) = x.AddHandler(fun x _ -> ()) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs.il.bsl similarity index 70% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs.il.bsl index 191a24a1018..8d6d655f5f5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_NoArray_FSInterface_NoExtMeth { @@ -22,36 +21,38 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_NoArray_FSInterface_NoExtMeth { - // Offset: 0x00000000 Length: 0x0000026A + // Offset: 0x00000000 Length: 0x000002C5 + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_NoArray_FSInterface_NoExtMeth created } .mresource public FSharpOptimizationData.DoNotBoxStruct_NoArray_FSInterface_NoExtMeth { - // Offset: 0x00000270 Length: 0x000000B0 + // Offset: 0x000002D0 Length: 0x0000008B + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_NoArray_FSInterface_NoExtMeth created } .module DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.exe -// MVID: {60E47018-CD0A-F713-A745-03831870E460} +// MVID: {622FB677-CD0A-F713-A745-038377B62F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A30000 +// Image base: 0x03500000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_NoArray_FSInterface_NoExtMeth +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) - .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname F@6 + .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname F@7 extends [mscorlib]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) @@ -60,36 +61,33 @@ { // Code size 1 (0x1) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 68,70 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs' IL_0000: ret - } // end of method F@6::Invoke + } // end of method F@7::Invoke - } // end of class F@6 + } // end of class F@7 .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T x) cil managed { // Code size 29 (0x1d) .maxstack 5 - .locals init ([0] !!T V_0) - .line 6,6 : 44,71 '' + .locals init (!!T V_0) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloca.s V_0 IL_0004: ldnull - IL_0005: ldftn void DoNotBoxStruct_NoArray_FSInterface_NoExtMeth/F@6::Invoke(object, - int32) + IL_0005: ldftn void Program/F@7::Invoke(object, + int32) IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Control.FSharpHandler`1::.ctor(object, native int) IL_0010: constrained. !!T IL_0016: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Control.IDelegateEvent`1>::AddHandler(!0) IL_001b: nop IL_001c: ret - } // end of method DoNotBoxStruct_NoArray_FSInterface_NoExtMeth::F + } // end of method Program::F -} // end of class DoNotBoxStruct_NoArray_FSInterface_NoExtMeth +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_NoArray_FSInterface_NoExtMeth +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -98,11 +96,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_NoArray_FSInterface_NoExtMeth::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_NoArray_FSInterface_NoExtMeth +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_NoArray_FSInterface_NoExtMeth_fs\DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs similarity index 93% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs index 35c492a837d..c2ddc85980e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs @@ -2,4 +2,5 @@ // Regression test for FSHARP1.0:4237 // F# boxes structs when calling, say, Object.ToString() and interface methods. C# does not // ToString +module Program let F<'T >(x : 'T) = x.ToString() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs.il.bsl similarity index 69% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs.il.bsl index 2faba000cc7..862671e2b4b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ToString.fs.il.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -13,7 +12,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 DoNotBoxStruct_ToString { @@ -22,32 +21,34 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.DoNotBoxStruct_ToString { - // Offset: 0x00000000 Length: 0x00000208 + // Offset: 0x00000000 Length: 0x0000025F + // WARNING: managed resource file FSharpSignatureData.DoNotBoxStruct_ToString created } .mresource public FSharpOptimizationData.DoNotBoxStruct_ToString { - // Offset: 0x00000210 Length: 0x00000086 + // Offset: 0x00000268 Length: 0x00000076 + // WARNING: managed resource file FSharpOptimizationData.DoNotBoxStruct_ToString created } .module DoNotBoxStruct_ToString.exe -// MVID: {59B1920A-8D34-C606-A745-03830A92B159} +// MVID: {622FB6B5-8D34-C606-A745-0383B5B62F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02CC0000 +// Image base: 0x02F60000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed DoNotBoxStruct_ToString +.class public abstract auto ansi sealed Program extends [mscorlib]System.Object { .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 ) @@ -55,20 +56,18 @@ { // Code size 16 (0x10) .maxstack 3 - .locals init ([0] !!T V_0) - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 22,34 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_ToString.fs' + .locals init (!!T V_0) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloca.s V_0 IL_0004: constrained. !!T IL_000a: callvirt instance string [mscorlib]System.Object::ToString() IL_000f: ret - } // end of method DoNotBoxStruct_ToString::F + } // end of method Program::F -} // end of class DoNotBoxStruct_ToString +} // end of class Program -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_ToString +.class private abstract auto ansi sealed ''.$Program extends [mscorlib]System.Object { .method public static void main@() cil managed @@ -77,11 +76,12 @@ // Code size 1 (0x1) .maxstack 8 IL_0000: ret - } // end of method $DoNotBoxStruct_ToString::main@ + } // end of method $Program::main@ -} // end of class ''.$DoNotBoxStruct_ToString +} // end of class ''.$Program // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\DoNotBoxStruct\DoNotBoxStruct_ToString_fs\DoNotBoxStruct_ToString.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormC.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormC.fs new file mode 100644 index 00000000000..3faeadc21dc --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormC.fs @@ -0,0 +1,37 @@ +module Program + +open System +open System.Text +open System.Collections.Generic +open FSharp.Compiler.ComponentTests.EmittedIL.StringEncoding.NormalizationForm + +let csharpValues1 = (NormalizationFormCCSharp_0000.Values()).GetEnumerator() +let csharpValues2 = (NormalizationFormCCSharp_0080.Values()).GetEnumerator() +let fsharpValues1 = (NormalizationFormCFSharp_0000.Values()).GetEnumerator() +let fsharpValues2 = (NormalizationFormCFSharp_0080.Values()).GetEnumerator() + +// TODO should be 0x123 +for i in [0 .. 0x07F] do + if not(csharpValues1.MoveNext()) then + raise (new Exception($"Insufficient values for C# #1 failed at'{i}'")) + if not (fsharpValues1.MoveNext()) then + raise (new Exception($"Insufficient values for F# #1 failed at'{i}'")) + if not(csharpValues2.MoveNext()) then + raise (new Exception($"Insufficient values for C# #2failed at'{i}'")) + if not (fsharpValues2.MoveNext()) then + raise (new Exception($"Insufficient values for F# #2 failed at'{i}'")) + + let csv1 = unbox csharpValues1.Current + let fsv1 = unbox fsharpValues1.Current + let csv2 = unbox csharpValues2.Current + let fsv2 = unbox fsharpValues2.Current + + printfn "'%A' - '%A'" csv1 fsv1 + printfn "'%A' - '%A'" csv2 fsv2 + + if csv1 <> fsv1 then + raise (new Exception($"Difference detected NormalizationFormatC at: '{i}': '{csv1} <> '{fsv1}'")) + + if csv2 <> fsv2 then + raise (new Exception($"Difference detected NormalizationFormatC at: '{i}': '{csv2} <> '{fsv2}'")) +() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormD.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormD.fs new file mode 100644 index 00000000000..32ccb4f53a9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormD.fs @@ -0,0 +1,37 @@ +module Program + +open System +open System.Text +open System.Collections.Generic +open FSharp.Compiler.ComponentTests.EmittedIL.StringEncoding.NormalizationForm + +let csharpValues1 = (NormalizationFormDCSharp_0000.Values()).GetEnumerator() +let csharpValues2 = (NormalizationFormDCSharp_0080.Values()).GetEnumerator() +let fsharpValues1 = (NormalizationFormDFSharp_0000.Values()).GetEnumerator() +let fsharpValues2 = (NormalizationFormDFSharp_0080.Values()).GetEnumerator() + +// TODO should be 0x123 +for i in [0 .. 0x07F] do + if not(csharpValues1.MoveNext()) then + raise (new Exception($"Insufficient values for C# #1 failed at'{i}'")) + if not (fsharpValues1.MoveNext()) then + raise (new Exception($"Insufficient values for F# #1 failed at'{i}'")) + if not(csharpValues2.MoveNext()) then + raise (new Exception($"Insufficient values for C# #2failed at'{i}'")) + if not (fsharpValues2.MoveNext()) then + raise (new Exception($"Insufficient values for F# #2 failed at'{i}'")) + + let csv1 = unbox csharpValues1.Current + let fsv1 = unbox fsharpValues1.Current + let csv2 = unbox csharpValues2.Current + let fsv2 = unbox fsharpValues2.Current + + printfn "'%A' - '%A'" csv1 fsv1 + printfn "'%A' - '%A'" csv2 fsv2 + + if csv1 <> fsv1 then + raise (new Exception($"Difference detected NormalizationFormatD at: '{i}': '{csv1} <> '{fsv1}'")) + + if csv2 <> fsv2 then + raise (new Exception($"Difference detected NormalizationFormatD at: '{i}': '{csv2} <> '{fsv2}'")) +() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormKC.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormKC.fs new file mode 100644 index 00000000000..9079b6bc3dd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormKC.fs @@ -0,0 +1,37 @@ +module Program + +open System +open System.Text +open System.Collections.Generic +open FSharp.Compiler.ComponentTests.EmittedIL.StringEncoding.NormalizationForm + +let csharpValues1 = (NormalizationFormKCCSharp_0000.Values()).GetEnumerator() +let csharpValues2 = (NormalizationFormKCCSharp_0080.Values()).GetEnumerator() +let fsharpValues1 = (NormalizationFormKCFSharp_0000.Values()).GetEnumerator() +let fsharpValues2 = (NormalizationFormKCFSharp_0080.Values()).GetEnumerator() + +// TODO should be 0x123 +for i in [0 .. 0x07F] do + if not(csharpValues1.MoveNext()) then + raise (new Exception($"Insufficient values for C# #1 failed at'{i}'")) + if not (fsharpValues1.MoveNext()) then + raise (new Exception($"Insufficient values for F# #1 failed at'{i}'")) + if not(csharpValues2.MoveNext()) then + raise (new Exception($"Insufficient values for C# #2failed at'{i}'")) + if not (fsharpValues2.MoveNext()) then + raise (new Exception($"Insufficient values for F# #2 failed at'{i}'")) + + let csv1 = unbox csharpValues1.Current + let fsv1 = unbox fsharpValues1.Current + let csv2 = unbox csharpValues2.Current + let fsv2 = unbox fsharpValues2.Current + + printfn "'%A' - '%A'" csv1 fsv1 + printfn "'%A' - '%A'" csv2 fsv2 + + if csv1 <> fsv1 then + raise (new Exception($"Difference detected NormalizationFormatKC at: '{i}': '{csv1} <> '{fsv1}'")) + + if csv2 <> fsv2 then + raise (new Exception($"Difference detected NormalizationFormatKC at: '{i}': '{csv2} <> '{fsv2}'")) +() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormKD.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormKD.fs new file mode 100644 index 00000000000..c5bca9fb097 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/NormalizationFormKD.fs @@ -0,0 +1,37 @@ +module Program + +open System +open System.Text +open System.Collections.Generic +open FSharp.Compiler.ComponentTests.EmittedIL.StringEncoding.NormalizationForm + +let csharpValues1 = (NormalizationFormKDCSharp_0000.Values()).GetEnumerator() +let csharpValues2 = (NormalizationFormKDCSharp_0080.Values()).GetEnumerator() +let fsharpValues1 = (NormalizationFormKDFSharp_0000.Values()).GetEnumerator() +let fsharpValues2 = (NormalizationFormKDFSharp_0080.Values()).GetEnumerator() + +// TODO should be 0x123 +for i in [0 .. 0x07F] do + if not(csharpValues1.MoveNext()) then + raise (new Exception($"Insufficient values for C# #1 failed at'{i}'")) + if not (fsharpValues1.MoveNext()) then + raise (new Exception($"Insufficient values for F# #1 failed at'{i}'")) + if not(csharpValues2.MoveNext()) then + raise (new Exception($"Insufficient values for C# #2failed at'{i}'")) + if not (fsharpValues2.MoveNext()) then + raise (new Exception($"Insufficient values for F# #2 failed at'{i}'")) + + let csv1 = unbox csharpValues1.Current + let fsv1 = unbox fsharpValues1.Current + let csv2 = unbox csharpValues2.Current + let fsv2 = unbox fsharpValues2.Current + + printfn "'%A' - '%A'" csv1 fsv1 + printfn "'%A' - '%A'" csv2 fsv2 + + if csv1 <> fsv1 then + raise (new Exception($"Difference detected NormalizationFormatKD at: '{i}': '{csv1} <> '{fsv1}'")) + + if csv2 <> fsv2 then + raise (new Exception($"Difference detected NormalizationFormatKD at: '{i}': '{csv2} <> '{fsv2}'")) +() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs new file mode 100644 index 00000000000..877ea56f93c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs @@ -0,0 +1,108 @@ +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open System +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module StringEncoding = + + // + // What we are doing is is really making sure that strings in F# assemblies are + // encoded according to the specifications (which are, essentially, "do what C# + // does even if the C# is not fully ECMA compliant") + // + // Using the Normalize(...) method is just an indirect way to test this. The direct verification + // would have been something like: + // - compile F# code with strings (UNICODE 0x0000 -> 0xffff) + // - open assembly with binary editor + // - look at the encoding + // - make sure the trailing byte is set to 0/1 accordingly. + // + // Note: to keep the execution time within a reasonable limit, we only consider the range 0x0000 - 0x0123 + // (if you look at the code you'll see that nothing really interesting happens after 0xff... so the + // odds of screwing up there are really small and unlikely to happen) + // + + let verifyCompilation compilation = + compilation + |> asFs + |> compile + |> shouldSucceed + + let normalization_CSharp (form:string) start = + let lines = [| + yield "namespace FSharp.Compiler.ComponentTests.EmittedIL.StringEncoding.NormalizationForm" + yield "{" + yield " using System;" + yield " using System.Collections.Generic;" + yield " using System.Text;" + yield "" + yield $" public class Normalization{form}CSharp_%04x{start}" + yield " {" + yield " static public IEnumerable Values ()" + yield " {" + // BUGBUG: should be 0x123 + for a in [start .. start + 0x07F] do + yield sprintf """ yield return (int)("\u%04x".Normalize(NormalizationForm.%s)[0]);""" a form + yield " }" + yield " }" + yield "}" + |] + + CSharp(lines |> Seq.fold(fun acc v -> acc + Environment.NewLine + v) "") + |> withName (sprintf "Normalization%sLibrary_cs_%04x" form start) + + let normalization_FSharp (form:string) start = + + let lines = [| + yield $"module FSharp.Compiler.ComponentTests.EmittedIL.StringEncoding.NormalizationForm.Normalization{form}FSharp_%04x{start}" + yield "open System.Collections.Generic" + yield "open System.Text" + yield "" + yield "let Values () = [|" + // BUGBUG: should be 0x123 + for a in [start .. start + 0x07F] do + yield sprintf """ yield (int)("\u%04x".Normalize(NormalizationForm.%s)[0])""" a form + yield " |]" + |] + + FSharp(lines |> Seq.fold(fun acc v -> acc + Environment.NewLine + v) "") + |> withName (sprintf "Normalization%sLibrary_fs_%04x" form start) + + //SOURCE="dummy.fs testcase.fs" PRECMD="\$FSI_PIPE --exec NormalizationFormKC.fsx > oracle.cs && \$CSC_PIPE oracle.cs && oracle.exe>testcase.fs" # FormKC + [] + let ``NormalizationForm_C`` compilation = + + compilation + |> withReferences([normalization_CSharp "FormC" 0; normalization_FSharp "FormC" 0]) + |> withReferences([normalization_CSharp "FormC" 0x80; normalization_FSharp "FormC" 0x80]) + |> compileExeAndRun + |> shouldSucceed + + //SOURCE="dummy.fs testcase.fs" PRECMD="\$FSI_PIPE --exec NormalizationFormD.fsx > oracle.cs && \$CSC_PIPE oracle.cs && oracle.exe>testcase.fs" # FormD + [] + let ``NormalizationForm_D`` compilation = + compilation + |> withReferences([normalization_CSharp "FormD" 0; normalization_FSharp "FormD" 0]) + |> withReferences([normalization_CSharp "FormD" 0x80; normalization_FSharp "FormD" 0x80]) + |> compileExeAndRun + |> shouldSucceed + + //SOURCE="dummy.fs testcase.fs" PRECMD="\$FSI_PIPE --exec NormalizationFormKC.fsx > oracle.cs && \$CSC_PIPE oracle.cs && oracle.exe>testcase.fs" # FormKC + [] + let ``NormalizationForm_KC`` compilation = + compilation + |> withReferences([normalization_CSharp "FormKC" 0; normalization_FSharp "FormKC" 0]) + |> withReferences([normalization_CSharp "FormKC" 0x80; normalization_FSharp "FormKC" 0x80]) + |> compileExeAndRun + |> shouldSucceed + + //SOURCE="dummy.fs testcase.fs" PRECMD="\$FSI_PIPE --exec NormalizationFormKD.fsx > oracle.cs && \$CSC_PIPE oracle.cs && oracle.exe>testcase.fs" # FormKD + [] + let ``NormalizationForm_KD`` compilation = + compilation + |> withReferences([normalization_CSharp "FormKD" 0; normalization_FSharp "FormKD" 0]) + |> withReferences([normalization_CSharp "FormKD" 0x80; normalization_FSharp "FormKD" 0x80]) + |> compileExeAndRun + |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnLet01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnLet01.fs new file mode 100644 index 00000000000..43aa03eee5d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnLet01.fs @@ -0,0 +1,32 @@ +// #NoMT #CodeGen #Interop +#light + +// Verify the ability to put attributes on let-bindings +module AttributesOnLet01 + +open System + +[] +let x = 1 + +[] +let square a = a * a + +// Use the CodeGenHelper library to test this +open CodeGenHelper + +try + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "AttributesOnLet01" + |> getMember "x" + |> should haveAttribute "ObsoleteAttribute" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "AttributesOnLet01" + |> getMember "square" + |> should haveAttribute "ObsoleteAttribute" + +with +| e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnLet02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnLet02.fs new file mode 100644 index 00000000000..aa5005d063f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnLet02.fs @@ -0,0 +1,57 @@ +// #NoMT #CodeGen #Interop +#light + +// Verify the ability to put attributes on let-bindings +// - When declaring multiple values at once, attr is applied to all +module AttributesOnLet02 + +open System + +[] +let (a, b) = (1,2) + +(* +// This syntax is no longer allowed, attributes can only be applied to whole pattern rather than its elements separately. +// Related test is placed under Conformance\DeclarationElements\LetBindings\Basic + +let ([] venus, earth, [] mars) = + ("too hot","just right", "too cold") +*) + +// Validation +open CodeGenHelper + +try + + // The one attribute applies to both values + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "AttributesOnLet02" + |> getProperty "a" + |> should haveAttribute "ObsoleteAttribute" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "AttributesOnLet02" + |> getProperty "b" + |> should haveAttribute "ObsoleteAttribute" + +(* + // Verify ability to apply attribute to individual values + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "AttributesOnLet02" + |> getProperty "venus" + |> should haveAttribute "ObsoleteAttribute" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "AttributesOnLet02" + |> getProperty "earth" + |> verify doesn'tHaveAttribute "ObsoleteAttribute" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "AttributesOnLet02" + |> getProperty "mars" + |> should haveAttribute "ObsoleteAttribute" +*) + +with +| e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnProperty.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnProperty.fs new file mode 100644 index 00000000000..f9e6f07bf1e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnProperty.fs @@ -0,0 +1,27 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression test for FSHARP1.0:1539 +// Attributes on properties, getters and setters +module bug1539 +open System + +type AttrOnProperty() = inherit System.Attribute() + +type C(x:int) = + let mutable m_value = x + + [] + member this.ReadWrite + with get() = m_value + and set x = m_value <- x + +open CodeGenHelper + +try + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "bug1539+C" + |> getProperty "ReadWrite" + |> should haveAttribute "AttrOnProperty" + +with +| e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertyGetter.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertyGetter.fs new file mode 100644 index 00000000000..102ae496aec --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertyGetter.fs @@ -0,0 +1,27 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression test for FSHARP1.0:1539 +// Attributes on properties, getters and setters +module bug1539 +open System + +type AttrOnGetter() = inherit System.Attribute() + +type C(x:int) = + let mutable m_value = x + + member this.ReadWrite + with [] get() = m_value + and set x = m_value <- x + +open CodeGenHelper + +try + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "bug1539+C" + |> getMethod "get_ReadWrite" + |> should haveAttribute "AttrOnGetter" + +with +| e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertyGetterSetter.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertyGetterSetter.fs new file mode 100644 index 00000000000..419bb233314 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertyGetterSetter.fs @@ -0,0 +1,40 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression test for FSHARP1.0:1539 +// Attributes on properties, getters and setters +module bug1539 +open System + +type AttrOnProperty() = inherit System.Attribute() +type AttrOnGetter() = inherit System.Attribute() +type AttrOnSetter() = inherit System.Attribute() + +type C(x:int) = + let mutable m_value = x + + [] + member this.ReadWrite + with [] get() = m_value + and [] set x = m_value <- x + +open CodeGenHelper + +try + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "bug1539+C" + |> getProperty "ReadWrite" + |> should haveAttribute "AttrOnProperty" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "bug1539+C" + |> getMethod "get_ReadWrite" + |> should haveAttribute "AttrOnGetter" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "bug1539+C" + |> getMethod "set_ReadWrite" + |> should haveAttribute "AttrOnSetter" + +with +| e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertySetter.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertySetter.fs new file mode 100644 index 00000000000..cd2c1d80861 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/AttributesOnPropertySetter.fs @@ -0,0 +1,26 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression test for FSHARP1.0:1539 +// Attributes on properties, getters and setters +module bug1539 +open System + +type AttrOnSetter() = inherit System.Attribute() + +type C(x:int) = + let mutable m_value = x + + member this.ReadWrite + with get() = m_value + and [] set x = m_value <- x + +open CodeGenHelper + +try + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "bug1539+C" + |> getMethod "set_ReadWrite" + |> should haveAttribute "AttrOnSetter" + +with +| e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/fsharpqa/Source/CodeGen/Structure/BaseType.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/BaseType.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/BaseType.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/BaseType.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ClassArity01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ClassArity01.fs new file mode 100644 index 00000000000..93e9568b254 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ClassArity01.fs @@ -0,0 +1,81 @@ +// #NoMT #CodeGen #Interop +#light + +// Verify the generation of class function arity + +namespace Test + +type AClassType() = + + // Zero parameters (unit gets dropped) + member this.Params0 () = () + + // One parameter (of type unit) + member this.Params1 (u : unit) = () + + // One Parameter (of tuple type) + member this.Params1a (tupe : int * float * string) = () + + // One Parameter (takes one param, returns a fast func: after fix for #3665, the IL is just the uncurried form!) + member this.Params1b (x : int) y = x + y + + // One Parameter (takes one param, returns a fast func: after fix for #3665, the IL is just the uncurried form!) + member this.Params1c (x : float) y z = x + y + z + + // Two parameters + member this.Params2 (x : decimal, y : decimal) = x + y + + // Three parameters + member this.Params3 (x : float, y : int, z : char) = true + +// -------------------------------- + + +module Tester = + + open CodeGenHelper + open System + + printfn "Testing..." + + try + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClassType" + |> getMethod "Params0" + |> should takeParams [] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClassType" + |> getMethod "Params1" + |> should takeParams [ typeof ] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClassType" + |> getMethod "Params1a" + |> should takeParams [ typeof ] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClassType" + |> getMethod "Params1b" + |> should takeParams [ typeof; typeof ] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClassType" + |> getMethod "Params1c" + |> should takeParams [ typeof; typeof; typeof] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClassType" + |> getMethod "Params2" + |> should takeParams [ typeof; typeof ] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClassType" + |> getMethod "Params3" + |> should takeParams [ typeof; typeof; typeof ] + + + with + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/fsharpqa/Source/CodeGen/Structure/CodeGenHelper.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/CodeGenHelper.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/CodeGenHelper.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/CodeGenHelper.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Delegates01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Delegates01.fs new file mode 100644 index 00000000000..b51ea2e13fb --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Delegates01.fs @@ -0,0 +1,46 @@ +// #NoMT #CodeGen #Interop +#light + +// Verify delegates are generated correctly + +namespace Test + +type UnitDelegate = delegate of unit -> unit + +type VoidReturnType = delegate of obj * System.EventArgs -> unit + +type TupledDelegate = delegate of int * float * unit -> decimal * char * obj + +type GenericDelegate<'a, 'b> = delegate of 'a -> 'b + +// -------------------------------- + +module Tester = + + open CodeGenHelper + open System + + printfn "Testing..." + + try + + // Take no parameters, return void + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.UnitDelegate" + |> should beDelegate [] typeof + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.VoidReturnType" + |> should beDelegate [typeof; typeof] typeof + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.TupledDelegate" + |> should beDelegate [typeof; typeof; typeof] typeof + + typeof< GenericDelegate > + |> should beDelegate [typeof] typeof + + + with + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/fsharpqa/Source/CodeGen/Structure/DerivedType.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/DerivedType.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/DerivedType.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/DerivedType.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/DiscUnionCodeGen1.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/DiscUnionCodeGen1.fs new file mode 100644 index 00000000000..095c8d7596c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/DiscUnionCodeGen1.fs @@ -0,0 +1,75 @@ +// #NoMT #CodeGen #Interop +// Verify the compiled structure of discriminated unions + +namespace Test + + type Suit = + | Diamonds + | Hearts + | Spades + | Clubs + + type Card = + | ValueCard of int * Suit + | Jack of Suit + | Queen of Suit + | King of Suit + | Ace of Suit + | Joker + +// -------------------------------- + + module Tester = + + open CodeGenHelper + open System + + printfn "Testing..." + + try + + let asm = System.Reflection.Assembly.GetExecutingAssembly() + + let cardType = + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.Card" + + // Expected properties + [ "Tag"; "IsJoker"; "IsKing"; "IsQueen"; "IsJack"; "IsValueCard" ] + |> List.iter (fun propName -> cardType |> should containProp propName) + + [ "Joker" ] + |> List.iter (fun propName -> cardType |> should containProp propName) + + // Expected members + [ "NewAce"; "NewKing"; "NewQueen"; "NewJack"; "NewValueCard" ] + |> List.iter (fun membName -> cardType |> should containMember membName) + + // Nested classes + let verifyProperties propNames ty = + propNames |> List.iter (fun propName -> ty |> should containProp propName) + () + + asm + |> getType "Test.Card+Ace" + |> verifyProperties [ "Item" ] + + asm + |> getType "Test.Card+King" + |> verifyProperties [ "Item" ] + + asm + |> getType "Test.Card+Queen" + |> verifyProperties [ "Item" ] + + asm + |> getType "Test.Card+Jack" + |> verifyProperties [ "Item" ] + + asm + |> getType "Test.Card+ValueCard" + |> verifyProperties [ "Item1"; "Item2" ] + + with + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/DoNotInlineX.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/DoNotInlineX.fs new file mode 100644 index 00000000000..ee45e7a4b8b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/DoNotInlineX.fs @@ -0,0 +1,57 @@ +// #Regression #NoMT #CodeGen #Attributes + +open System +open System.Diagnostics +open System.IO + +let longtime = int(System.TimeSpan.FromSeconds(30.0).TotalMilliseconds) // longtime is 30 seconds + +let programFiles = + let pf86 = Environment.GetEnvironmentVariable("ProgramFiles(x86)") + if String.IsNullOrEmpty(pf86) then Environment.GetEnvironmentVariable("ProgramFiles") else pf86 +let fsc = + let overridePath = Environment.GetEnvironmentVariable("FSC") + if not (String.IsNullOrEmpty(overridePath)) then + overridePath + else + let fsc41_SxS = Path.Combine(programFiles, @"Microsoft SDKs\F#\4.1\Framework\v4.0\fsc.exe") + let fsc40_SxS = Path.Combine(programFiles, @"Microsoft SDKs\F#\4.0\Framework\v4.0\fsc.exe") + let fsc40 = Path.Combine(programFiles, @"Microsoft F#\v4.0\fsc.exe") + let fsc20 = Path.Combine(programFiles, @"FSharp-2.0.0.0\bin\fsc.exe") + + match ([fsc41_SxS; fsc40_SxS; fsc40; fsc20] |> List.tryFind(fun x -> File.Exists(x))) with + | Some(path) -> path + | None -> "fsc.exe" // just use what's on the PATH + + +let start (p1 : string) = Process.Start(p1) + +let CompileFile file args = + let p = Process.Start(fsc, file + " " + args) + p.WaitForExit() + +[] +let main (args : string[]) = + if args.Length = 0 then 0 else + let baseFlag, derivedFlag, expectedResult1, expectedResult2 = args.[0], args.[1], int args.[2], int args.[3] + let result = <| + try + CompileFile "BaseType.fs" ("-a --define:" + baseFlag) + printfn "Compiled BaseType with %A" baseFlag + CompileFile "DerivedType.fs" ("-r:BaseType.dll --define:" + derivedFlag) + printfn "Compiled DerivedType with %A" derivedFlag + + let r1 = start "DerivedType.exe" + r1.WaitForExit(longtime) + printfn "Ran DerivedType.exe with result: %A" r1.ExitCode + + CompileFile "BaseType.fs" "-a" + printfn "Compiled BaseType without %A" baseFlag + let r2 = start "DerivedType.exe" + r2.WaitForExit(longtime) + printfn "Ran DerivedType.exe with result: %A" r2.ExitCode + + if r1.ExitCode = expectedResult1 && r2.ExitCode = expectedResult2 then 0 else 1 + with + _ -> 1 +raise (new Exception($"exit {result}")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Equality01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Equality01.fs new file mode 100644 index 00000000000..bbb293bd28e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Equality01.fs @@ -0,0 +1,13 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression test for FSHARP1.0:4324 - Generated structural equality for structs does not take into consideration implicit fields captured as constructor parameters +open System + +type T (a: int, b: int) = + struct + member x.a' = a + member x.b' = b + end + +// Compare with implicit constructors +if (T(0,0) <> T(0,0) || T(1,0) = T(0,1)) then raise (Exception($"Oops: (T(0,0) <> T(0,0) || T(1,0) = T(0,1))")) +if (T() <> T()) then raise (Exception($"Oops: (T() <> T())")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Events01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Events01.fs new file mode 100644 index 00000000000..43d65356b8f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Events01.fs @@ -0,0 +1,59 @@ +// #NoMT #CodeGen #Interop +#light + +// Verify delegates are generated correctly + +namespace Test + + type ChannelChanged = delegate of obj * int -> unit + + type Television() as this = + + // Create an event channel changed. + let channelChanged = new Event() + let triggerChanelChanged channelNumber = channelChanged.Trigger(this, channelNumber) + + // When TV constrcuted, fire chanel changed event. + do triggerChanelChanged(3) + + // Static event + static let defaultChannelChanged = new Event() + + // Setting the chanel will fire our event. + member this.SetChanel (x : int) = triggerChanelChanged(x) + + // By adding the [] on a property of type IEvent<_> + // this will be compiled as a proper .NET event. + [] + member this.ChanelChangedEvent = channelChanged.Publish + + // Static event + [] + static member DefaultChannelChanged = defaultChannelChanged.Publish + +// -------------------------------- + + module Tester = + + open CodeGenHelper + open System + + printfn "Testing..." + + try + + // Take no parameters, return void + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.Television" + |> getEvent "ChanelChangedEvent" + |> should useEventHandler typeof + + // Take no parameters, return void + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.Television" + |> getEvent "DefaultChannelChanged" + |> should useEventHandler typeof + + with + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Events02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Events02.fs new file mode 100644 index 00000000000..db407b58eca --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Events02.fs @@ -0,0 +1,59 @@ +// #NoMT #CodeGen #Interop +#light + +// Verify events can be added to interfaces + +namespace Test + + type MagicalResult = delegate of obj * string * int -> unit + + type IHaveMagicalProperties = + + abstract member Rub : unit -> unit + abstract member DropCoinIn : unit -> unit + + [] + abstract member GoodThingHappened : IEvent + + [] + abstract member BadThingHappened : IEvent + + type MagicLamp = + + val m_goodResult : Event + + new() = { + m_goodResult = new Event<_,_>() + } + + interface IHaveMagicalProperties with + member this.Rub() = this.m_goodResult.Trigger(this, ("A genie appears!", 3)) + member this.DropCoinIn() = () + + [] + member this.GoodThingHappened = this.m_goodResult.Publish + + // Make the event accessible, but will throw when you try to add or remove a handler + [] + member this.BadThingHappened = Unchecked.defaultof< IEvent > + +//// -------------------------------- + + module Tester = + + open CodeGenHelper + open System + + printfn "Testing..." + + try + + // Verify code gen + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.IHaveMagicalProperties" + |> getEvent "GoodThingHappened" + |> should useEventHandler typeof + + with + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Extensions01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Extensions01.fs new file mode 100644 index 00000000000..210581086c5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Extensions01.fs @@ -0,0 +1,56 @@ +// #NoMT #CodeGen #Interop +// Verify extension methods become intrinsic if in same namespace + +namespace Test + +type Foo() = + member this.PropA = 1 + member this.MethA(a) = a + this.PropA + +type Bar() = + static member Value = 1 + +type Foo with + // These look like extension methods, but since + // they are in the same module/namespace as the + // class they will simply be added as if they + // were in the same type declaration + member this.PropB = this.PropA + Bar.Value + + // From the spec, extension methods are defined at the same time + // (like class members) so they can be mutually recursive. + member this.MethB(a) = a + this.PropB + this.MethA(a) + +// -------------------------------- + +module Tester = + + open CodeGenHelper + open System + + printfn "Testing..." + + try + + System.Reflection.Assembly.GetExecutingAssembly() + |> should containType "Test.Foo" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.Foo" + |> should containProp "PropA" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.Foo" + |> should containProp "PropB" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.Foo" + |> should containMember "MethA" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.Foo" + |> should containMember "MethB" + + with + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Extensions02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Extensions02.fs new file mode 100644 index 00000000000..60e1bd7348c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Extensions02.fs @@ -0,0 +1,53 @@ +// #NoMT #CodeGen #Interop +// Verify extension methods do NOT become intrinsic if in different modules + +module Test + +module Parts = + type Foo() = + member this.PropA = 1 + member this.MethA(a) = a + this.PropA + +module Extensions = + + type Parts.Foo with + member this.PropB = this.PropA + 1 + member this.MethB(a) = a + this.PropB + this.MethA(a) + +// -------------------------------- + +module Tester = + + open System + open CodeGenHelper + + printfn "Testing..." + + try + //System.Reflection.Assembly.GetExecutingAssembly().GetTypes() + //|> Array.iter(fun ty -> printfn "%s" ty.FullName) + + // Since they are nested modules, the name is somewhat mangled. As of Beta1 there + // is no way to add nested namespaces in F#. + System.Reflection.Assembly.GetExecutingAssembly() + |> should containType "Test+Parts+Foo" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test+Parts+Foo" + |> should containMember "MethA" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test+Parts+Foo" + |> should notContainMember "MethB" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test+Parts+Foo" + |> should containProp "PropA" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test+Parts+Foo" + |> should notContainProp "PropB" + + with + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FunctionArity01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FunctionArity01.fs new file mode 100644 index 00000000000..d9b68c271bb --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FunctionArity01.fs @@ -0,0 +1,23 @@ +// #NoMT #CodeGen #Interop +#light + +// Verify that suples are dropped when parameters to a function +// So x (y, z) / (x, y) z / (x, y, z) all produce a function taking three +// parameters. (Not one parameter and a tuple of two parts.) + +module FunctionArity01 + +let a () = () +let b x = () +let c x y = () +let d x y z = () +let e (x, y) z = () +let f x (y, z) = () +let g (x, y, z) = () + + +let h (x, (y, z)) = () +let i ((x, y), z) = () +let j ((x, y, z)) = () + +printfn "Hello, World!!!" diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/LocalTypeFunctionInIf.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/LocalTypeFunctionInIf.fs new file mode 100644 index 00000000000..90124e0a046 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/LocalTypeFunctionInIf.fs @@ -0,0 +1,70 @@ +// #Regression #CodeGen #ControlFlow +// Test for 917383, this used to fail verification +open System + +let f inp = + let lf s v = List.ofSeq s |> List.findIndex (fun y -> y = v) + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + match inp with + | 0 -> 1 + | _ -> + raise (Exception(sprintf "Oops: res = %d" (lf [1;2] 1))) + 4 + +printfn "Hello, World!!!" \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ModuleArity01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ModuleArity01.fs new file mode 100644 index 00000000000..5c60e0523a9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ModuleArity01.fs @@ -0,0 +1,81 @@ +// #Regression #NoMT #CodeGen #Interop + +// Verify the generation of module value arity +// Regression test for FSHARP1.0:4762 +namespace Test + +module AModuleType = + + // Zero parameters (unit gets dropped) + let Params0 () = () + + // One parameter (of type unit) + let Params1 (u : unit) = () + + // One Parameter (of tuple type) + let Params1a (tupe : int * float * string) = () + + // One Parameter (takes one param, returns a fast func: after fix for #3665, the IL is just the uncurried form!) + let Params1b (x : int) y = x + y + + // One Parameter (takes one param, returns a fast func: after fix for #3665, the IL is just the uncurried form!) + let Params1c (x : float) y z = x + y + z + + // Two parameters + let Params2 (x : decimal, y : decimal) = x + y + + // Three parameters + let Params3 (x : float, y : int, z : char) = true + +// -------------------------------- + + +module Tester = + + open CodeGenHelper + open System + + printfn "Testing..." + + try + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AModuleType" + |> getMethod "Params0" + |> should takeParams [] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AModuleType" + |> getMethod "Params1" + |> should takeParams [ typeof ] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AModuleType" + |> getMethod "Params1a" + |> should takeParams [ typeof; typeof; typeof ] // See FSHARP1.0:4762 (it is a bit unusual, but according to the spec + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AModuleType" + |> getMethod "Params1b" + |> should takeParams [ typeof; typeof ] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AModuleType" + |> getMethod "Params1c" + |> should takeParams [ typeof; typeof; typeof] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AModuleType" + |> getMethod "Params2" + |> should takeParams [ typeof; typeof ] + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AModuleType" + |> getMethod "Params3" + |> should takeParams [ typeof; typeof; typeof ] + + + with + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/NativePtr01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/NativePtr01.fs new file mode 100644 index 00000000000..0e27f47ec45 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/NativePtr01.fs @@ -0,0 +1,28 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression test for FSHARP1.0:6150 +// nativeptr should not turn into IntPtr when used in method signature or return value +// it should be T* +namespace N + +module M = + + open System + open CodeGenHelper + + type T() = member x.F ( p : nativeptr ) = () + + type R() = member x.G ( ) : nativeptr = Unchecked.defaultof> + + let res1 = System.Reflection.Assembly.GetExecutingAssembly() + |> getType "N.M+T" + |> getMember "F" + + let res2 = System.Reflection.Assembly.GetExecutingAssembly() + |> getType "N.M+R" + |> getMember "G" + + // Used to be (incorrectly) "Void F(IntPtr)" + if res1.ToString() <> "Void F(Char*)" then raise (new Exception("exit 1")) + + // Used to be (incorrectly) "IntPtr G()" + if res2.ToString() <> "Char* G()" then raise (new Exception("exit 2")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ObjectExpressions01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ObjectExpressions01.fs new file mode 100644 index 00000000000..f7807f68c7a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ObjectExpressions01.fs @@ -0,0 +1,30 @@ +// #NoMT #CodeGen #Interop +#light + +open System + +// Verify anonymous classes generated for object expressions +// are private. + +let VerifyTypeIsPrivate (ty : System.Type) = + if ty.IsVisible <> false || ty.IsPublic <> false then + raise (Exception($"Oops: ty.IsVisible <> false || ty.IsPublic <> false")) + () + + +let oe1 = + { + new System.Object() with + override this.ToString() = "oe1" + } + +VerifyTypeIsPrivate (oe1.GetType()) + +let oe2 = + { + new System.IDisposable with + member this.Dispose() = () + } + +VerifyTypeIsPrivate (oe2.GetType()) + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ReadOnlyStructFromLib.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ReadOnlyStructFromLib.fs new file mode 100644 index 00000000000..1c5b4f79e08 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ReadOnlyStructFromLib.fs @@ -0,0 +1,14 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression for FSHARP1.0:5750 +// Code gen issues with copy of readonly struct from a separate assembly +open ReadWriteLib + +let myClass = new MyClass() +printfn "MyClass.ReadonlyFoo = %x" myClass.ReadonlyFoo + +let myStruct = new MyStruct() +printfn "MyStruct.WriteableFoo = %x" myStruct.WriteableFoo +// Previous error: The address of the variable 'copyOfStruct' cannot be used at this point +printfn "MyStruct.ReadonlyFoo = %x" myStruct.ReadonlyFoo + +printfn "Finished" diff --git a/tests/fsharpqa/Source/CodeGen/Structure/ReadWriteLib.cs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ReadWriteLib.cs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/ReadWriteLib.cs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/ReadWriteLib.cs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs new file mode 100644 index 00000000000..67d214f07a2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs @@ -0,0 +1,182 @@ +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open System.IO +open FSharp.Test +open FSharp.Test.Compiler + +module Structure = + + //# This file is needed by the rest of the suite. It is not really a testcase... + // SOURCE=CodeGenHelper.fs SCFLAGS="-a -g" # CodeGenHelper.fs + let codeGenHelperLibrary = + FSharp (loadSourceFromFile (Path.Combine(__SOURCE_DIRECTORY__, "CodeGenHelper.fs"))) + |> withName "CodeGenHelper" + + let setupCompilation compilation = + compilation + |> asFs + |> asExe + |> withReferences [codeGenHelperLibrary] + + let verifyCompilation compilation = + compilation + |> setupCompilation + |> compile + |> shouldSucceed + + let verifyExecution compilation = + compilation + |> setupCompilation + |> compileExeAndRun + |> shouldSucceed + + // SOURCE=AttributesOnLet01.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnLet01.fs + [] + let ``AttributesOnLet01_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=AttributesOnLet02.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnLet02.fs + [] + let ``AttributesOnLet02_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=AttributesOnProperty.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnProperty.fs + [] + let ``AttributesOnProperty_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=AttributesOnPropertyGetter.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnPropertyGetter.fs + [] + let ``AttributesOnPropertyGetter_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=AttributesOnPropertyGetterSetter.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnPropertyGetterSetter.fs + [] + let ``AttributesOnPropertyGetterSetter_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=AttributesOnPropertySetter.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnPropertySetter.fs + [] + let ``AttributesOnPropertySetter_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=ClassArity01.fs SCFLAGS="-r:CodeGenHelper.dll" # ClassArity01.fs + [] + let ``ClassArity01_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=Delegates01.fs SCFLAGS="-r:CodeGenHelper.dll" # Delegates01.fs + [] + let ``Delegates01_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=DiscUnionCodeGen1.fs SCFLAGS="-r:CodeGenHelper.dll" # DiscUnionCodeGen1.fs + [] + let ``DiscUnionCodeGen1_fs`` compilation = + compilation + |> verifyCompilation + + // SOURCE=Equality01.fs # Equality01.fs + [] + let ``Equality01_fs`` compilation = + compilation + |> verifyCompilation + + // SOURCE=Events01.fs SCFLAGS="-r:CodeGenHelper.dll" # Events01.fs + [] + let ``Events01_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=Events02.fs SCFLAGS="-r:CodeGenHelper.dll" # Events02.fs + [] + let ``Events02_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=Extensions01.fs SCFLAGS="-r:CodeGenHelper.dll" # Extensions01.fs + [] + let ``Extensions01_fs`` compilation = + compilation + |> verifyCompilation + + // SOURCE=Extensions02.fs SCFLAGS="-r:CodeGenHelper.dll" # Extensions02.fs + [] + let ``Extensions02_fs`` compilation = + compilation + |> verifyCompilation + + // SOURCE=FunctionArity01.fs SCFLAGS="-r:CodeGenHelper.dll" # FunctionArity01.fs + [] + let ``FunctionArity01_fs`` compilation = + compilation + |> verifyCompilation + + //SOURCE=LocalTypeFunctionInIf.fs # LocalTypeFunctionInIf.fs + [] + let ``LocalTypeFunctionInIf_fs`` compilation = + compilation + |> verifyCompilation + + // SOURCE=ModuleArity01.fs SCFLAGS="-r:CodeGenHelper.dll" # ModuleArity01.fs + [] + let ``ModuleArity01_fs`` compilation = + compilation + |> verifyExecution + +#if !TESTING_ON_LINUX + // SOURCE=NativePtr01.fs PEVER=/Exp_Fail SCFLAGS="-r:CodeGenHelper.dll" # NativePtr01.fs + [] + let ``NativePtr01_fs`` compilation = + compilation + |> setupCompilation + |> PEVerifier.verifyPEFile + |> PEVerifier.shouldFail +#endif + + // SOURCE=ObjectExpressions01.fs SCFLAGS="-r:CodeGenHelper.dll" # ObjectExpressions01.fs + [] + let ``ObjectExpressions01_fs`` compilation = + compilation + |> verifyCompilation + + // SOURCE="UnionTypeWithSignature01.fsi UnionTypeWithSignature01.fs" SCFLAGS="-r:CodeGenHelper.dll" # UnionTypeWithSignature01.fs + [] + let ``UnionTypeWithSignature01_fsi`` compilation = + compilation + |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "UnionTypeWithSignature01.fs")) + |> verifyExecution + + // SOURCE="UnionTypeWithSignature02.fsi UnionTypeWithSignature02.fs" SCFLAGS="-r:CodeGenHelper.dll" # UnionTypeWithSignature02.fs + [] + let ``UnionTypeWithSignature02_fsi`` compilation = + compilation + |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "UnionTypeWithSignature02.fs")) + |> verifyCompilation + + // SOURCE=UnitsOfMeasure01.fs SCFLAGS="-r:CodeGenHelper.dll" # UnitsOfMeasure01.fs + [] + let ``UnitsOfMeasure01_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=UnitsOfMeasure02.fs SCFLAGS="-r:CodeGenHelper.dll" # UnitsOfMeasure02.fs + [] + let ``UnitsOfMeasure02_fs`` compilation = + compilation + |> verifyExecution + + // SOURCE=UnitsOfMeasure03.fs SCFLAGS="-r:CodeGenHelper.dll" # UnitsOfMeasure03.fs + [] + let ``UnitsOfMeasure03_fs`` compilation = + compilation + |> verifyExecution diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature01.fs new file mode 100644 index 00000000000..ecf714999d0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature01.fs @@ -0,0 +1,24 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression test for FSHARP1.0:4040 +// "Signature files do not prevent compiler-generated public constructors from leaking out of discriminated unions" +// Note that the corresponsing .fsi file is missing the "| C of int" part of the DU +#light + +namespace N + +type T = | C of int + +module M = + + open System + open System.Reflection + + open CodeGenHelper + + let res = Assembly.GetExecutingAssembly() + |> getType "N.T" + |> getMembers + |> Array.tryFind (fun a -> a.Name = "C") + + if not (res.IsNone) then + raise (Exception($"Oops: not(res.IsNone)")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature01.fsi b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature01.fsi new file mode 100644 index 00000000000..3522b5fe173 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature01.fsi @@ -0,0 +1,9 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression test for FSHARP1.0:4040 +// "Signature files do not prevent compiler-generated public constructors from leaking out of discriminated unions" +// Note that in this case the .fsi is missing the "| C of int" + +#light +namespace N + +type T \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature02.fs new file mode 100644 index 00000000000..f0d289ff540 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature02.fs @@ -0,0 +1,30 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression test for FSHARP1.0:4040 +// "Signature files do not prevent compiler-generated public constructors from leaking out of discriminated unions" +// Note that the corresponsing .fsi file is NOT missing the "| C of int" part of the DU +namespace N + +type T = | C of int + +module M = + + open CodeGenHelper + open System + + // The public constructor called 'C' is now gone + let res1 = System.Reflection.Assembly.GetExecutingAssembly() + |> getType "N.T" + |> getMembers + |> Array.tryFind (fun a -> a.Name = "C") + + if res1.IsSome then + raise (Exception($"Oops: - Unexpected member N.T.C!")) + + // Instead, there is a C#-facing method N.T.NewC for each non-nullary union case + let res2 = System.Reflection.Assembly.GetExecutingAssembly() + |> getType "N.T" + |> getMethods + |> Array.tryFind (fun a -> a.Name = "NewC") + + if res2.IsNone then + raise (Exception($"Oops: not(res.IsNone) - static Method N.T.NewC not found!")) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature02.fsi b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature02.fsi new file mode 100644 index 00000000000..11c64ef8709 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnionTypeWithSignature02.fsi @@ -0,0 +1,9 @@ +// #Regression #NoMT #CodeGen #Interop +// Regression test for FSHARP1.0:4040 +// "Signature files do not prevent compiler-generated public constructors from leaking out of discriminated unions" +// Note that in this case the .fsi is NOT missing the "| C of int" + +#light +module N + +type T = | C of int diff --git a/tests/fsharpqa/Source/CodeGen/Structure/UnitsOfMeasure01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnitsOfMeasure01.fs similarity index 92% rename from tests/fsharpqa/Source/CodeGen/Structure/UnitsOfMeasure01.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnitsOfMeasure01.fs index 4416a495fe5..8a519454d87 100644 --- a/tests/fsharpqa/Source/CodeGen/Structure/UnitsOfMeasure01.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnitsOfMeasure01.fs @@ -24,6 +24,7 @@ type AClass() = module Tester = + open System open CodeGenHelper printfn "Testing..." @@ -54,7 +55,5 @@ module Tester = |> should haveType typeof with - | e -> printfn "Unhandled Exception: %s" e.Message - exit 1 - - exit 0 + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/fsharpqa/Source/CodeGen/Structure/UnitsOfMeasure02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnitsOfMeasure02.fs similarity index 85% rename from tests/fsharpqa/Source/CodeGen/Structure/UnitsOfMeasure02.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnitsOfMeasure02.fs index 260b7ccf005..8a435bd88a5 100644 --- a/tests/fsharpqa/Source/CodeGen/Structure/UnitsOfMeasure02.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnitsOfMeasure02.fs @@ -22,6 +22,7 @@ type AClass() = module Tester = + open System open CodeGenHelper printfn "Testing..." @@ -34,7 +35,5 @@ module Tester = |> should takeParams [typeof; typeof] with - | e -> printfn "Unhandled Exception: %s" e.Message - exit 1 - - exit 0 + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/fsharpqa/Source/CodeGen/Structure/UnitsOfMeasure03.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnitsOfMeasure03.fs similarity index 94% rename from tests/fsharpqa/Source/CodeGen/Structure/UnitsOfMeasure03.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnitsOfMeasure03.fs index 746138a4a0d..d307e7664c4 100644 --- a/tests/fsharpqa/Source/CodeGen/Structure/UnitsOfMeasure03.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/UnitsOfMeasure03.fs @@ -55,7 +55,5 @@ module Tester = |> (fun (ty : Type) -> if not ty.IsGenericType then failwith "Error: Should be generic!") with - | e -> printfn "Unhandled Exception: %s" e.Message - exit 1 - - exit 0 + | e -> printfn "Unhandled Exception: %s" e.Message + raise (Exception($"Oops: {e}")) diff --git a/tests/fsharpqa/Source/CodeGen/Structure/dummy.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/dummy.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/dummy.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/dummy.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs new file mode 100644 index 00000000000..3b72b9ef132 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs @@ -0,0 +1,14 @@ +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Operators = + + [] + let ``Validate that non generic (fast) code is emitted for comparison involving decimals`` compilation = + compilation + |> asExe + |> ignoreWarnings + |> verifyILBaseline \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/operators/decimal_comparison.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/operators/decimal_comparison.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.net472.debug.bsl similarity index 89% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.net472.debug.bsl index 5c84d0e45b2..162090f40ec 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.net472.debug.bsl @@ -1,6 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 @@ -20,45 +19,43 @@ .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q .ver 2:0:0:0 } -.assembly comparison_decimal01 +.assembly decimal_comparison { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, int32, int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) - .hash algorithm 0x00008004 .ver 0:0:0:0 } -.mresource public FSharpSignatureData.comparison_decimal01 +.mresource public FSharpSignatureData.decimal_comparison { - // Offset: 0x00000000 Length: 0x00000172 + // Offset: 0x00000000 Length: 0x000001E9 + // WARNING: managed resource file FSharpSignatureData.decimal_comparison created } -.mresource public FSharpOptimizationData.comparison_decimal01 +.mresource public FSharpOptimizationData.decimal_comparison { - // Offset: 0x00000178 Length: 0x0000005B + // Offset: 0x000001F0 Length: 0x00000059 + // WARNING: managed resource file FSharpOptimizationData.decimal_comparison created } -.module comparison_decimal01.exe -// MVID: {61F02896-76D8-7EE3-A745-03839628F061} +.module decimal_comparison.exe +// MVID: {6244B348-6C66-07F5-A745-038348B34462} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C60000 +// Image base: 0x00840000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed Comparison_decimal01 +.class public abstract auto ansi sealed Decimal_comparison extends [mscorlib]System.Object { .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 ) -} // end of class Comparison_decimal01 +} // end of class Decimal_comparison -.class private abstract auto ansi sealed ''.$Comparison_decimal01 +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [mscorlib]System.Object { .field static assembly int32 init@ @@ -70,8 +67,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:\\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 @@ -95,7 +90,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 +113,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 +136,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 +159,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 +182,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 +207,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 +230,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 @@ -266,11 +254,12 @@ valuetype [netstandard]System.Decimal) IL_00e2: pop IL_00e3: ret - } // end of method $Comparison_decimal01::main@ + } // end of method $Decimal_comparison::main@ -} // end of class ''.$Comparison_decimal01 +} // end of class ''.$Decimal_comparison // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\operators\Validate_that_non_generic_(fast)_code_is_emitted__for_comparison_involving_decimals\decimal_comparison.res diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/operators/decimal_comparison.fs.il b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.net472.release.bsl similarity index 76% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/operators/decimal_comparison.fs.il rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.net472.release.bsl index edf711ad4b6..bdce4f28d80 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/operators/decimal_comparison.fs.il +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.net472.release.bsl @@ -1,3 +1,71 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .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 decimal_comparison +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.decimal_comparison +{ + // Offset: 0x00000000 Length: 0x000001ED + // WARNING: managed resource file FSharpSignatureData.decimal_comparison created +} +.mresource public FSharpOptimizationData.decimal_comparison +{ + // Offset: 0x000001F8 Length: 0x00000059 + // WARNING: managed resource file FSharpOptimizationData.decimal_comparison created +} +.module decimal_comparison.exe +// MVID: {6244CD69-6C66-07F5-A745-038369CD4462} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05490000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Decimal_comparison + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Decimal_comparison + +.class private abstract auto ansi sealed ''.$Decimal_comparison + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 228 (0xe4) .maxstack 8 IL_0000: ldc.i4.s 10 IL_0002: ldc.i4.0 @@ -186,4 +254,12 @@ valuetype [netstandard]System.Decimal) IL_00e2: pop IL_00e3: ret + } // end of method $Decimal_comparison::main@ + +} // end of class ''.$Decimal_comparison + + +// ============================================================= +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\operators\Validate_that_non_generic_(fast)_code_is_emitted__for_comparison_involving_decimals\decimal_comparison.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.netcore.debug.bsl new file mode 100644 index 00000000000..306c17cd1e6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.netcore.debug.bsl @@ -0,0 +1,265 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern System.Runtime +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern FSharp.Core +{ + .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:1:0:0 +} +.assembly decimal_comparison +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.decimal_comparison +{ + // Offset: 0x00000000 Length: 0x000001E9 + // WARNING: managed resource file FSharpSignatureData.decimal_comparison created +} +.mresource public FSharpOptimizationData.decimal_comparison +{ + // Offset: 0x000001F0 Length: 0x00000059 + // WARNING: managed resource file FSharpOptimizationData.decimal_comparison created +} +.module decimal_comparison.exe +// MVID: {6244C8FF-B716-DD50-A745-0383FFC84462} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x000001893B8A0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Decimal_comparison + extends [System.Runtime]System.Object +{ + .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 ) +} // end of class Decimal_comparison + +.class private abstract auto ansi sealed ''.$Decimal_comparison + extends [System.Runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + // Code size 228 (0xe4) + .maxstack 8 + IL_0000: ldc.i4.s 10 + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: ldc.i4.0 + IL_0005: ldc.i4.1 + IL_0006: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_000b: ldc.i4.s 20 + IL_000d: ldc.i4.0 + IL_000e: ldc.i4.0 + IL_000f: ldc.i4.0 + IL_0010: ldc.i4.1 + IL_0011: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0016: call bool [netstandard]System.Decimal::op_LessThan(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_001b: pop + IL_001c: ldc.i4.s 10 + IL_001e: ldc.i4.0 + IL_001f: ldc.i4.0 + IL_0020: ldc.i4.0 + IL_0021: ldc.i4.1 + IL_0022: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0027: ldc.i4.s 20 + IL_0029: ldc.i4.0 + IL_002a: ldc.i4.0 + IL_002b: ldc.i4.0 + IL_002c: ldc.i4.1 + IL_002d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0032: call bool [netstandard]System.Decimal::op_LessThanOrEqual(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_0037: pop + IL_0038: ldc.i4.s 10 + IL_003a: ldc.i4.0 + IL_003b: ldc.i4.0 + IL_003c: ldc.i4.0 + IL_003d: ldc.i4.1 + IL_003e: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0043: ldc.i4.s 20 + IL_0045: ldc.i4.0 + IL_0046: ldc.i4.0 + IL_0047: ldc.i4.0 + IL_0048: ldc.i4.1 + IL_0049: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_004e: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_0053: pop + IL_0054: ldc.i4.s 10 + IL_0056: ldc.i4.0 + IL_0057: ldc.i4.0 + IL_0058: ldc.i4.0 + IL_0059: ldc.i4.1 + IL_005a: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_005f: ldc.i4.s 20 + IL_0061: ldc.i4.0 + IL_0062: ldc.i4.0 + IL_0063: ldc.i4.0 + IL_0064: ldc.i4.1 + IL_0065: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_006a: call bool [netstandard]System.Decimal::op_GreaterThanOrEqual(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_006f: pop + IL_0070: ldc.i4.s 10 + IL_0072: ldc.i4.0 + IL_0073: ldc.i4.0 + IL_0074: ldc.i4.0 + IL_0075: ldc.i4.1 + IL_0076: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_007b: ldc.i4.s 20 + IL_007d: ldc.i4.0 + IL_007e: ldc.i4.0 + IL_007f: ldc.i4.0 + IL_0080: ldc.i4.1 + IL_0081: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0086: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_008b: pop + IL_008c: ldc.i4.s 10 + IL_008e: ldc.i4.0 + IL_008f: ldc.i4.0 + IL_0090: ldc.i4.0 + IL_0091: ldc.i4.1 + IL_0092: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0097: ldc.i4.s 20 + IL_0099: ldc.i4.0 + IL_009a: ldc.i4.0 + IL_009b: ldc.i4.0 + IL_009c: ldc.i4.1 + IL_009d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00a2: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_00a7: ldc.i4.0 + IL_00a8: ceq + IL_00aa: pop + IL_00ab: ldc.i4.s 10 + IL_00ad: ldc.i4.0 + IL_00ae: ldc.i4.0 + IL_00af: ldc.i4.0 + IL_00b0: ldc.i4.1 + IL_00b1: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00b6: ldc.i4.s 20 + IL_00b8: ldc.i4.0 + IL_00b9: ldc.i4.0 + IL_00ba: ldc.i4.0 + IL_00bb: ldc.i4.1 + IL_00bc: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00c1: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_00c6: pop + IL_00c7: ldc.i4.s 10 + IL_00c9: ldc.i4.0 + IL_00ca: ldc.i4.0 + IL_00cb: ldc.i4.0 + IL_00cc: ldc.i4.1 + IL_00cd: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00d2: ldc.i4.s 20 + IL_00d4: ldc.i4.0 + IL_00d5: ldc.i4.0 + IL_00d6: ldc.i4.0 + IL_00d7: ldc.i4.1 + IL_00d8: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00dd: call int32 [netstandard]System.Decimal::Compare(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_00e2: pop + IL_00e3: ret + } // end of method $Decimal_comparison::main@ + +} // end of class ''.$Decimal_comparison + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net6.0\tests\EmittedIL\operators\Validate_that_non_generic_(fast)_code_is_emitted__for_comparison_involving_decimals\decimal_comparison.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.netcore.release.bsl new file mode 100644 index 00000000000..aef9dba32ac --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.il.netcore.release.bsl @@ -0,0 +1,265 @@ + +// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11 + + + +// Metadata version: v4.0.30319 +.assembly extern System.Runtime +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern FSharp.Core +{ + .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:1:0:0 +} +.assembly decimal_comparison +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.decimal_comparison +{ + // Offset: 0x00000000 Length: 0x000001ED + // WARNING: managed resource file FSharpSignatureData.decimal_comparison created +} +.mresource public FSharpOptimizationData.decimal_comparison +{ + // Offset: 0x000001F8 Length: 0x00000059 + // WARNING: managed resource file FSharpOptimizationData.decimal_comparison created +} +.module decimal_comparison.exe +// MVID: {6244BF33-B84D-9159-A745-038333BF4462} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x000001ADC6840000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Decimal_comparison + extends [System.Runtime]System.Object +{ + .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 ) +} // end of class Decimal_comparison + +.class private abstract auto ansi sealed ''.$Decimal_comparison + extends [System.Runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + // Code size 228 (0xe4) + .maxstack 8 + IL_0000: ldc.i4.s 10 + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: ldc.i4.0 + IL_0005: ldc.i4.1 + IL_0006: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_000b: ldc.i4.s 20 + IL_000d: ldc.i4.0 + IL_000e: ldc.i4.0 + IL_000f: ldc.i4.0 + IL_0010: ldc.i4.1 + IL_0011: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0016: call bool [netstandard]System.Decimal::op_LessThan(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_001b: pop + IL_001c: ldc.i4.s 10 + IL_001e: ldc.i4.0 + IL_001f: ldc.i4.0 + IL_0020: ldc.i4.0 + IL_0021: ldc.i4.1 + IL_0022: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0027: ldc.i4.s 20 + IL_0029: ldc.i4.0 + IL_002a: ldc.i4.0 + IL_002b: ldc.i4.0 + IL_002c: ldc.i4.1 + IL_002d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0032: call bool [netstandard]System.Decimal::op_LessThanOrEqual(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_0037: pop + IL_0038: ldc.i4.s 10 + IL_003a: ldc.i4.0 + IL_003b: ldc.i4.0 + IL_003c: ldc.i4.0 + IL_003d: ldc.i4.1 + IL_003e: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0043: ldc.i4.s 20 + IL_0045: ldc.i4.0 + IL_0046: ldc.i4.0 + IL_0047: ldc.i4.0 + IL_0048: ldc.i4.1 + IL_0049: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_004e: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_0053: pop + IL_0054: ldc.i4.s 10 + IL_0056: ldc.i4.0 + IL_0057: ldc.i4.0 + IL_0058: ldc.i4.0 + IL_0059: ldc.i4.1 + IL_005a: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_005f: ldc.i4.s 20 + IL_0061: ldc.i4.0 + IL_0062: ldc.i4.0 + IL_0063: ldc.i4.0 + IL_0064: ldc.i4.1 + IL_0065: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_006a: call bool [netstandard]System.Decimal::op_GreaterThanOrEqual(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_006f: pop + IL_0070: ldc.i4.s 10 + IL_0072: ldc.i4.0 + IL_0073: ldc.i4.0 + IL_0074: ldc.i4.0 + IL_0075: ldc.i4.1 + IL_0076: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_007b: ldc.i4.s 20 + IL_007d: ldc.i4.0 + IL_007e: ldc.i4.0 + IL_007f: ldc.i4.0 + IL_0080: ldc.i4.1 + IL_0081: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0086: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_008b: pop + IL_008c: ldc.i4.s 10 + IL_008e: ldc.i4.0 + IL_008f: ldc.i4.0 + IL_0090: ldc.i4.0 + IL_0091: ldc.i4.1 + IL_0092: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0097: ldc.i4.s 20 + IL_0099: ldc.i4.0 + IL_009a: ldc.i4.0 + IL_009b: ldc.i4.0 + IL_009c: ldc.i4.1 + IL_009d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00a2: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_00a7: ldc.i4.0 + IL_00a8: ceq + IL_00aa: pop + IL_00ab: ldc.i4.s 10 + IL_00ad: ldc.i4.0 + IL_00ae: ldc.i4.0 + IL_00af: ldc.i4.0 + IL_00b0: ldc.i4.1 + IL_00b1: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00b6: ldc.i4.s 20 + IL_00b8: ldc.i4.0 + IL_00b9: ldc.i4.0 + IL_00ba: ldc.i4.0 + IL_00bb: ldc.i4.1 + IL_00bc: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00c1: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_00c6: pop + IL_00c7: ldc.i4.s 10 + IL_00c9: ldc.i4.0 + IL_00ca: ldc.i4.0 + IL_00cb: ldc.i4.0 + IL_00cc: ldc.i4.1 + IL_00cd: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00d2: ldc.i4.s 20 + IL_00d4: ldc.i4.0 + IL_00d5: ldc.i4.0 + IL_00d6: ldc.i4.0 + IL_00d7: ldc.i4.1 + IL_00d8: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00dd: call int32 [netstandard]System.Decimal::Compare(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_00e2: pop + IL_00e3: ret + } // end of method $Decimal_comparison::main@ + +} // end of class ''.$Decimal_comparison + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net6.0\tests\EmittedIL\operators\Validate_that_non_generic_(fast)_code_is_emitted__for_comparison_involving_decimals\decimal_comparison.res diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Repro1548.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Repro1548.fs index bc314a61990..01c8b9ae855 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Repro1548.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Repro1548.fs @@ -15,21 +15,23 @@ module ``Repro 1548`` = [] let ``The type 'Inherit from non defined type``() = let reference = - let source = """ + let source = (Source (""" namespace B type PublicType = member _.Y() = () - """ - Compilation.Create(source, Fs, CompileOutput.Library) |> CompilationReference.CreateFSharp + """)) + + Compilation.Create(source, CompileOutput.Library) |> CompilationReference.CreateFSharp let testCmpl = - let source = """ + let source = (Source(""" module Test type E() = inherit B.Type() member x.Y() = () - """ - Compilation.Create(source, Fs, CompileOutput.Exe, options = [||], cmplRefs = [reference]) + """)) + + Compilation.Create(source, CompileOutput.Exe, options = [||], cmplRefs = [reference]) CompilerAssert.CompileWithErrors(testCmpl, [| (FSharpDiagnosticSeverity.Error, 39, (5, 15, 5, 19), "The type 'Type' is not defined in 'B'.") |]) diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WarnIfDiscardedInList.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WarnIfDiscardedInList.fs index f821377690b..19562a77af2 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WarnIfDiscardedInList.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WarnIfDiscardedInList.fs @@ -16,8 +16,7 @@ let view model dispatch = yield! subView model dispatch div [] [] ] - -exit 1 +printfn "Finished" """ [] @@ -63,7 +62,7 @@ let view model dispatch = ] ] -exit 1 +printfn "Finished" """ // warning because implicit yields are not allowed in F# 4.6 and earlier FSharp source @@ -96,7 +95,7 @@ let view model dispatch = ] ] -exit 0 +printfn "Finished" """ // This no longer gives a warning because implicit yields are allowed in F# 4.7 and above FSharp source @@ -125,7 +124,7 @@ let view model dispatch = ] ] -exit 0 +printfn "Finished" """ // This no longer gives a warning because implicit yields are allowed in F# 4.7 and above FSharp source @@ -156,8 +155,7 @@ let view model dispatch = | _ -> subView model dispatch ] ] - -exit 0 +printfn "Finished" """ // This no longer gives a warning because implicit yields are allowed in F# 4.7 and above FSharp source diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 616bd317077..bb7220ed8e5 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -18,7 +18,6 @@ - @@ -26,6 +25,15 @@ + + + + + + + + + @@ -74,29 +82,29 @@ - - - - - + + + + + - - - + + + - - - + + + - - + + diff --git a/tests/FSharp.Compiler.ComponentTests/Globalization/HexCharEncode.fs b/tests/FSharp.Compiler.ComponentTests/Globalization/HexCharEncode.fs index e1d38126b5f..b995a62bdfd 100644 --- a/tests/FSharp.Compiler.ComponentTests/Globalization/HexCharEncode.fs +++ b/tests/FSharp.Compiler.ComponentTests/Globalization/HexCharEncode.fs @@ -1,8 +1,9 @@ // #Globalization #Regression // Regression test for bug 25619 // F# doesn't encode Unicode surrogate characters correctly when obtained from a hex character literal +open System -let x = System.Char.ConvertFromUtf32(0x00020001) +let x = Char.ConvertFromUtf32(0x00020001) let y = "\U00020001" let x1 = x[0] let x2 = x[1] @@ -10,14 +11,14 @@ let y1 = y[0] let y2 = y[1] if (x1 <> y1) then printfn "x1 == y1 => %b" (x1 = y1) - exit 1 + raise (new Exception("exit 1")) if (x2 <> y2) then printfn "x2 == y2 => %b" (x2 = y2) - exit 1 + raise (new Exception("exit 2")) if (int x2) <> (int y2) then printfn "x2 = %x, y2 = %x" (int x2) (int y2) - exit 1 + raise (new Exception("exit 3")) -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/Literals.fs b/tests/FSharp.Compiler.ComponentTests/Literals.fs new file mode 100644 index 00000000000..40092066b38 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Literals.fs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test.Compiler + +module ``Literals`` = + + [] + let ``Literal attribute generates literal static field``() = + FSharp """ +module LiteralValue + +[] +let x = 7 + +[] +let main _ = + 0 + """ + |> compile + |> shouldSucceed + |> verifyIL [""" +.field public static literal int32 x = int32(0x00000007) +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 )"""] diff --git a/tests/FSharp.Compiler.ComponentTests/Misc.fs b/tests/FSharp.Compiler.ComponentTests/Misc.fs new file mode 100644 index 00000000000..e54703e961d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Misc.fs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test.Compiler + +module ``Misc`` = + [] + let ``Empty array construct compiles to System.Array.Empty<_>()``() = + FSharp """ +module Misc + +let zInt (): int[] = [||] + +let zString (): string[] = [||] + +let zGeneric<'a> (): 'a[] = [||] + """ + |> compile + |> shouldSucceed + |> verifyIL [""" +IL_0000: call !!0[] [runtime]System.Array::Empty() +IL_0005: ret""" + """ + +IL_0000: call !!0[] [runtime]System.Array::Empty() +IL_0005: ret""" + + """ +IL_0000: call !!0[] [runtime]System.Array::Empty() +IL_0005: ret""" ] diff --git a/tests/FSharp.Compiler.ComponentTests/OCamlCompat/IndentOff02.fs b/tests/FSharp.Compiler.ComponentTests/OCamlCompat/IndentOff02.fs index 6b09cde831c..01516e4000c 100644 --- a/tests/FSharp.Compiler.ComponentTests/OCamlCompat/IndentOff02.fs +++ b/tests/FSharp.Compiler.ComponentTests/OCamlCompat/IndentOff02.fs @@ -2,4 +2,4 @@ // Regression test for FSHARP1.0:5984 // #indent "off" -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/OCamlCompat/W-NoParensInLet01.fs b/tests/FSharp.Compiler.ComponentTests/OCamlCompat/W-NoParensInLet01.fs index c9bb166f687..9e454014d45 100644 --- a/tests/FSharp.Compiler.ComponentTests/OCamlCompat/W-NoParensInLet01.fs +++ b/tests/FSharp.Compiler.ComponentTests/OCamlCompat/W-NoParensInLet01.fs @@ -8,4 +8,4 @@ type t = F of int * int let F(x, y) = F(1, 2) -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/OCamlCompat/W_IndentOff03.fs b/tests/FSharp.Compiler.ComponentTests/OCamlCompat/W_IndentOff03.fs index 522d9683a64..a52a2a95bb6 100644 --- a/tests/FSharp.Compiler.ComponentTests/OCamlCompat/W_IndentOff03.fs +++ b/tests/FSharp.Compiler.ComponentTests/OCamlCompat/W_IndentOff03.fs @@ -2,4 +2,4 @@ // Regression test for FSHARP1.0:5984 //This construct is for ML compatibility\. Consider using a file with extension '\.ml' or '\.mli' instead\. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'\.$ #indent "off" -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Operators.fs b/tests/FSharp.Compiler.ComponentTests/Operators.fs similarity index 93% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Operators.fs rename to tests/FSharp.Compiler.ComponentTests/Operators.fs index 2fe012c0842..de5b5fa9c5a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Operators.fs +++ b/tests/FSharp.Compiler.ComponentTests/Operators.fs @@ -1,4 +1,3 @@ - namespace FSharp.Compiler.ComponentTests.EmittedIL open Xunit @@ -7,7 +6,7 @@ open FSharp.Test.Compiler module Operators = - [] + [] let ``Validate that non generic (fast) code is emmitted for comparison involving decimals`` compilation = compilation |> ignoreWarnings diff --git a/tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs b/tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs new file mode 100644 index 00000000000..8b69fa73281 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test.Compiler + +#if NETCOREAPP +module ``SkipLocalsInit`` = + [] + let ``Init in function and closure not emitted when applied on function``() = + FSharp """ +module SkipLocalsInit + +[] +let x () = + [||] |> Array.filter (fun x -> let y = "".Length in y + y = x) |> ignore +""" + |> compile + |> shouldSucceed + |> verifyIL [""" +.method public static void x() cil managed +{ + .custom instance void [runtime]System.Runtime.CompilerServices.SkipLocalsInitAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals (int32[] V_0) +""" + + """ +.method public strict virtual instance bool + Invoke(int32 x) cil managed +{ + + .maxstack 6 + .locals (int32 V_0)"""] + + [] + let ``Init in static method not emitted when applied on class``() = + FSharp """ +module SkipLocalsInit + +[] +type X () = + static member Y () = + let x = "ssa".Length + x + x + """ + |> compile + |> shouldSucceed + |> verifyIL [""" +.custom instance void [runtime]System.Runtime.CompilerServices.SkipLocalsInitAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) +""" + + """ +.method public static int32 Y() cil managed +{ + + .maxstack 4 + .locals (int32 V_0)"""] + + [] + let ``Init in static method and function not emitted when applied on module``() = + FSharp """ +[] +module SkipLocalsInit + +let x () = + let x = "ssa".Length + x + x + +type X () = + static member Y () = + let x = "ssa".Length + x + x + """ + |> compile + |> shouldSucceed + |> verifyIL [""" +.custom instance void [runtime]System.Runtime.CompilerServices.SkipLocalsInitAttribute::.ctor() = ( 01 00 00 00 ) +.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 x() cil managed +{ + + .maxstack 4 + .locals (int32 V_0) +""" + + """ +.method public static int32 Y() cil managed +{ + + .maxstack 4 + .locals (int32 V_0)"""] + + [] + let ``Init in method and closure not emitted when applied on method``() = + FSharp """ +module SkipLocalsInit + +type X () = + [] + member _.Y () = + [||] |> Array.filter (fun x -> let y = "".Length in y + y = x) |> ignore + let x = "ssa".Length + x + x + """ + |> compile + |> shouldSucceed + |> verifyIL [""" +.method public hidebysig instance int32 + Y() cil managed +{ + .custom instance void [runtime]System.Runtime.CompilerServices.SkipLocalsInitAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals (int32[] V_0, + int32 V_1) +""" + + """ +.method public strict virtual instance bool + Invoke(int32 x) cil managed +{ + + .maxstack 6 + .locals (int32 V_0) +""" ] + + [] + let ``Zero init performed to get defaults despite the attribute``() = + FSharp """ +module SkipLocalsInit +open System + +[] +let z () = + let mutable a = Unchecked.defaultof + a + +[] +let x f = + let a = if 1 / 1 = 1 then Nullable () else Nullable 5L + f a |> ignore + """ + |> compile + |> shouldSucceed + |> verifyIL [""" +.locals (valuetype [runtime]System.DateTime V_0) +IL_0000: ldloca.s V_0 +IL_0002: initobj [runtime]System.DateTime +IL_0008: ldloc.0 +IL_0009: ret + """ + + """ +.locals (valuetype [runtime]System.Nullable`1 V_0, + valuetype [runtime]System.Nullable`1 V_1, + !!a V_2) +IL_0000: ldc.i4.1 +IL_0001: ldc.i4.1 +IL_0002: div +IL_0003: ldc.i4.1 +IL_0004: bne.un.s IL_0011 + +IL_0006: ldloca.s V_1 +IL_0008: initobj valuetype [runtime]System.Nullable`1 +IL_000e: ldloc.1 +IL_000f: br.s IL_0018 + +IL_0011: ldc.i4.5 +IL_0012: conv.i8 +IL_0013: newobj instance void valuetype [runtime]System.Nullable`1::.ctor(!0) +IL_0018: stloc.0 +IL_0019: ldarg.0 +IL_001a: ldloc.0 +IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,!!a>::Invoke(!0) +IL_0020: stloc.2 +IL_0021: ret"""] +#endif \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/StringFormatAndInterpolation.fs b/tests/FSharp.Compiler.ComponentTests/StringFormatAndInterpolation.fs new file mode 100644 index 00000000000..bb9403d5574 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/StringFormatAndInterpolation.fs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test.Compiler + +#if !DEBUG // sensitive to debug-level code coming across from debug FSharp.Core +module ``StringFormatAndInterpolation`` = + [] + let ``Interpolated string with no holes is reduced to a string or simple format when used in printf``() = + FSharp """ +module StringFormatAndInterpolation + +let stringOnly () = $"no hole" + +let printed () = printf $"printed no hole" + """ + |> compile + |> shouldSucceed + |> verifyIL [""" +IL_0000: ldstr "no hole" +IL_0005: ret""" + """ +IL_0000: ldstr "printed no hole" +IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) +IL_000a: stloc.0 +IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() +IL_0010: ldloc.0 +IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) +IL_0016: pop +IL_0017: ret"""] + +#endif + diff --git a/tests/FSharp.Compiler.ComponentTests/TailCalls.fs b/tests/FSharp.Compiler.ComponentTests/TailCalls.fs new file mode 100644 index 00000000000..cbe51a7a381 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/TailCalls.fs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test.Compiler + +module ``Tail Calls`` = + // Regression test for DevDiv:72571 + + let private compileWithTailCalls opts = + opts |> ignoreWarnings |> withOptions ["-g"; "--optimize-"; "--tailcalls+"] |> compile + + [] + let ``TailCall 01``() = + FSharp """ +module TailCall01 +let foo(x:int, y) = printfn "%d" x +let run() = let x = 0 in foo(x,5) + """ + |> compileWithTailCalls + |> shouldSucceed + |> verifyIL [ + """ + .method public static void foo(int32 x, + !!a y) cil managed + { + + .maxstack 8 + IL_0000: ldstr "%d" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]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) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: pop + IL_0016: ret + } + """ + """ + .method public static void run() cil managed + { + + .maxstack 4 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldc.i4.5 + IL_0004: tail. + IL_0006: call void TailCall01::foo(int32, + !!0) + IL_000b: ret + } + """] + + + [] + let ``TailCall 02``() = + FSharp """ +module TailCall02 +let foo(x:int byref) = x +let run() = let mutable x = 0 in foo(&x) + """ + |> compileWithTailCalls + |> shouldSucceed + |> verifyIL [ + """ + .method public static int32 foo(int32& x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldobj [runtime]System.Int32 + IL_0006: ret + } + """ + """ + .method public static int32 run() cil managed + { + + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: call int32 TailCall02::foo(int32&) + IL_0009: ret + } + """ + ] + + [] + let ``TailCall 03``() = + FSharp """ +module TailCall03 +let foo (x:int byref) (y:int byref) z = printfn "%d" (x+y) +let run() = let mutable x = 0 in foo &x &x 5 + """ + |> compileWithTailCalls + |> shouldSucceed + |> verifyIL [ + """ + .method public static void foo(int32& x, + int32& y, + !!a z) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%d" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]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) + IL_000f: ldarg.0 + IL_0010: ldobj [runtime]System.Int32 + IL_0015: ldarg.1 + IL_0016: ldobj [runtime]System.Int32 + IL_001b: add + IL_001c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0021: pop + IL_0022: ret + } + """ + """ + .method public static void run() cil managed + { + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: ldloca.s V_0 + IL_0006: ldc.i4.5 + IL_0007: call void TailCall03::foo(int32&, + int32&, + !!0) + IL_000c: nop + IL_000d: ret + } + """ + ] + + [] + let ``TailCall 04``() = + FSharp """ +module TailCall04 +let foo(x:int byref, y) = printfn "%d" x +let run() = let mutable x = 0 in foo(&x,5) + """ + |> compileWithTailCalls + |> shouldSucceed + |> verifyIL [ + """ + .method public static void foo(int32& x, + !!a y) cil managed + { + + .maxstack 8 + IL_0000: ldstr "%d" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]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) + IL_000f: ldarg.0 + IL_0010: ldobj [runtime]System.Int32 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: pop + IL_001b: ret + } + """ + """ + .method public static void run() cil managed + { + + .maxstack 4 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: ldc.i4.5 + IL_0005: call void TailCall04::foo(int32&, + !!0) + IL_000a: nop + IL_000b: ret + + """ + ] + + [] + let ``TailCall 05``() = + FSharp """ +module TailCall05 +let foo(x:int byref, y:int byref, z) = printfn "%d" (x+y) +let run() = let mutable x = 0 in foo(&x,&x,5) + """ + |> compileWithTailCalls + |> shouldSucceed + |> verifyIL [ + """ + .method public static void foo(int32& x, + int32& y, + !!a z) cil managed + { + + .maxstack 8 + IL_0000: ldstr "%d" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]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) + IL_000f: ldarg.0 + IL_0010: ldobj [runtime]System.Int32 + IL_0015: ldarg.1 + IL_0016: ldobj [runtime]System.Int32 + IL_001b: add + IL_001c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0021: pop + IL_0022: ret + } + """ + """ + .method public static void run() cil managed + { + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: ldloca.s V_0 + IL_0006: ldc.i4.5 + IL_0007: call void TailCall05::foo(int32&, + int32&, + !!0) + IL_000c: nop + IL_000d: ret + } + """ + ] + diff --git a/tests/FSharp.Compiler.ComponentTests/TupleElimination.fs b/tests/FSharp.Compiler.ComponentTests/TupleElimination.fs new file mode 100644 index 00000000000..f4da7c4f364 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/TupleElimination.fs @@ -0,0 +1,800 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test.Compiler + +module ``TupleElimination`` = + + [] + let ``Sequence expressions with potential side effects do not prevent tuple elimination``() = + FSharp """ +module TupleElimination +open System.Runtime.CompilerServices + +[] +let f () = 3 + +[] +let sideEffect () = () + +type Test = + [] + static member test(x: int32 * int32) = x + +let v () = + let a, b = + "".ToString () |> ignore + System.DateTime.Now |> ignore + "3".ToString () |> ignore + 2L, f () + System.DateTime.Now |> ignore + a, b + +let w () = + let (a, b) as t = + "".ToString () |> ignore + System.DateTime.Now |> ignore + "3".ToString () |> ignore + 2, f () + System.DateTime.Now |> ignore + let _ = Test.test(t) + a + b + +let x () = + let a, b = + "".ToString () |> ignore + System.DateTime.Now |> ignore + "3".ToString () |> ignore + 2, f () + System.DateTime.Now |> ignore + a + b + +let y () = + let a, b, c = + let a = f () + sideEffect () + a, f (), f () + a + b + c + +let z () = + let a, b, c = + let u, v = 3, 4 + sideEffect () + f (), f () + u, f () + v + a + b + c + """ + |> compile + |> shouldSucceed + |> verifyIL [ + +(* +public static Tuple v() +{ + string text = "".ToString(); + DateTime now = DateTime.Now; + text = "3".ToString(); + int item = TupleElimination.f(); + now = DateTime.Now; + return new Tuple(2L, item); +} +*) + """ +.method public static class [runtime]System.Tuple`2 + v() cil managed +{ + + .maxstack 4 + .locals init (string V_0, + valuetype [runtime]System.DateTime V_1, + int32 V_2) + IL_0000: ldstr "" + IL_0005: callvirt instance string [runtime]System.Object::ToString() + IL_000a: stloc.0 + IL_000b: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0010: stloc.1 + IL_0011: ldstr "3" + IL_0016: callvirt instance string [runtime]System.Object::ToString() + IL_001b: stloc.0 + IL_001c: call int32 TupleElimination::f() + IL_0021: stloc.2 + IL_0022: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0027: stloc.1 + IL_0028: ldc.i4.2 + IL_0029: conv.i8 + IL_002a: ldloc.2 + IL_002b: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0030: ret +} +""" + +(* +public static int w() +{ + string text = "".ToString(); + DateTime now = DateTime.Now; + text = "3".ToString(); + int num = TupleElimination.f(); + Tuple x = new Tuple(2, num); + now = DateTime.Now; + TupleElimination.Test.test(x); + return 2 + num; +} +*) + """ +.method public static int32 w() cil managed +{ + + .maxstack 4 + .locals init (string V_0, + valuetype [runtime]System.DateTime V_1, + int32 V_2, + class [runtime]System.Tuple`2 V_3) + IL_0000: ldstr "" + IL_0005: callvirt instance string [runtime]System.Object::ToString() + IL_000a: stloc.0 + IL_000b: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0010: stloc.1 + IL_0011: ldstr "3" + IL_0016: callvirt instance string [runtime]System.Object::ToString() + IL_001b: stloc.0 + IL_001c: call int32 TupleElimination::f() + IL_0021: stloc.2 + IL_0022: ldc.i4.2 + IL_0023: ldloc.2 + IL_0024: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0029: stloc.3 + IL_002a: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_002f: stloc.1 + IL_0030: ldloc.3 + IL_0031: call class [runtime]System.Tuple`2 TupleElimination/Test::test(class [runtime]System.Tuple`2) + IL_0036: pop + IL_0037: ldc.i4.2 + IL_0038: ldloc.2 + IL_0039: add + IL_003a: ret +} +""" + +(* +public static int x() +{ + string text = "".ToString(); + DateTime now = DateTime.Now; + text = "3".ToString(); + int num = TupleElimination.f(); + now = DateTime.Now; + return 2 + num; +} +*) + """ +.method public static int32 x() cil managed +{ + + .maxstack 4 + .locals init (string V_0, + valuetype [runtime]System.DateTime V_1, + int32 V_2) + IL_0000: ldstr "" + IL_0005: callvirt instance string [runtime]System.Object::ToString() + IL_000a: stloc.0 + IL_000b: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0010: stloc.1 + IL_0011: ldstr "3" + IL_0016: callvirt instance string [runtime]System.Object::ToString() + IL_001b: stloc.0 + IL_001c: call int32 TupleElimination::f() + IL_0021: stloc.2 + IL_0022: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0027: stloc.1 + IL_0028: ldc.i4.2 + IL_0029: ldloc.2 + IL_002a: add + IL_002b: ret +} +""" + +(* +public static int y() +{ + int num = TupleElimination.f(); + TupleElimination.sideEffect(); + return num + TupleElimination.f() + TupleElimination.f(); +} +*) + """ +.method public static int32 y() cil managed +{ + + .maxstack 4 + .locals init (int32 V_0) + IL_0000: call int32 TupleElimination::f() + IL_0005: stloc.0 + IL_0006: call void TupleElimination::sideEffect() + IL_000b: ldloc.0 + IL_000c: call int32 TupleElimination::f() + IL_0011: add + IL_0012: call int32 TupleElimination::f() + IL_0017: add + IL_0018: ret +} +""" + +(* +public static int z() +{ + TupleElimination.sideEffect(); + return TupleElimination.f() + (TupleElimination.f() + 3) + (TupleElimination.f() + 4); +} +*) + """ +.method public static int32 z() cil managed +{ + + .maxstack 8 + IL_0000: call void TupleElimination::sideEffect() + IL_0005: call int32 TupleElimination::f() + IL_000a: call int32 TupleElimination::f() + IL_000f: ldc.i4.3 + IL_0010: add + IL_0011: add + IL_0012: call int32 TupleElimination::f() + IL_0017: ldc.i4.4 + IL_0018: add + IL_0019: add + IL_001a: ret +} +""" ] + + [] + let ``First class use of tuple prevents elimination``() = + FSharp """ +module TupleElimination +open System.Runtime.CompilerServices + +[] +let f () = 3 + +[] +let cond () = true + +type Test = + [] + static member test(x: int32 * int32) = x + +let y () = + let a, b = + if cond () then + 1, 2 + else + Test.test(3, 4) + a + b + +let z () = + let a, b = + "".ToString () |> ignore + System.DateTime.Now |> ignore + "3".ToString () |> ignore + Test.test(2, f ()) + System.DateTime.Now |> ignore + a + b + """ + |> compile + |> shouldSucceed + |> verifyIL [ + +(* +public static int y() +{ + Tuple tuple = (!TupleElimination.cond()) ? TupleElimination.Test.test(new Tuple(3, 4)) : new Tuple(1, 2); + return tuple.Item1 + tuple.Item2; +} +*) + """ +.method public static int32 y() cil managed +{ + + .maxstack 4 + .locals init (class [runtime]System.Tuple`2 V_0) + IL_0000: call bool TupleElimination::cond() + IL_0005: brfalse.s IL_0010 + + IL_0007: ldc.i4.1 + IL_0008: ldc.i4.2 + IL_0009: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_000e: br.s IL_001c + + IL_0010: ldc.i4.3 + IL_0011: ldc.i4.4 + IL_0012: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0017: call class [runtime]System.Tuple`2 TupleElimination/Test::test(class [runtime]System.Tuple`2) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: call instance !0 class [runtime]System.Tuple`2::get_Item1() + IL_0023: ldloc.0 + IL_0024: call instance !1 class [runtime]System.Tuple`2::get_Item2() + IL_0029: add + IL_002a: ret +} +""" + +(* +public static int z() +{ + string text = "".ToString(); + DateTime now = DateTime.Now; + text = "3".ToString(); + Tuple tuple = TupleElimination.Test.test(new Tuple(2, TupleElimination.f())); + int item = tuple.Item2; + int item2 = tuple.Item1; + now = DateTime.Now; + return item2 + item; +} +*) + """ +.method public static int32 z() cil managed +{ + + .maxstack 4 + .locals init (class [runtime]System.Tuple`2 V_0, + string V_1, + valuetype [runtime]System.DateTime V_2, + int32 V_3, + int32 V_4) + IL_0000: ldstr "" + IL_0005: callvirt instance string [runtime]System.Object::ToString() + IL_000a: stloc.1 + IL_000b: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0010: stloc.2 + IL_0011: ldstr "3" + IL_0016: callvirt instance string [runtime]System.Object::ToString() + IL_001b: stloc.1 + IL_001c: ldc.i4.2 + IL_001d: call int32 TupleElimination::f() + IL_0022: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0027: call class [runtime]System.Tuple`2 TupleElimination/Test::test(class [runtime]System.Tuple`2) + IL_002c: stloc.0 + IL_002d: ldloc.0 + IL_002e: call instance !1 class [runtime]System.Tuple`2::get_Item2() + IL_0033: stloc.3 + IL_0034: ldloc.0 + IL_0035: call instance !0 class [runtime]System.Tuple`2::get_Item1() + IL_003a: stloc.s V_4 + IL_003c: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0041: stloc.2 + IL_0042: ldloc.s V_4 + IL_0044: ldloc.3 + IL_0045: add + IL_0046: ret +}""" ] + + [] + let ``Branching let binding rhs does not prevent tuple elimination``() = + FSharp """ +module TupleElimination +open System.Runtime.CompilerServices + +[] +let f () = 3 + +[] +let sideEffect () = () + +[] +let cond () = true + +type Test = + [] + static member test(x: int32 * int32) = x + +let x () = + let a, b = + sideEffect () + if cond () then + let v = "yep" + let v2 = if cond () then 1 else 3 + v, v2 + else + "", f () + a, b + +let rec y () = + let a, b, c = + if cond () then + "".ToString () |> ignore + 1, f (), 3 + else + if cond () then + 2, 2, 3 + else + match 1 / 0 with + | 1 -> + if 2 / 3 = 1 then + 5, 6, 7 + else + "".ToString () |> ignore + 6, 5, 4 + | 2 -> 6, 6, 6 + | 3 -> f (), 7, f () + | _ -> 8, y (), y () + + a + b + (2 * c) + +let z () = + let a, b = + if cond () then + 1, 3 + else + 3, 4 + a + b + """ + |> compile + |> shouldSucceed + |> verifyIL [ + +(* +public static Tuple x() +{ + TupleElimination.sideEffect(); + string item; + int item2; + if (TupleElimination.cond()) + { + int num = (!TupleElimination.cond()) ? 3 : 1; + item = "yep"; + item2 = num; + } + else + { + item = ""; + item2 = TupleElimination.f(); + } + return new Tuple(item, item2); +} +*) + """ +.method public static class [runtime]System.Tuple`2 + x() cil managed +{ + + .maxstack 4 + .locals init (string V_0, + int32 V_1, + int32 V_2) + IL_0000: call void TupleElimination::sideEffect() + IL_0005: call bool TupleElimination::cond() + IL_000a: brfalse.s IL_0022 + + IL_000c: call bool TupleElimination::cond() + IL_0011: brfalse.s IL_0016 + + IL_0013: ldc.i4.1 + IL_0014: br.s IL_0017 + + IL_0016: ldc.i4.3 + IL_0017: stloc.2 + IL_0018: ldstr "yep" + IL_001d: stloc.0 + IL_001e: ldloc.2 + IL_001f: stloc.1 + IL_0020: br.s IL_002e + + IL_0022: ldstr "" + IL_0027: stloc.0 + IL_0028: call int32 TupleElimination::f() + IL_002d: stloc.1 + IL_002e: ldloc.0 + IL_002f: ldloc.1 + IL_0030: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0035: ret +} +""" + +(* +public static int y() +{ + int num; + int num2; + int num3; + if (TupleElimination.cond()) + { + string text = "".ToString(); + num = 1; + num2 = TupleElimination.f(); + num3 = 3; + } + else if (TupleElimination.cond()) + { + num = 2; + num2 = 2; + num3 = 3; + } + else + { + switch (1 / 0) + { + case 1: + if (2 / 3 == 1) + { + num = 5; + num2 = 6; + num3 = 7; + } + else + { + string text = "".ToString(); + num = 6; + num2 = 5; + num3 = 4; + } + break; + case 2: + num = 6; + num2 = 6; + num3 = 6; + break; + case 3: + num = TupleElimination.f(); + num2 = 7; + num3 = TupleElimination.f(); + break; + default: + num = 8; + num2 = TupleElimination.y(); + num3 = TupleElimination.y(); + break; + } + } + return num + num2 + 2 * num3; +} +*) + """ +.method public static int32 y() cil managed +{ + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + int32 V_2, + string V_3) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: ldc.i4.0 + IL_0005: stloc.2 + IL_0006: call bool TupleElimination::cond() + IL_000b: brfalse.s IL_0027 + + IL_000d: ldstr "" + IL_0012: callvirt instance string [runtime]System.Object::ToString() + IL_0017: stloc.3 + IL_0018: ldc.i4.1 + IL_0019: stloc.0 + IL_001a: call int32 TupleElimination::f() + IL_001f: stloc.1 + IL_0020: ldc.i4.3 + IL_0021: stloc.2 + IL_0022: br IL_0095 + + IL_0027: call bool TupleElimination::cond() + IL_002c: brfalse.s IL_0036 + + IL_002e: ldc.i4.2 + IL_002f: stloc.0 + IL_0030: ldc.i4.2 + IL_0031: stloc.1 + IL_0032: ldc.i4.3 + IL_0033: stloc.2 + IL_0034: br.s IL_0095 + + IL_0036: ldc.i4.1 + IL_0037: ldc.i4.0 + IL_0038: div + IL_0039: ldc.i4.1 + IL_003a: sub + IL_003b: switch ( + IL_004e, + IL_006f, + IL_0077) + IL_004c: br.s IL_0087 + + IL_004e: ldc.i4.2 + IL_004f: ldc.i4.3 + IL_0050: div + IL_0051: ldc.i4.1 + IL_0052: bne.un.s IL_005c + + IL_0054: ldc.i4.5 + IL_0055: stloc.0 + IL_0056: ldc.i4.6 + IL_0057: stloc.1 + IL_0058: ldc.i4.7 + IL_0059: stloc.2 + IL_005a: br.s IL_0095 + + IL_005c: ldstr "" + IL_0061: callvirt instance string [runtime]System.Object::ToString() + IL_0066: stloc.3 + IL_0067: ldc.i4.6 + IL_0068: stloc.0 + IL_0069: ldc.i4.5 + IL_006a: stloc.1 + IL_006b: ldc.i4.4 + IL_006c: stloc.2 + IL_006d: br.s IL_0095 + + IL_006f: ldc.i4.6 + IL_0070: stloc.0 + IL_0071: ldc.i4.6 + IL_0072: stloc.1 + IL_0073: ldc.i4.6 + IL_0074: stloc.2 + IL_0075: br.s IL_0095 + + IL_0077: call int32 TupleElimination::f() + IL_007c: stloc.0 + IL_007d: ldc.i4.7 + IL_007e: stloc.1 + IL_007f: call int32 TupleElimination::f() + IL_0084: stloc.2 + IL_0085: br.s IL_0095 + + IL_0087: ldc.i4.8 + IL_0088: stloc.0 + IL_0089: call int32 TupleElimination::y() + IL_008e: stloc.1 + IL_008f: call int32 TupleElimination::y() + IL_0094: stloc.2 + IL_0095: ldloc.0 + IL_0096: ldloc.1 + IL_0097: add + IL_0098: ldc.i4.2 + IL_0099: ldloc.2 + IL_009a: mul + IL_009b: add + IL_009c: ret +} +""" + +(* +public static int z() +{ + int num; + int num2; + if (TupleElimination.cond()) + { + num = 1; + num2 = 3; + } + else + { + num = 3; + num2 = 4; + } + return num + num2; +} +*) + """ +.method public static int32 z() cil managed +{ + + .maxstack 4 + .locals init (int32 V_0, + int32 V_1) + IL_0000: call bool TupleElimination::cond() + IL_0005: brfalse.s IL_000d + + IL_0007: ldc.i4.1 + IL_0008: stloc.0 + IL_0009: ldc.i4.3 + IL_000a: stloc.1 + IL_000b: br.s IL_0011 + + IL_000d: ldc.i4.3 + IL_000e: stloc.0 + IL_000f: ldc.i4.4 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: ldloc.1 + IL_0013: add + IL_0014: ret +}""" ] + + + +#if !DEBUG // sensitive to debug-level code coming across from debug FSharp.Core + + [] + let ``Branching let binding of tuple with capture doesn't promote``() = + FSharp """ +module TupleElimination +open System.Runtime.CompilerServices + +let testFunction(a,b) = + let x,y = printfn "hello"; b*a,a*b + (fun () -> x + y) + """ + |> compile + |> shouldSucceed + |> verifyIL [ + // Checks the captured 'x' and 'y' are not promoted onto the heap + """ +.method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + testFunction(int32 a, + int32 b) cil managed +{ + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0, + int32 V_1, + int32 V_2) + IL_0000: ldstr "hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: stloc.0 + IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0010: ldloc.0 + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: ldarg.1 + IL_0018: ldarg.0 + IL_0019: mul + IL_001a: stloc.1 + IL_001b: ldarg.0 + IL_001c: ldarg.1 + IL_001d: mul + IL_001e: stloc.2 + IL_001f: ldloc.1 + IL_0020: ldloc.2 + IL_0021: newobj instance void TupleElimination/testFunction@7::.ctor(int32, + int32) + IL_0026: ret +} + +""" ] + +#endif + + + [] + let ``Branching let binding of tuple gives good names in closure``() = + FSharp """ +module TupleElimination +open System.Runtime.CompilerServices + +let testFunction(a,b) = + let x,y = printfn "hello"; b*a,a*b + (fun () -> x + y) + """ + |> compile + |> shouldSucceed + |> verifyIL [ + + // Checks the names of captured 'x' and 'y'. + """ + + .method public strict virtual instance int32 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 TupleElimination/testFunction@7::x + IL_0006: ldarg.0 + IL_0007: ldfld int32 TupleElimination/testFunction@7::y + IL_000c: add + IL_000d: ret + } +""" ] + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/noframework/noframework02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/noframework/noframework02.fs index dc79de01586..8bc2ae3691f 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/noframework/noframework02.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/noframework/noframework02.fs @@ -5,8 +5,10 @@ // System.Func<...> is in System.Core.dll (NetFx3.5) +open System + let f ( d : System.Func ) = d.Invoke() + 1;; -if f ( new System.Func<_>(fun _ -> 10) ) <> 11 then exit 1 +if f ( new System.Func<_>(fun _ -> 10) ) <> 11 then raise (new Exception("if f ( new System.Func<_>(fun _ -> 10) ) <> 11")) -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_01.fs index a0165cd572a..cd6867c3341 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_01.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_01.fs @@ -1,4 +1,4 @@ // #Regression #NoMT #CompilerOptions //Unrecognized option: '--PLATFORM' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_02.fs index c0e1e8abdf4..86e246c9f84 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_02.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_02.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //Unrecognized option: '--PlatForm' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_03.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_03.fs index 203dab06451..5bcabe032da 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_03.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_03.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //Unrecognized platform 'ITANIUM', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_04.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_04.fs index 2f433848fc4..be32ba84233 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_04.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_04.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //Unrecognized platform 'ANYCPU', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_05.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_05.fs index 5b3fc2ac0ce..92aa8efd70e 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_05.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_05.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //Unrecognized platform 'X86', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_06.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_06.fs index 5a4683cb78a..3935e374ab0 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_06.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_06.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //Unrecognized platform 'X64', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_07.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_07.fs index 995f326bdc2..d7843110bbc 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_07.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_07.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //Unrecognized platform 'IA64', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_08.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_08.fs index 1e3a5c3348b..7096eeb2147 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_08.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_08.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //Unrecognized platform 'i386', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_09.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_09.fs index 2c0bd250e8c..a44c7d415a3 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_09.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_09.fs @@ -1,5 +1,4 @@ // #Regression #NoMT #CompilerOptions //Unrecognized platform 'AMD64', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' -exit 1 - +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_10.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_10.fs index d52ef7fe3bb..2f372c0fac0 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_10.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_10.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //Unrecognized platform 'PPC', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_11.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_11.fs index d5eeb8029a8..ced265728c1 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_11.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_11.fs @@ -1,4 +1,4 @@ // #Regression #NoMT #CompilerOptions //Unrecognized option: '--platform-' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_12.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_12.fs index 5289830ee63..3fe0e61c758 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_12.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_12.fs @@ -1,4 +1,4 @@ // #Regression #NoMT #CompilerOptions //Unrecognized option: '--PLATFORM\+' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_13.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_13.fs index f6a98e0a757..a44f40b2631 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_13.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_13.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //Unrecognized option: '---platform' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_15.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_15.fs index 250df9000f6..5b842b5f711 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_15.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_15.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //Unrecognized platform 'ARM', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_16.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_16.fs index 0d21e217709..9c778d01340 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_16.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_16.fs @@ -1,5 +1,5 @@ // #Regression #NoMT #CompilerOptions //The 'anycpu32bitpreferred' platform can only be used with EXE targets\. You must use 'anycpu' instead\. module M -exit 1 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_01.fs index 3df58150e86..6b2ab71b578 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_01.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_01.fs @@ -1,4 +1,4 @@ // #Regression #NoMT #CompilerOptions //Unrecognized option: '--Times' #light -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_02.fs index 7232ba1d293..43d462138b9 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_02.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_02.fs @@ -1,4 +1,4 @@ // #Regression #NoMT #CompilerOptions //Unrecognized option: '--times-' #light -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_03.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_03.fs index 40b5dfee963..8b3121132b3 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_03.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_03.fs @@ -1,4 +1,4 @@ // #Regression #NoMT #CompilerOptions //Unrecognized option: '--times\+' #light -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/times01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/times01.fs index b01b7a501da..9ec95fac052 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/times01.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/times01.fs @@ -12,7 +12,7 @@ namespace N2 f2 10 module M3 = - exit 0 + printfn "Finished" //TIME:.+Delta:.+Mem:.+G0:.+G1:.+G2:.+\[Import mscorlib and FSharp.Core.dll\] //TIME:.+Delta:.+Mem:.+G0:.+G1:.+G2:.+\[Parse inputs\] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/PatternMatching/Simple/W_Incomplete01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/PatternMatching/Simple/W_Incomplete01.fs index 61db9b4e83c..1438890708d 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/PatternMatching/Simple/W_Incomplete01.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/PatternMatching/Simple/W_Incomplete01.fs @@ -106,4 +106,4 @@ module M = | Macro (e, _, _) -> e -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/PatternMatching/Simple/W_Incomplete02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/PatternMatching/Simple/W_Incomplete02.fs index 32fec0c6c5d..7fd5bc9a364 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/PatternMatching/Simple/W_Incomplete02.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/PatternMatching/Simple/W_Incomplete02.fs @@ -32,4 +32,4 @@ let h = | 10 -> 10 @@> -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/LazyValues02.fsx b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/LazyValues02.fsx index 8f172c6ab1d..cbbd596212a 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/LazyValues02.fsx +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/LazyValues02.fsx @@ -15,5 +15,5 @@ lazy12;; lazy 13;; lazy 13;; it;; -exit 0;; +printfn "Finished";; diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/LazyValues02NetFx4.fsx b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/LazyValues02NetFx4.fsx index 8252336a7dd..2f9d2dbd602 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/LazyValues02NetFx4.fsx +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/LazyValues02NetFx4.fsx @@ -15,4 +15,4 @@ lazy12;; lazy 13;; lazy 13;; it;; -exit 0;; +printfn "Finished";; diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasureIdentifiersRoundTrip01.fsx b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasureIdentifiersRoundTrip01.fsx index 46f4b7348fa..dd63ef87090 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasureIdentifiersRoundTrip01.fsx +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasureIdentifiersRoundTrip01.fsx @@ -18,7 +18,7 @@ module M2 = 2.0f;; 1.2;; -exit 0;; +printfn "Finished";; diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasuresGenericSignature01.fsx b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasuresGenericSignature01.fsx index ab7c8f1b8dc..e004050a993 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasuresGenericSignature01.fsx +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasuresGenericSignature01.fsx @@ -5,4 +5,4 @@ // goes back to 'u) //val f: x: float+ let f(x:float<'a>) = x*x;; -exit 0;; +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasuresGenericSignature02.fsx b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasuresGenericSignature02.fsx index 5913d74fea0..2867b9f0a8c 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasuresGenericSignature02.fsx +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/Printing/UnitsOfMeasuresGenericSignature02.fsx @@ -6,4 +6,4 @@ // This is the case where the generic function takes 2 args //val g: x: float+ let g (x:float<'a>) (y:float32<'b>) = x * float y;; -exit 0;; +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs index 79c649e564e..376cdd2ae86 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs @@ -30,6 +30,4 @@ let test10(x:float<'u>) (y:float<'u^(1/2)>) = sqrt x + y let test11(x:float<'u^-(1/4)>) (y:float<'u^(3/4)>) : float = (x*x*x + 1.0/y) * x let test12(x:float<'u^(1/2)>) (y:float<'v^2>) :float<'u 'v> = x*x*sqrt y let test13() = test12 4.0 2.0 + 3.0<(kg s)^(1/2)> - -exit 0 - +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fs index cb32fa11294..c2ba1e3df38 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fs @@ -10,5 +10,4 @@ type foo let m, n = 1, 10 [m .. 1 .. n] // OK - -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs index 60114b4c66c..d87b1f3d459 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs @@ -14,5 +14,4 @@ let l2 = [|10.0 |] // ok // we check that care too. let p1 = [|Array.empty|] // ok let p2 = [|Array.empty |] // ok - -exit 0 +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs index dcac1cb1c50..dd28ee65b7f 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs @@ -6,12 +6,12 @@ // Reciprocals parsed incorrectly for Measure definitions. #light +open System [] type s // [] type s [] type s' = / s / s // [] type s' = /s ^ 2 let oneHertz = 1.0 // OK let twoHertz = 2.0f< /s> // OK -if (1.0 + 2.0 <> 3.0) then exit 1 - -exit 0 +if (1.0 + 2.0 <> 3.0) then raise (new Exception("if (1.0 + 2.0 <> 3.0)")) +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/CompareIL.cmd b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/CompareIL.cmd new file mode 100644 index 00000000000..ea97cebadcb --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/CompareIL.cmd @@ -0,0 +1,17 @@ +REM == %1 --> assembly + +ildasm /TEXT /LINENUM /NOBAR "%~nx1" >"%~n1.il" +IF %ERRORLEVEL% NEQ 0 exit /b 1 + +echo %~dp0..\..\..\testenv\bin\ILComparer.exe "%~n1.il.bsl" "%~n1.il" + %~dp0..\..\..\testenv\bin\ILComparer.exe "%~n1.il.bsl" "%~n1.il" + +IF %ERRORLEVEL% EQU 0 exit /b 0 + +if /i "%TEST_UPDATE_BSL%" == "1" ( + echo copy /y "%~n1.il" "%~n1.il.bsl" + copy /y "%~n1.il" "%~n1.il.bsl" +) + +exit /b 1 + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter01.fs new file mode 100644 index 00000000000..60d1f482602 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter01.fs @@ -0,0 +1,7 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:5646 + +let squaresOfOneToTen() = + [ for x in 0 .. 2 do + yield x * x ] + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter01.il.bsl new file mode 100644 index 00000000000..7ccf884cffb --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter01.il.bsl @@ -0,0 +1,144 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly GenIter01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.GenIter01 +{ + // Offset: 0x00000000 Length: 0x000001F3 +} +.mresource public FSharpOptimizationData.GenIter01 +{ + // Offset: 0x000001F8 Length: 0x0000007A +} +.module GenIter01.exe +// MVID: {61FDB6C7-F836-DC98-A745-0383C7B6FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06B60000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed GenIter01 + extends [mscorlib]System.Object +{ + .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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + squaresOfOneToTen() cil managed + { + // 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, + [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_2, + [3] int32 x, + [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: 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_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_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 : 12,23 '' + 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_0029: nop + IL_002a: br.s IL_000f + + IL_002c: ldnull + IL_002d: stloc.2 + IL_002e: leave.s IL_0045 + + } // end .try + finally + { + IL_0030: ldloc.1 + IL_0031: isinst [mscorlib]System.IDisposable + IL_0036: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0038: ldloc.s V_4 + IL_003a: brfalse.s IL_0044 + + .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_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 + +.class private abstract auto ansi sealed ''.$GenIter01 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $GenIter01::main@ + +} // end of class ''.$GenIter01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter02.fs new file mode 100644 index 00000000000..9486dc543cc --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter02.fs @@ -0,0 +1,7 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:5646 + +let squaresOfOneToTenB() = + [ for x in 0 .. 2 do + printfn "hello" + yield x * x ] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter02.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter02.il.bsl new file mode 100644 index 00000000000..645d501bfa5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter02.il.bsl @@ -0,0 +1,149 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly GenIter02 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.GenIter02 +{ + // Offset: 0x00000000 Length: 0x000001F4 +} +.mresource public FSharpOptimizationData.GenIter02 +{ + // Offset: 0x000001F8 Length: 0x0000007B +} +.module GenIter02.exe +// MVID: {61FD4A6D-F857-DC98-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06ED0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed GenIter02 + extends [mscorlib]System.Object +{ + .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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + squaresOfOneToTenB() cil managed + { + // 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, + [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_2, + [3] int32 x, + [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: 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_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_000f: ldloc.1 + IL_0010: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0015: brfalse.s IL_003c + + 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_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 + .line 7,7 : 12,23 '' + IL_002e: ldloca.s V_0 + IL_0030: ldloc.3 + 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 + .line 100001,100001 : 0,0 '' + IL_0039: nop + IL_003a: br.s IL_000f + + IL_003c: ldnull + IL_003d: stloc.2 + IL_003e: leave.s IL_0055 + + } // end .try + finally + { + IL_0040: ldloc.1 + IL_0041: isinst [mscorlib]System.IDisposable + IL_0046: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0048: ldloc.s V_4 + IL_004a: brfalse.s IL_0054 + + .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_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 + +.class private abstract auto ansi sealed ''.$GenIter02 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $GenIter02::main@ + +} // end of class ''.$GenIter02 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter03.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter03.fs new file mode 100644 index 00000000000..b031cc5ed8e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter03.fs @@ -0,0 +1,5 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:5646 + +let squaresOfOneToTenC() = [ for x in 0 .. 10 -> x * x ] + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter03.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter03.il.bsl new file mode 100644 index 00000000000..c163ec5e0a1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter03.il.bsl @@ -0,0 +1,144 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly GenIter03 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.GenIter03 +{ + // Offset: 0x00000000 Length: 0x000001F4 +} +.mresource public FSharpOptimizationData.GenIter03 +{ + // Offset: 0x000001F8 Length: 0x0000007B +} +.module GenIter03.exe +// MVID: {61FDB6C7-F77C-DC98-A745-0383C7B6FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07300000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed GenIter03 + extends [mscorlib]System.Object +{ + .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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + squaresOfOneToTenC() cil managed + { + // 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, + [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_2, + [3] int32 x, + [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: 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_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_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 : 47,55 '' + IL_0021: ldloc.3 + 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 + .line 100001,100001 : 0,0 '' + IL_002a: nop + IL_002b: br.s IL_0010 + + IL_002d: ldnull + IL_002e: stloc.2 + IL_002f: leave.s IL_0046 + + } // end .try + finally + { + IL_0031: ldloc.1 + IL_0032: isinst [mscorlib]System.IDisposable + IL_0037: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0039: ldloc.s V_4 + IL_003b: brfalse.s IL_0045 + + .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_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 + +.class private abstract auto ansi sealed ''.$GenIter03 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $GenIter03::main@ + +} // end of class ''.$GenIter03 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter04.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter04.fs new file mode 100644 index 00000000000..446e373977c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter04.fs @@ -0,0 +1,4 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:5646 + +let squaresOfOneToTenD = [ for x in 0 .. 10 -> x * x ] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter04.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter04.il.bsl new file mode 100644 index 00000000000..ccd521dc79e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/GenIter04.il.bsl @@ -0,0 +1,161 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly GenIter04 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.GenIter04 +{ + // Offset: 0x00000000 Length: 0x000001E4 +} +.mresource public FSharpOptimizationData.GenIter04 +{ + // Offset: 0x000001E8 Length: 0x0000007B +} +.module GenIter04.exe +// MVID: {61FDB6C7-F79D-DC98-A745-0383C7B6FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07060000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed GenIter04 + extends [mscorlib]System.Object +{ + .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 specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_squaresOfOneToTenD() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$GenIter04::squaresOfOneToTenD@4 + IL_0005: ret + } // end of method GenIter04::get_squaresOfOneToTenD + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + squaresOfOneToTenD() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 GenIter04::get_squaresOfOneToTenD() + } // end of property GenIter04::squaresOfOneToTenD +} // end of class GenIter04 + +.class private abstract auto ansi sealed ''.$GenIter04 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 squaresOfOneToTenD@4 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // 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, + [2] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_2, + [3] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_3, + [4] int32 x, + [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: 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_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_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 : 45,53 '' + 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 + .line 100001,100001 : 0,0 '' + IL_002d: nop + IL_002e: br.s IL_0010 + + IL_0030: ldnull + IL_0031: stloc.3 + IL_0032: leave.s IL_0049 + + } // end .try + finally + { + IL_0034: ldloc.2 + IL_0035: isinst [mscorlib]System.IDisposable + IL_003a: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_003c: ldloc.s V_5 + IL_003e: brfalse.s IL_0048 + + .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_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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/env.lst new file mode 100644 index 00000000000..2e2607e4e8c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/env.lst @@ -0,0 +1,5 @@ + + SOURCE=GenIter01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter01.exe" # GenIter01.fs - + SOURCE=GenIter02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter02.exe" # GenIter02.fs - + SOURCE=GenIter03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter03.exe" # GenIter03.fs - + SOURCE=GenIter04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter04.exe" # GenIter04.fs - diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/keep.lst similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/keep.lst rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/GeneratedIterators/keep.lst diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison01.fs new file mode 100644 index 00000000000..0cd545475c7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison01.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +let f1 (x:int) (y:int) = (x <= y) diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison01.il.bsl new file mode 100644 index 00000000000..bc1449351fd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison01.il.bsl @@ -0,0 +1,88 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly InequalityComparison01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.InequalityComparison01 +{ + // Offset: 0x00000000 Length: 0x0000020A +} +.mresource public FSharpOptimizationData.InequalityComparison01 +{ + // Offset: 0x00000210 Length: 0x00000085 +} +.module InequalityComparison01.exe +// MVID: {60B68B7E-263A-E6D5-A745-03837E8BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x074E0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed InequalityComparison01 + extends [mscorlib]System.Object +{ + .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 f1(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 27,33 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\InequalityComparison\\InequalityComparison01.fs' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: cgt + IL_0004: ldc.i4.0 + IL_0005: ceq + IL_0007: ret + } // end of method InequalityComparison01::f1 + +} // end of class InequalityComparison01 + +.class private abstract auto ansi sealed ''.$InequalityComparison01 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $InequalityComparison01::main@ + +} // end of class ''.$InequalityComparison01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison02.fs new file mode 100644 index 00000000000..c5a07c93052 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison02.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +let f2 (x:int) (y:int) = (x >= y) diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison02.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison02.il.bsl new file mode 100644 index 00000000000..ca23c28d8a2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison02.il.bsl @@ -0,0 +1,88 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly InequalityComparison02 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.InequalityComparison02 +{ + // Offset: 0x00000000 Length: 0x0000020A +} +.mresource public FSharpOptimizationData.InequalityComparison02 +{ + // Offset: 0x00000210 Length: 0x00000085 +} +.module InequalityComparison02.exe +// MVID: {60B68B7E-263A-E72C-A745-03837E8BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07180000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed InequalityComparison02 + extends [mscorlib]System.Object +{ + .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 f2(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 27,33 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\InequalityComparison\\InequalityComparison02.fs' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: clt + IL_0004: ldc.i4.0 + IL_0005: ceq + IL_0007: ret + } // end of method InequalityComparison02::f2 + +} // end of class InequalityComparison02 + +.class private abstract auto ansi sealed ''.$InequalityComparison02 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $InequalityComparison02::main@ + +} // end of class ''.$InequalityComparison02 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison03.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison03.fs new file mode 100644 index 00000000000..fdac1a70375 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison03.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +let f3 (x:int) (y:int) = (x < y) diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison03.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison03.il.bsl new file mode 100644 index 00000000000..4fd361bb957 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison03.il.bsl @@ -0,0 +1,86 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly InequalityComparison03 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.InequalityComparison03 +{ + // Offset: 0x00000000 Length: 0x0000020A +} +.mresource public FSharpOptimizationData.InequalityComparison03 +{ + // Offset: 0x00000210 Length: 0x00000085 +} +.module InequalityComparison03.exe +// MVID: {60B68B7E-263A-E70B-A745-03837E8BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06510000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed InequalityComparison03 + extends [mscorlib]System.Object +{ + .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 f3(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 5 (0x5) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 27,32 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\InequalityComparison\\InequalityComparison03.fs' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: clt + IL_0004: ret + } // end of method InequalityComparison03::f3 + +} // end of class InequalityComparison03 + +.class private abstract auto ansi sealed ''.$InequalityComparison03 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $InequalityComparison03::main@ + +} // end of class ''.$InequalityComparison03 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison04.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison04.fs new file mode 100644 index 00000000000..7a9bf40ed96 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison04.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +let f4 (x:int) (y:int) = (x > y) diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison04.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison04.il.bsl new file mode 100644 index 00000000000..988eae50727 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison04.il.bsl @@ -0,0 +1,86 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly InequalityComparison04 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.InequalityComparison04 +{ + // Offset: 0x00000000 Length: 0x0000020A +} +.mresource public FSharpOptimizationData.InequalityComparison04 +{ + // Offset: 0x00000210 Length: 0x00000085 +} +.module InequalityComparison04.exe +// MVID: {60B68B7E-263A-E772-A745-03837E8BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07590000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed InequalityComparison04 + extends [mscorlib]System.Object +{ + .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(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 5 (0x5) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 27,32 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\InequalityComparison\\InequalityComparison04.fs' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: cgt + IL_0004: ret + } // end of method InequalityComparison04::f4 + +} // end of class InequalityComparison04 + +.class private abstract auto ansi sealed ''.$InequalityComparison04 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $InequalityComparison04::main@ + +} // end of class ''.$InequalityComparison04 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison05.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison05.fs new file mode 100644 index 00000000000..cf79f7d4773 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison05.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +let f5 (x:int) (y:int) (z:'a) (w:'a) = if (x > y) then z else w diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison05.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison05.il.bsl new file mode 100644 index 00000000000..d8b995dda8c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/InequalityComparison05.il.bsl @@ -0,0 +1,98 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly InequalityComparison05 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.InequalityComparison05 +{ + // Offset: 0x00000000 Length: 0x00000232 +} +.mresource public FSharpOptimizationData.InequalityComparison05 +{ + // Offset: 0x00000238 Length: 0x00000085 +} +.module InequalityComparison05.exe +// MVID: {611C4D7C-263A-E751-A745-03837C4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06C10000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed InequalityComparison05 + extends [mscorlib]System.Object +{ + .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 !!a f5(int32 x, + int32 y, + !!a z, + !!a w) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 01 00 00 00 00 00 ) + // Code size 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 40,55 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\InequalityComparison\\InequalityComparison05.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldarg.1 + IL_0003: ble.s IL_0007 + + .line 3,3 : 56,57 '' + IL_0005: ldarg.2 + IL_0006: ret + + .line 3,3 : 63,64 '' + IL_0007: ldarg.3 + IL_0008: ret + } // end of method InequalityComparison05::f5 + +} // end of class InequalityComparison05 + +.class private abstract auto ansi sealed ''.$InequalityComparison05 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $InequalityComparison05::main@ + +} // end of class ''.$InequalityComparison05 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/env.lst new file mode 100644 index 00000000000..9c42a7a604f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/env.lst @@ -0,0 +1,5 @@ + SOURCE=InequalityComparison01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison01.exe" # x <= y + SOURCE=InequalityComparison02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison02.exe" # x >= y + SOURCE=InequalityComparison03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison03.exe" # x < y + SOURCE=InequalityComparison04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison04.exe" # x > y + SOURCE=InequalityComparison05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison05.exe" # if (x > y) then ... else ... diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/keep.lst similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/keep.lst rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/InequalityComparison/keep.lst diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.fs new file mode 100644 index 00000000000..a3bbb454983 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.fs @@ -0,0 +1,8 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL #Lists +// Regression test for FSHARP1.0:4058 +module ListExpressionSteppingTest1 +module ListExpressionSteppingTest1 = + let f0 () = + [ yield 1 ] + let _ = f0() + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl new file mode 100644 index 00000000000..5b10949b9fe --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl @@ -0,0 +1,104 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ListExpressionSteppingTest1 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ListExpressionSteppingTest1 +{ + // Offset: 0x00000000 Length: 0x00000269 +} +.mresource public FSharpOptimizationData.ListExpressionSteppingTest1 +{ + // Offset: 0x00000270 Length: 0x000000AF +} +.module ListExpressionSteppingTest1.exe +// MVID: {61FD4A6D-50CF-F6CE-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07510000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ListExpressionSteppingTest1 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public ListExpressionSteppingTest1 + extends [mscorlib]System.Object + { + .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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f0() cil managed + { + // 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: 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 + +} // end of class ListExpressionSteppingTest1 + +.class private abstract auto ansi sealed ''.$ListExpressionSteppingTest1 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + } // end of method $ListExpressionSteppingTest1::main@ + +} // end of class ''.$ListExpressionSteppingTest1 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.fs new file mode 100644 index 00000000000..b8bc07e5119 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.fs @@ -0,0 +1,30 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL #Lists +// Regression test for FSHARP1.0:4058 +module ListExpressionSteppingTest2 +module ListExpressionSteppingTest2 = + let f1 () = + [ printfn "hello" + yield 1 + printfn "goodbye" + yield 2] + + let _ = f1() + + // Test debug point generation for ||> and |||> + let f2 x = + let xs1 = + ([x;x;x], [0..2]) + ||> List.zip + |> List.map (fun (a,b) -> a, b+1) + |> List.map (fun (a,b) -> a, b+1) + + let xs2 = + ([x;x;x], [0..2], [0..2]) + |||> List.zip3 + |> List.map (fun (a,b,c) -> a, b+1, c) + |> List.map (fun (a,b,c) -> a, b+1, c) + + xs1, xs2 + + let _ = f2 5 + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl new file mode 100644 index 00000000000..c9c2bef48b9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl @@ -0,0 +1,459 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ListExpressionSteppingTest2 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ListExpressionSteppingTest2 +{ + // Offset: 0x00000000 Length: 0x000002C8 +} +.mresource public FSharpOptimizationData.ListExpressionSteppingTest2 +{ + // Offset: 0x000002D0 Length: 0x000000BC +} +.module ListExpressionSteppingTest2.exe +// MVID: {61FD4A6D-D3DE-B780-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06FC0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ListExpressionSteppingTest2 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public ListExpressionSteppingTest2 + extends [mscorlib]System.Object + { + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 stage #2 at line 18@18' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 stage #2 at line 18@18'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 24 (0x18) + .maxstack 7 + .locals init ([0] !a a, + [1] int32 b) + .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\\ListExpressionStepping\\ListExpressionSteppingTest2.fs' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 18,18 : 38,44 '' + IL_000e: ldloc.0 + IL_000f: ldloc.1 + IL_0010: ldc.i4.1 + IL_0011: add + IL_0012: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0017: ret + } // end of method 'Pipe #1 stage #2 at line 18@18'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 stage #2 at line 18@18'::.cctor + + } // end of class 'Pipe #1 stage #2 at line 18@18' + + .class auto ansi serializable sealed nested assembly beforefieldinit xs1@19 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method xs1@19::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 24 (0x18) + .maxstack 7 + .locals init ([0] !a a, + [1] int32 b) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 19,19 : 38,44 '' + IL_000e: ldloc.0 + IL_000f: ldloc.1 + IL_0010: ldc.i4.1 + IL_0011: add + IL_0012: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0017: ret + } // end of method xs1@19::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::@_instance + IL_000a: ret + } // end of method xs1@19::.cctor + + } // end of class xs1@19 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 stage #2 at line 24@24' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3> + { + .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 stage #2 at line 24@24'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`3 + Invoke(class [mscorlib]System.Tuple`3 tupledArg) cil managed + { + // Code size 32 (0x20) + .maxstack 7 + .locals init ([0] !a a, + [1] int32 b, + [2] int32 c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`3::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`3::get_Item2() + IL_000d: stloc.1 + IL_000e: ldarg.1 + IL_000f: call instance !2 class [mscorlib]System.Tuple`3::get_Item3() + IL_0014: stloc.2 + .line 24,24 : 40,49 '' + IL_0015: ldloc.0 + IL_0016: ldloc.1 + IL_0017: ldc.i4.1 + IL_0018: add + IL_0019: ldloc.2 + IL_001a: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_001f: ret + } // end of method 'Pipe #2 stage #2 at line 24@24'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 stage #2 at line 24@24'::.cctor + + } // end of class 'Pipe #2 stage #2 at line 24@24' + + .class auto ansi serializable sealed nested assembly beforefieldinit xs2@25 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3> + { + .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3>::.ctor() + IL_0006: ret + } // end of method xs2@25::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`3 + Invoke(class [mscorlib]System.Tuple`3 tupledArg) cil managed + { + // Code size 32 (0x20) + .maxstack 7 + .locals init ([0] !a a, + [1] int32 b, + [2] int32 c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`3::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`3::get_Item2() + IL_000d: stloc.1 + IL_000e: ldarg.1 + IL_000f: call instance !2 class [mscorlib]System.Tuple`3::get_Item3() + IL_0014: stloc.2 + .line 25,25 : 40,49 '' + IL_0015: ldloc.0 + IL_0016: ldloc.1 + IL_0017: ldc.i4.1 + IL_0018: add + IL_0019: ldloc.2 + IL_001a: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_001f: ret + } // end of method xs2@25::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::@_instance + IL_000a: ret + } // end of method xs2@25::.cctor + + } // end of class xs2@25 + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f1() cil managed + { + // Code size 59 (0x3b) + .maxstack 4 + .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0) + .line 6,9 : 9,19 '' + IL_0000: nop + .line 6,6 : 11,26 '' + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop + .line 7,7 : 11,18 '' + IL_0011: ldloca.s V_0 + IL_0013: ldc.i4.1 + IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0019: nop + .line 8,8 : 11,28 '' + IL_001a: ldstr "goodbye" + IL_001f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0029: pop + .line 9,9 : 11,18 '' + IL_002a: ldloca.s V_0 + IL_002c: ldc.i4.2 + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloca.s V_0 + IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003a: ret + } // end of method ListExpressionSteppingTest2::f1 + + .method public static class [mscorlib]System.Tuple`2>,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> + f2(!!a x) cil managed + { + // Code size 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', + [2] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'Pipe #1 input #2 at line 16', + [3] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> 'Pipe #1 stage #1 at line 17', + [4] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> 'Pipe #1 stage #2 at line 18', + [5] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> xs2, + [6] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'Pipe #2 input #1 at line 22', + [7] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'Pipe #2 input #2 at line 22', + [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 16,16 : 13,20 '' + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: ldarg.0 + IL_0003: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0008: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0012: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0017: stloc.1 + .line 16,16 : 22,28 '' + IL_0018: ldc.i4.0 + IL_0019: ldc.i4.1 + IL_001a: ldc.i4.2 + IL_001b: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0020: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0025: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_002a: stloc.2 + .line 17,17 : 16,24 '' + IL_002b: ldloc.1 + IL_002c: ldloc.2 + IL_002d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Zip(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0032: stloc.3 + .line 18,18 : 15,45 '' + IL_0033: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::@_instance + IL_0038: ldloc.3 + IL_0039: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003e: stloc.s 'Pipe #1 stage #2 at line 18' + .line 19,19 : 15,45 '' + IL_0040: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::@_instance + IL_0045: ldloc.s 'Pipe #1 stage #2 at line 18' + IL_0047: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_004c: stloc.0 + .line 22,22 : 13,20 '' + IL_004d: ldarg.0 + IL_004e: ldarg.0 + IL_004f: ldarg.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_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_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_0064: stloc.s 'Pipe #2 input #1 at line 22' + .line 22,22 : 22,28 '' + 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_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_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_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_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_0099: stloc.s 'Pipe #2 stage #1 at line 23' + .line 24,24 : 15,50 '' + 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_00a7: stloc.s 'Pipe #2 stage #2 at line 24' + .line 25,25 : 15,50 '' + 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_00b5: stloc.s xs2 + .line 27,27 : 9,17 '' + 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_00bf: ret + } // end of method ListExpressionSteppingTest2::f2 + + } // end of class ListExpressionSteppingTest2 + +} // end of class ListExpressionSteppingTest2 + +.class private abstract auto ansi sealed ''.$ListExpressionSteppingTest2 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + IL_000d: ret + } // end of method $ListExpressionSteppingTest2::main@ + +} // end of class ''.$ListExpressionSteppingTest2 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.fs new file mode 100644 index 00000000000..8dbfe2095b1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.fs @@ -0,0 +1,12 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL #Lists +// Regression test for FSHARP1.0:4058 +module ListExpressionSteppingTest3 +module ListExpressionSteppingTest3 = + let f2 () = + let x = ref 0 + [ while !x < 4 do + incr x + printfn "hello" + yield x ] + + let _ = f2() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl new file mode 100644 index 00000000000..67d4ffdb520 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl @@ -0,0 +1,128 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ListExpressionSteppingTest3 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ListExpressionSteppingTest3 +{ + // Offset: 0x00000000 Length: 0x00000279 +} +.mresource public FSharpOptimizationData.ListExpressionSteppingTest3 +{ + // Offset: 0x00000280 Length: 0x000000AF +} +.module ListExpressionSteppingTest3.exe +// MVID: {61FD4A6D-AE45-39B4-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06BE0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ListExpressionSteppingTest3 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public ListExpressionSteppingTest3 + extends [mscorlib]System.Object + { + .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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + f2() cil managed + { + // Code size 60 (0x3c) + .maxstack 4 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, + [1] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1> V_1) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 6,6 : 9,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest3.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 + .line 7,10 : 9,23 '' + IL_0007: nop + .line 7,7 : 11,23 '' + 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 + + .line 8,8 : 14,20 '' + 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 + .line 9,9 : 14,29 '' + 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 + .line 10,10 : 14,21 '' + 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 + .line 100001,100001 : 0,0 '' + 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 + } // end of method ListExpressionSteppingTest3::f2 + + } // end of class ListExpressionSteppingTest3 + +} // end of class ListExpressionSteppingTest3 + +.class private abstract auto ansi sealed ''.$ListExpressionSteppingTest3 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + } // end of method $ListExpressionSteppingTest3::main@ + +} // end of class ''.$ListExpressionSteppingTest3 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.fs new file mode 100644 index 00000000000..d2322a3e860 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.fs @@ -0,0 +1,14 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL #Lists +// Regression test for FSHARP1.0:4058 +module ListExpressionSteppingTest4 +module ListExpressionSteppingTest4 = + let f3 () = + [ let x = ref 0 + incr x + let y = ref 0 + incr y + yield !x + let z = !x + !y + yield z ] + + let _ = f3() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl new file mode 100644 index 00000000000..a9e8feff346 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl @@ -0,0 +1,136 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ListExpressionSteppingTest4 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ListExpressionSteppingTest4 +{ + // Offset: 0x00000000 Length: 0x00000269 +} +.mresource public FSharpOptimizationData.ListExpressionSteppingTest4 +{ + // Offset: 0x00000270 Length: 0x000000AF +} +.module ListExpressionSteppingTest4.exe +// MVID: {61FD4A6D-3154-FA67-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07210000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ListExpressionSteppingTest4 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public ListExpressionSteppingTest4 + extends [mscorlib]System.Object + { + .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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f3() cil managed + { + // Code size 74 (0x4a) + .maxstack 4 + .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, + [3] int32 z) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 6,12 : 9,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest4.fs' + IL_0000: nop + .line 6,6 : 11,24 '' + IL_0001: ldc.i4.0 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.1 + .line 7,7 : 11,17 '' + IL_0008: ldloc.1 + IL_0009: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000e: nop + .line 8,8 : 11,24 '' + IL_000f: ldc.i4.0 + IL_0010: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0015: stloc.2 + .line 9,9 : 11,17 '' + IL_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 + IL_001f: ldloc.1 + IL_0020: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002a: nop + .line 11,11 : 11,26 '' + IL_002b: ldloc.1 + IL_002c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0031: ldloc.2 + IL_0032: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0037: add + IL_0038: stloc.3 + .line 12,12 : 11,18 '' + IL_0039: ldloca.s V_0 + IL_003b: ldloc.3 + IL_003c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0041: nop + IL_0042: ldloca.s V_0 + IL_0044: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0049: ret + } // end of method ListExpressionSteppingTest4::f3 + + } // end of class ListExpressionSteppingTest4 + +} // end of class ListExpressionSteppingTest4 + +.class private abstract auto ansi sealed ''.$ListExpressionSteppingTest4 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + } // end of method $ListExpressionSteppingTest4::main@ + +} // end of class ''.$ListExpressionSteppingTest4 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.fs new file mode 100644 index 00000000000..72cdf56cc9e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.fs @@ -0,0 +1,17 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL #Lists +// Regression test for FSHARP1.0:4058 +module ListExpressionSteppingTest5 +module ListExpressionSteppingTest5 = + let f4 () = + [ let x = ref 0 + try + let y = ref 0 + incr y + yield !x + let z = !x + !y + yield z + finally + incr x + printfn "done" ] + + let _ = f4() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl new file mode 100644 index 00000000000..48677cab5b4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl @@ -0,0 +1,160 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ListExpressionSteppingTest5 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ListExpressionSteppingTest5 +{ + // Offset: 0x00000000 Length: 0x00000269 +} +.mresource public FSharpOptimizationData.ListExpressionSteppingTest5 +{ + // Offset: 0x00000270 Length: 0x000000AF +} +.module ListExpressionSteppingTest5.exe +// MVID: {61FD4A6D-CBE3-BFEA-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06850000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ListExpressionSteppingTest5 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public ListExpressionSteppingTest5 + extends [mscorlib]System.Object + { + .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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f4() cil managed + { + // Code size 101 (0x65) + .maxstack 4 + .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, + [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, + [4] int32 z) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 6,15 : 9,30 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest5.fs' + IL_0000: nop + .line 6,6 : 11,24 '' + IL_0001: ldc.i4.0 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.1 + .line 7,7 : 11,14 '' + .try + { + IL_0008: nop + .line 8,8 : 15,28 '' + IL_0009: ldc.i4.0 + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_000f: stloc.3 + .line 9,9 : 15,21 '' + IL_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 + IL_0019: ldloc.1 + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_001f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0024: nop + .line 11,11 : 15,30 '' + IL_0025: ldloc.1 + IL_0026: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_002b: ldloc.3 + IL_002c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0031: add + IL_0032: stloc.s z + .line 12,12 : 15,22 '' + IL_0034: ldloca.s V_0 + IL_0036: ldloc.s z + IL_0038: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003d: nop + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_005b + + .line 13,13 : 11,18 '' + } // end .try + finally + { + IL_0042: nop + .line 14,14 : 14,20 '' + IL_0043: ldloc.1 + IL_0044: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0049: nop + .line 15,15 : 14,28 '' + IL_004a: ldstr "done" + IL_004f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0054: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0059: pop + IL_005a: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_005b: ldloc.2 + IL_005c: pop + IL_005d: ldloca.s V_0 + IL_005f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0064: ret + } // end of method ListExpressionSteppingTest5::f4 + + } // end of class ListExpressionSteppingTest5 + +} // end of class ListExpressionSteppingTest5 + +.class private abstract auto ansi sealed ''.$ListExpressionSteppingTest5 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + } // end of method $ListExpressionSteppingTest5::main@ + +} // end of class ''.$ListExpressionSteppingTest5 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.fs new file mode 100644 index 00000000000..ee50e966869 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.fs @@ -0,0 +1,14 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL #Lists +// Regression test for FSHARP1.0:4058 +module ListExpressionSteppingTest6 +module ListExpressionSteppingTest6 = + let es = [1;2;3] + let f7 () = + [ for x in es do + printfn "hello" + yield x + for x in es do + printfn "goodbye" + yield x ] + + let _ = f7() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl new file mode 100644 index 00000000000..4ac00d88e64 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl @@ -0,0 +1,247 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ListExpressionSteppingTest6 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ListExpressionSteppingTest6 +{ + // Offset: 0x00000000 Length: 0x00000291 +} +.mresource public FSharpOptimizationData.ListExpressionSteppingTest6 +{ + // Offset: 0x00000298 Length: 0x000000BC +} +.module ListExpressionSteppingTest6.exe +// MVID: {61FD4A6D-98A2-AB14-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06960000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ListExpressionSteppingTest6 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public ListExpressionSteppingTest6 + extends [mscorlib]System.Object + { + .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 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 ''.$ListExpressionSteppingTest6::es@5 + IL_0005: ret + } // end of method ListExpressionSteppingTest6::get_es + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f7() cil managed + { + // 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, + [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_2, + [3] int32 x, + [4] class [mscorlib]System.IDisposable V_4, + [5] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_5, + [6] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_6, + [7] int32 V_7, + [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: 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_000d: ldloc.1 + IL_000e: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0013: brfalse.s IL_0038 + + 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_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 + .line 9,9 : 14,21 '' + IL_002c: ldloca.s V_0 + 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_0035: nop + IL_0036: br.s IL_000d + + IL_0038: ldnull + IL_0039: stloc.2 + IL_003a: leave.s IL_0051 + + } // end .try + finally + { + IL_003c: ldloc.1 + IL_003d: isinst [mscorlib]System.IDisposable + IL_0042: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0044: ldloc.s V_4 + IL_0046: brfalse.s IL_0050 + + .line 100001,100001 : 0,0 '' + IL_0048: ldloc.s V_4 + IL_004a: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_004f: endfinally + .line 100001,100001 : 0,0 '' + IL_0050: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + 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_0060: ldloc.s V_5 + IL_0062: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0067: brfalse.s IL_008f + + 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_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 + .line 12,12 : 14,21 '' + IL_0082: ldloca.s V_0 + 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_008c: nop + IL_008d: br.s IL_0060 + + IL_008f: ldnull + IL_0090: stloc.s V_6 + IL_0092: leave.s IL_00aa + + } // end .try + finally + { + IL_0094: ldloc.s V_5 + IL_0096: isinst [mscorlib]System.IDisposable + IL_009b: stloc.s V_8 + .line 100001,100001 : 0,0 '' + IL_009d: ldloc.s V_8 + IL_009f: brfalse.s IL_00a9 + + .line 100001,100001 : 0,0 '' + IL_00a1: ldloc.s V_8 + IL_00a3: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_00a8: endfinally + .line 100001,100001 : 0,0 '' + IL_00a9: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + 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 + es() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() + } // end of property ListExpressionSteppingTest6::es + } // end of class ListExpressionSteppingTest6 + +} // end of class ListExpressionSteppingTest6 + +.class private abstract auto ansi sealed ''.$ListExpressionSteppingTest6 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es@5 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 37 (0x25) + .maxstack 6 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es) + .line 5,5 : 5,21 '' + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: ldc.i4.3 + 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_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_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: 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 + } // end of method $ListExpressionSteppingTest6::main@ + +} // end of class ''.$ListExpressionSteppingTest6 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/env.lst new file mode 100644 index 00000000000..174ef4ae122 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/env.lst @@ -0,0 +1,6 @@ + SOURCE=ListExpressionSteppingTest1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest1.exe" # ListExpressionSteppingTest1.fs - + SOURCE=ListExpressionSteppingTest2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest2.exe" # ListExpressionSteppingTest2.fs - + SOURCE=ListExpressionSteppingTest3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest3.exe" # ListExpressionSteppingTest3.fs - + SOURCE=ListExpressionSteppingTest4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest4.exe" # ListExpressionSteppingTest4.fs - + SOURCE=ListExpressionSteppingTest5.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest5.exe" # ListExpressionSteppingTest5.fs - + SOURCE=ListExpressionSteppingTest6.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest6.exe" # ListExpressionSteppingTest6.fs - diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/keep.lst similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/keep.lst rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/ListExpressionStepping/keep.lst diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.AggressiveInlining.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.AggressiveInlining.fs new file mode 100644 index 00000000000..5fbb3463287 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.AggressiveInlining.fs @@ -0,0 +1,5 @@ +// Regression test for DevDiv:212424 +// "NoInlining attribute not emitted into IL" +module M +[] +let getUnit (f : unit -> unit) = f() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.AggressiveInlining.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.AggressiveInlining.il.bsl new file mode 100644 index 00000000000..af04f94f49e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.AggressiveInlining.il.bsl @@ -0,0 +1,77 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 4:4:1:0 +} +.assembly MethodImplAttribute.AggressiveInlining +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.MethodImplAttribute.AggressiveInlining +{ + // Offset: 0x00000000 Length: 0x0000034C +} +.mresource public FSharpOptimizationData.MethodImplAttribute.AggressiveInlining +{ + // Offset: 0x00000350 Length: 0x00000085 +} +.module MethodImplAttribute.AggressiveInlining.dll +// MVID: {59B1920C-66DC-14D3-A745-03830C92B159} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x02B20000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed M + extends [mscorlib]System.Object +{ + .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 getUnit(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed aggressiveinlining + { + // Code size 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 34,37 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\MethodImplAttribute\\MethodImplAttribute.AggressiveInlining.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: pop + IL_0008: ret + } // end of method M::getUnit + +} // end of class M + +.class private abstract auto ansi sealed ''.$M + extends [mscorlib]System.Object +{ +} // end of class ''.$M + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.ForwardRef.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.ForwardRef.fs new file mode 100644 index 00000000000..65eaf2d4c50 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.ForwardRef.fs @@ -0,0 +1,5 @@ +// Regression test for DevDiv:212424 +// "NoInlining attribute not emitted into IL" +module M +[] +let getUnit (f : unit -> unit) = f() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.ForwardRef.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.ForwardRef.il.bsl new file mode 100644 index 00000000000..b37321a6b45 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.ForwardRef.il.bsl @@ -0,0 +1,77 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 4:4:1:0 +} +.assembly MethodImplAttribute.ForwardRef +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.MethodImplAttribute.ForwardRef +{ + // Offset: 0x00000000 Length: 0x00000331 +} +.mresource public FSharpOptimizationData.MethodImplAttribute.ForwardRef +{ + // Offset: 0x00000338 Length: 0x0000007D +} +.module MethodImplAttribute.ForwardRef.dll +// MVID: {59B1920C-C517-03FF-A745-03830C92B159} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x002E0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed M + extends [mscorlib]System.Object +{ + .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 getUnit(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 34,37 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\MethodImplAttribute\\MethodImplAttribute.ForwardRef.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: pop + IL_0008: ret + } // end of method M::getUnit + +} // end of class M + +.class private abstract auto ansi sealed ''.$M + extends [mscorlib]System.Object +{ +} // end of class ''.$M + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.InternalCall.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.InternalCall.fs new file mode 100644 index 00000000000..4bcf5d89c98 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.InternalCall.fs @@ -0,0 +1,5 @@ +// Regression test for DevDiv:212424 +// "NoInlining attribute not emitted into IL" +module M +[] +let getUnit (f : unit -> unit) = f() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.InternalCall.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.InternalCall.il.bsl new file mode 100644 index 00000000000..5695375e4e0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.InternalCall.il.bsl @@ -0,0 +1,77 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 4:4:1:0 +} +.assembly MethodImplAttribute.InternalCall +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.MethodImplAttribute.InternalCall +{ + // Offset: 0x00000000 Length: 0x00000339 +} +.mresource public FSharpOptimizationData.MethodImplAttribute.InternalCall +{ + // Offset: 0x00000340 Length: 0x0000007F +} +.module MethodImplAttribute.InternalCall.dll +// MVID: {59B1920C-FBF7-6A35-A745-03830C92B159} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x015B0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed M + extends [mscorlib]System.Object +{ + .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 getUnit(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 34,37 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\MethodImplAttribute\\MethodImplAttribute.InternalCall.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: pop + IL_0008: ret + } // end of method M::getUnit + +} // end of class M + +.class private abstract auto ansi sealed ''.$M + extends [mscorlib]System.Object +{ +} // end of class ''.$M + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoInlining.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoInlining.fs new file mode 100644 index 00000000000..a40d3da16e1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoInlining.fs @@ -0,0 +1,5 @@ +// Regression test for DevDiv:212424 +// "NoInlining attribute not emitted into IL" +module M +[] +let getUnit (f : unit -> unit) = f() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoInlining.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoInlining.il.bsl new file mode 100644 index 00000000000..6801bbb4405 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoInlining.il.bsl @@ -0,0 +1,77 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 4:4:1:0 +} +.assembly MethodImplAttribute.NoInlining +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.MethodImplAttribute.NoInlining +{ + // Offset: 0x00000000 Length: 0x00000331 +} +.mresource public FSharpOptimizationData.MethodImplAttribute.NoInlining +{ + // Offset: 0x00000338 Length: 0x0000007D +} +.module MethodImplAttribute.NoInlining.dll +// MVID: {59B1920C-F47B-58B3-A745-03830C92B159} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x012B0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed M + extends [mscorlib]System.Object +{ + .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 getUnit(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed noinlining + { + // Code size 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 34,37 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\MethodImplAttribute\\MethodImplAttribute.NoInlining.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: pop + IL_0008: ret + } // end of method M::getUnit + +} // end of class M + +.class private abstract auto ansi sealed ''.$M + extends [mscorlib]System.Object +{ +} // end of class ''.$M + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoOptimization.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoOptimization.fs new file mode 100644 index 00000000000..5dab135d87c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoOptimization.fs @@ -0,0 +1,5 @@ +// Regression test for DevDiv:212424 +// "NoInlining attribute not emitted into IL" +module M +[] +let getUnit (f : unit -> unit) = f() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoOptimization.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoOptimization.il.bsl new file mode 100644 index 00000000000..37557234689 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.NoOptimization.il.bsl @@ -0,0 +1,77 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 4:4:1:0 +} +.assembly MethodImplAttribute.NoOptimization +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.MethodImplAttribute.NoOptimization +{ + // Offset: 0x00000000 Length: 0x0000033D +} +.mresource public FSharpOptimizationData.MethodImplAttribute.NoOptimization +{ + // Offset: 0x00000348 Length: 0x00000081 +} +.module MethodImplAttribute.NoOptimization.dll +// MVID: {59B1920C-D394-5177-A745-03830C92B159} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x006A0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed M + extends [mscorlib]System.Object +{ + .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 getUnit(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 34,37 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\MethodImplAttribute\\MethodImplAttribute.NoOptimization.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: pop + IL_0008: ret + } // end of method M::getUnit + +} // end of class M + +.class private abstract auto ansi sealed ''.$M + extends [mscorlib]System.Object +{ +} // end of class ''.$M + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.PreserveSig.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.PreserveSig.fs new file mode 100644 index 00000000000..9c69103b3f8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.PreserveSig.fs @@ -0,0 +1,5 @@ +// Regression test for DevDiv:212424 +// "NoInlining attribute not emitted into IL" +module M +[] +let getUnit (f : unit -> unit) = f() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.PreserveSig.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.PreserveSig.il.bsl new file mode 100644 index 00000000000..6ded00a8d83 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.PreserveSig.il.bsl @@ -0,0 +1,77 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 4:4:1:0 +} +.assembly MethodImplAttribute.PreserveSig +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.MethodImplAttribute.PreserveSig +{ + // Offset: 0x00000000 Length: 0x00000336 +} +.mresource public FSharpOptimizationData.MethodImplAttribute.PreserveSig +{ + // Offset: 0x00000340 Length: 0x0000007E +} +.module MethodImplAttribute.PreserveSig.dll +// MVID: {59B1920C-0C64-31CC-A745-03830C92B159} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00D30000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed M + extends [mscorlib]System.Object +{ + .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 getUnit(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed preservesig + { + // Code size 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 34,37 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\MethodImplAttribute\\MethodImplAttribute.PreserveSig.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: pop + IL_0008: ret + } // end of method M::getUnit + +} // end of class M + +.class private abstract auto ansi sealed ''.$M + extends [mscorlib]System.Object +{ +} // end of class ''.$M + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Synchronized.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Synchronized.fs new file mode 100644 index 00000000000..50ce1c2d0f4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Synchronized.fs @@ -0,0 +1,5 @@ +// Regression test for DevDiv:212424 +// "NoInlining attribute not emitted into IL" +module M +[] +let getUnit (f : unit -> unit) = f() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Synchronized.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Synchronized.il.bsl new file mode 100644 index 00000000000..4fbf40b8d9e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Synchronized.il.bsl @@ -0,0 +1,77 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 4:4:1:0 +} +.assembly MethodImplAttribute.Synchronized +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.MethodImplAttribute.Synchronized +{ + // Offset: 0x00000000 Length: 0x00000337 +} +.mresource public FSharpOptimizationData.MethodImplAttribute.Synchronized +{ + // Offset: 0x00000340 Length: 0x0000007F +} +.module MethodImplAttribute.Synchronized.dll +// MVID: {59B1920C-D8F1-2CC7-A745-03830C92B159} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x002E0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed M + extends [mscorlib]System.Object +{ + .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 getUnit(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed synchronized + { + // Code size 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 34,37 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\MethodImplAttribute\\MethodImplAttribute.Synchronized.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: pop + IL_0008: ret + } // end of method M::getUnit + +} // end of class M + +.class private abstract auto ansi sealed ''.$M + extends [mscorlib]System.Object +{ +} // end of class ''.$M + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Unmanaged.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Unmanaged.fs new file mode 100644 index 00000000000..0acba62efb2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Unmanaged.fs @@ -0,0 +1,5 @@ +// Regression test for DevDiv:212424 +// "NoInlining attribute not emitted into IL" +module M +[] +let getUnit (f : unit -> unit) = f() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Unmanaged.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Unmanaged.il.bsl new file mode 100644 index 00000000000..15db6ae085e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/MethodImplAttribute.Unmanaged.il.bsl @@ -0,0 +1,77 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 4:4:1:0 +} +.assembly MethodImplAttribute.Unmanaged +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.MethodImplAttribute.Unmanaged +{ + // Offset: 0x00000000 Length: 0x0000032E +} +.mresource public FSharpOptimizationData.MethodImplAttribute.Unmanaged +{ + // Offset: 0x00000338 Length: 0x0000007C +} +.module MethodImplAttribute.Unmanaged.dll +// MVID: {59B1920C-FF34-309C-A745-03830C92B159} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x013D0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed M + extends [mscorlib]System.Object +{ + .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 getUnit(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 34,37 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\MethodImplAttribute\\MethodImplAttribute.Unmanaged.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: pop + IL_0008: ret + } // end of method M::getUnit + +} // end of class M + +.class private abstract auto ansi sealed ''.$M + extends [mscorlib]System.Object +{ +} // end of class ''.$M + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/env.lst new file mode 100644 index 00000000000..b8109477852 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/env.lst @@ -0,0 +1,11 @@ +# These are 4.x baselines + SOURCE=MethodImplAttribute.ForwardRef.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.ForwardRef.dll" # MethodImplAttribute.ForwardRef.fs + SOURCE=MethodImplAttribute.InternalCall.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.InternalCall.dll" # MethodImplAttribute.InternalCall.fs + SOURCE=MethodImplAttribute.NoInlining.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.NoInlining.dll" # MethodImplAttribute.NoInlining.fs + SOURCE=MethodImplAttribute.AggressiveInlining.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.AggressiveInlining.dll" # MethodImplAttribute.AggressiveInlining.fs + SOURCE=MethodImplAttribute.NoOptimization.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.NoOptimization.dll" # MethodImplAttribute.NoOptimization.fs + SOURCE=MethodImplAttribute.PreserveSig.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.PreserveSig.dll" # MethodImplAttribute.PreserveSig.fs + SOURCE=MethodImplAttribute.Synchronized.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.Synchronized.dll" # MethodImplAttribute.Synchronized.fs + SOURCE=MethodImplAttribute.Unmanaged.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.Unmanaged.dll" # MethodImplAttribute.Unmanaged.fs + + diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/keep.lst similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/keep.lst rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/MethodImplAttribute/keep.lst diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AbstractClass.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AbstractClass.fs new file mode 100644 index 00000000000..68b0306b4c7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AbstractClass.fs @@ -0,0 +1,8 @@ +// regression test for https://github.com/Microsoft/visualfsharp/issues/420 + +[] +type X public (i : int) = + internal new() = X(1) + private new(f : float32) = X(1) + +printfn "Finished:" \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AbstractClass.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AbstractClass.il.bsl new file mode 100644 index 00000000000..53be01d947b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AbstractClass.il.bsl @@ -0,0 +1,125 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly AbstractClass +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.AbstractClass +{ + // Offset: 0x00000000 Length: 0x00000302 +} +.mresource public FSharpOptimizationData.AbstractClass +{ + // Offset: 0x00000308 Length: 0x000000B1 +} +.module AbstractClass.exe +// MVID: {61F2D6A5-333C-8BAF-A745-0383A5D6F261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07160000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed AbstractClass + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi serializable nested public X + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.AbstractClassAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor(int32 i) cil managed + { + // 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 + IL_0007: pop + IL_0008: ret + } // end of method X::.ctor + + .method assembly specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 5,5 : 22,26 '' + IL_0000: ldarg.0 + IL_0001: ldc.i4.1 + IL_0002: callvirt instance void AbstractClass/X::.ctor(int32) + IL_0007: ret + } // end of method X::.ctor + + .method assembly specialname rtspecialname + instance void .ctor(float32 f) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 6,6 : 32,36 '' + IL_0000: ldarg.0 + IL_0001: ldc.i4.1 + IL_0002: callvirt instance void AbstractClass/X::.ctor(int32) + IL_0007: ret + } // end of method X::.ctor + + } // end of class X + +} // end of class AbstractClass + +.class private abstract auto ansi sealed ''.$AbstractClass + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 8 (0x8) + .maxstack 8 + .line 8,8 : 1,7 '' + IL_0000: ldc.i4.0 + IL_0001: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0006: pop + IL_0007: ret + } // end of method $AbstractClass::main@ + +} // end of class ''.$AbstractClass + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AnonRecd.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AnonRecd.fs new file mode 100644 index 00000000000..74ad9e7c857 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AnonRecd.fs @@ -0,0 +1,10 @@ + + +let main argv = + let mutable x = 1 + + let a = {| A = 1; B = 1 |} + + x <- x + 1 + + 0 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AnonRecd.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AnonRecd.il.bsl new file mode 100644 index 00000000000..a752dfe4d88 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/AnonRecd.il.bsl @@ -0,0 +1,574 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly AnonRecd +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.AnonRecd +{ + // Offset: 0x00000000 Length: 0x000001C2 +} +.mresource public FSharpOptimizationData.AnonRecd +{ + // Offset: 0x000001C8 Length: 0x0000006B +} +.module AnonRecd.exe +// MVID: {61E07031-C42F-5208-A745-03833170E061} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07100000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed AnonRecd + extends [mscorlib]System.Object +{ + .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 main(!!a argv) cil managed + { + // Code size 16 (0x10) + .maxstack 4 + .locals init ([0] int32 x, + [1] class '<>f__AnonymousType1912756633`2' a) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 4,4 : 5,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\AnonRecd.fs' + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + .line 6,6 : 5,31 '' + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.1 + IL_0004: newobj instance void class '<>f__AnonymousType1912756633`2'::.ctor(!0, + !1) + IL_0009: stloc.1 + .line 8,8 : 5,15 '' + IL_000a: ldloc.0 + IL_000b: ldc.i4.1 + IL_000c: add + IL_000d: stloc.0 + .line 10,10 : 5,6 '' + IL_000e: ldc.i4.0 + IL_000f: ret + } // end of method AnonRecd::main + +} // end of class AnonRecd + +.class private abstract auto ansi sealed ''.$AnonRecd + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $AnonRecd::main@ + +} // end of class ''.$AnonRecd + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1912756633`2'<'j__TPar','j__TPar'> + extends [mscorlib]System.Object + implements [mscorlib]System.Collections.IStructuralComparable, + [mscorlib]System.IComparable, + class [mscorlib]System.IComparable`1f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>>, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IEquatable`1f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor(!'j__TPar' A, + !'j__TPar' B) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0014: ret + } // end of method '<>f__AnonymousType1912756633`2'::.ctor + + .method public hidebysig specialname instance !'j__TPar' + get_A() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } // end of method '<>f__AnonymousType1912756633`2'::get_A + + .method public hidebysig specialname instance !'j__TPar' + get_B() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } // end of method '<>f__AnonymousType1912756633`2'::get_B + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } // end of method '<>f__AnonymousType1912756633`2'::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 84 (0x54) + .maxstack 5 + .locals init ([0] int32 V_0) + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\unknown' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_004a + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0048 + + .line 100001,100001 : 0,0 '' + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: ldarg.0 + IL_0012: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0017: ldarg.1 + IL_0018: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_001d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + !!0, + !!0) + IL_0022: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: bge.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_0027: ldloc.0 + IL_0028: ret + + .line 100001,100001 : 0,0 '' + IL_0029: ldloc.0 + IL_002a: ldc.i4.0 + IL_002b: ble.s IL_002f + + .line 100001,100001 : 0,0 '' + IL_002d: ldloc.0 + IL_002e: ret + + .line 100001,100001 : 0,0 '' + IL_002f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldarg.1 + IL_003b: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + .line 100001,100001 : 0,0 '' + IL_0048: ldc.i4.1 + IL_0049: ret + + .line 100001,100001 : 0,0 '' + IL_004a: ldarg.1 + IL_004b: ldnull + IL_004c: cgt.un + IL_004e: brfalse.s IL_0052 + + .line 100001,100001 : 0,0 '' + IL_0050: ldc.i4.m1 + IL_0051: ret + + .line 100001,100001 : 0,0 '' + IL_0052: ldc.i4.0 + IL_0053: ret + } // end of method '<>f__AnonymousType1912756633`2'::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType1912756633`2') + IL_000e: ret + } // end of method '<>f__AnonymousType1912756633`2'::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 95 (0x5f) + .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, + [2] int32 V_2) + .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 + IL_0007: ldloc.0 + IL_0008: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: ldnull + IL_000b: cgt.un + IL_000d: brfalse.s IL_0050 + + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.1 + IL_0010: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_0015: ldnull + IL_0016: cgt.un + IL_0018: brfalse.s IL_004e + + .line 100001,100001 : 0,0 '' + IL_001a: ldarg.2 + IL_001b: ldarg.0 + IL_001c: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0021: ldloc.1 + IL_0022: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0027: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + !!0, + !!0) + IL_002c: stloc.2 + .line 100001,100001 : 0,0 '' + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: bge.s IL_0033 + + .line 100001,100001 : 0,0 '' + IL_0031: ldloc.2 + IL_0032: ret + + .line 100001,100001 : 0,0 '' + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: ble.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0037: ldloc.2 + IL_0038: ret + + .line 100001,100001 : 0,0 '' + IL_0039: ldarg.2 + IL_003a: ldarg.0 + IL_003b: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0040: ldloc.1 + IL_0041: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0046: tail. + IL_0048: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + !!0, + !!0) + IL_004d: ret + + .line 100001,100001 : 0,0 '' + IL_004e: ldc.i4.1 + IL_004f: ret + + .line 100001,100001 : 0,0 '' + IL_0050: ldarg.1 + IL_0051: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_0056: ldnull + IL_0057: cgt.un + IL_0059: brfalse.s IL_005d + + .line 100001,100001 : 0,0 '' + IL_005b: ldc.i4.m1 + IL_005c: ret + + .line 100001,100001 : 0,0 '' + IL_005d: ldc.i4.0 + IL_005e: ret + } // end of method '<>f__AnonymousType1912756633`2'::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 66 (0x42) + .maxstack 7 + .locals init ([0] int32 V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldc.i4 0x9e3779b9 + IL_000d: ldarg.1 + IL_000e: ldarg.0 + IL_000f: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0014: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + !!0) + IL_0019: ldloc.0 + IL_001a: ldc.i4.6 + IL_001b: shl + IL_001c: ldloc.0 + IL_001d: ldc.i4.2 + IL_001e: shr + IL_001f: add + IL_0020: add + IL_0021: add + IL_0022: stloc.0 + IL_0023: ldc.i4 0x9e3779b9 + IL_0028: ldarg.1 + IL_0029: ldarg.0 + IL_002a: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_002f: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + !!0) + IL_0034: ldloc.0 + IL_0035: ldc.i4.6 + IL_0036: shl + IL_0037: ldloc.0 + IL_0038: ldc.i4.2 + IL_0039: shr + IL_003a: add + IL_003b: add + IL_003c: add + IL_003d: stloc.0 + IL_003e: ldloc.0 + IL_003f: ret + + .line 100001,100001 : 0,0 '' + IL_0040: ldc.i4.0 + IL_0041: ret + } // end of method '<>f__AnonymousType1912756633`2'::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_000d: ret + } // end of method '<>f__AnonymousType1912756633`2'::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 71 (0x47) + .maxstack 5 + .locals init ([0] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_0, + [1] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003f + + .line 100001,100001 : 0,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_000d: ldloc.0 + IL_000e: brfalse.s IL_003d + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldarg.2 + IL_0013: ldarg.0 + IL_0014: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0019: ldloc.1 + IL_001a: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_001f: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0024: brfalse.s IL_003b + + .line 100001,100001 : 0,0 '' + IL_0026: ldarg.2 + IL_0027: ldarg.0 + IL_0028: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_002d: ldloc.1 + IL_002e: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0033: tail. + IL_0035: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_003a: ret + + .line 100001,100001 : 0,0 '' + IL_003b: ldc.i4.0 + IL_003c: ret + + .line 100001,100001 : 0,0 '' + IL_003d: ldc.i4.0 + IL_003e: ret + + .line 100001,100001 : 0,0 '' + IL_003f: ldarg.1 + IL_0040: ldnull + IL_0041: cgt.un + IL_0043: ldc.i4.0 + IL_0044: ceq + IL_0046: ret + } // end of method '<>f__AnonymousType1912756633`2'::Equals + + .method public hidebysig virtual final + instance bool Equals(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 63 (0x3f) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0037 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0035 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0012: ldarg.1 + IL_0013: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0018: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_001d: brfalse.s IL_0033 + + .line 100001,100001 : 0,0 '' + IL_001f: ldarg.0 + IL_0020: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0025: ldarg.1 + IL_0026: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_002b: tail. + IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0032: ret + + .line 100001,100001 : 0,0 '' + IL_0033: ldc.i4.0 + IL_0034: ret + + .line 100001,100001 : 0,0 '' + IL_0035: ldc.i4.0 + IL_0036: ret + + .line 100001,100001 : 0,0 '' + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: ldc.i4.0 + IL_003c: ceq + IL_003e: ret + } // end of method '<>f__AnonymousType1912756633`2'::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 4 + .locals init ([0] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1912756633`2') + IL_0013: ret + + .line 100001,100001 : 0,0 '' + IL_0014: ldc.i4.0 + IL_0015: ret + } // end of method '<>f__AnonymousType1912756633`2'::Equals + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1912756633`2'::get_A() + } // end of property '<>f__AnonymousType1912756633`2'::A + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1912756633`2'::get_B() + } // end of property '<>f__AnonymousType1912756633`2'::B +} // end of class '<>f__AnonymousType1912756633`2' + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ArgumentNamesInClosures01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ArgumentNamesInClosures01.fs new file mode 100644 index 00000000000..b6b5621372f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ArgumentNamesInClosures01.fs @@ -0,0 +1,43 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:3309 +// +// Make sure that argument names are preserved in some/all compiler closures +// +// Correct IL: +// .method public strict virtual instance int32 +// Invoke(class M/C i_want_to_see_this_identifier@7) cil managed <=== correct! +// { +// // Code size 9 (0x9) +// .maxstack 5 +// IL_0000: ldarg.1 +// IL_0001: tail. +// [...] +// } // end of method clo@10::Invoke +// +// +// Incorrect IL: +// .method public strict virtual instance int32 +// Invoke(class M/C arg0) cil managed <=== incorrect "arg0" is not what we want +// { +// // Code size 9 (0x9) +// .maxstack 5 +// IL_0000: ldarg.1 +// IL_0001: tail. +// [...] +// } // end of method clo@10::Invoke +// + + + +#light + +module M + type C = + member x.F(o:obj) = x.GetHashCode() + + let I (i_want_to_see_this_identifier:C) = i_want_to_see_this_identifier.F() + + type T() = + member x.F = I + + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl new file mode 100644 index 00000000000..5fd72c0d5c9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl @@ -0,0 +1,177 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ArgumentNamesInClosures01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ArgumentNamesInClosures01 +{ + // Offset: 0x00000000 Length: 0x0000039B +} +.mresource public FSharpOptimizationData.ArgumentNamesInClosures01 +{ + // Offset: 0x000003A0 Length: 0x0000010D +} +.module ArgumentNamesInClosures01.dll +// MVID: {61F2D6A5-39CA-41B5-A745-0383A5D6F261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07320000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed M + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable nested public C + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig instance int32 + F(object o) cil managed + { + // Code size 11 (0xb) + .maxstack 3 + .locals init ([0] class M/C 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\\ArgumentNamesInClosures01.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 36,36 : 29,44 '' + IL_0002: ldarg.0 + IL_0003: tail. + IL_0005: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_000a: ret + } // end of method C::F + + } // end of class C + + .class auto ansi serializable nested public T + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // 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 + IL_0007: pop + IL_0008: ret + } // end of method T::.ctor + + .method public hidebysig specialname + instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + get_F() cil managed + { + // Code size 8 (0x8) + .maxstack 3 + .locals init ([0] class M/T x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 41,41 : 22,23 '' + IL_0002: ldsfld class M/get_F@41 M/get_F@41::@_instance + IL_0007: ret + } // end of method T::get_F + + .property instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + F() + { + .get instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 M/T::get_F() + } // end of property T::F + } // end of class T + + .class auto ansi serializable sealed nested assembly beforefieldinit get_F@41 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class M/get_F@41 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method get_F@41::.ctor + + .method public strict virtual instance int32 + Invoke(class M/C i_want_to_see_this_identifier) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: call int32 M::I(class M/C) + IL_0008: ret + } // end of method get_F@41::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void M/get_F@41::.ctor() + IL_0005: stsfld class M/get_F@41 M/get_F@41::@_instance + IL_000a: ret + } // end of method get_F@41::.cctor + + } // end of class get_F@41 + + .method public static int32 I(class M/C i_want_to_see_this_identifier) cil managed + { + // Code size 10 (0xa) + .maxstack 8 + .line 38,38 : 47,80 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: tail. + IL_0004: callvirt instance int32 M/C::F(object) + IL_0009: ret + } // end of method M::I + +} // end of class M + +.class private abstract auto ansi sealed ''.$M + extends [mscorlib]System.Object +{ +} // end of class ''.$M + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CodeGenRenamings01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CodeGenRenamings01.fs new file mode 100644 index 00000000000..21d38f3bb8d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CodeGenRenamings01.fs @@ -0,0 +1,39 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSharp1.0:5645 +// Title: Action proposed changes from review of compiled names + +let alist = [ 1 .. 10 ] +let array = [| 1; 2; 3 |] +let aseq = seq { 1 .. 10 } +let list1 = [ 1, 1; 2, 2 ] +let seq1 = seq { yield (1, 1); yield (2, 2) } +let array1 = [| (1, 1); (2, 2) |] +let a3 = Array2D.create 2 2 0 +let array3D = Array3D.create 3 3 3 0 +let array4D = Array4D.create 4 4 4 4 0 + +// List Renamings +let _ = List.ofArray array +let _ = List.ofSeq aseq + +// Map Renamings +let _ = Map.ofArray array1 +let _ = Map.ofList list1 +let _ = Map.ofSeq seq1 + +// Array Renamings +let a1 = Array.ofList alist +let a2 = Array.ofSeq aseq +Array.get a1 0 |> Array.set a2 0 + +// Array2D Renamings +(Array2D.length1 a3, Array2D.length2 a3, Array2D.base1 a3, Array2D.base2 a3) |> ignore +Array2D.get a3 0 0 |> Array2D.set a3 0 0 + +// Array3D Renamings +(Array3D.length1 array3D, Array3D.length2 array3D, Array3D.length3 array3D) |> ignore +Array3D.get array3D 0 0 0 |> Array3D.set array3D 0 0 0 + +// Array4D Renamings +(Array4D.length1 array4D, Array4D.length2 array4D, Array4D.length3 array4D, Array4D.length4 array4D) |> ignore +Array4D.get array4D 0 0 0 0 |> Array4D.set array4D 0 0 0 0 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CodeGenRenamings01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CodeGenRenamings01.il.bsl new file mode 100644 index 00000000000..4f1575c3c40 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CodeGenRenamings01.il.bsl @@ -0,0 +1,738 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly CodeGenRenamings01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.CodeGenRenamings01 +{ + // Offset: 0x00000000 Length: 0x000003C8 +} +.mresource public FSharpOptimizationData.CodeGenRenamings01 +{ + // Offset: 0x000003D0 Length: 0x0000011B +} +.module CodeGenRenamings01.exe +// MVID: {61FD4A6C-8173-986B-A745-03836C4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07220000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed CodeGenRenamings01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname seq1@9 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1> + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public int32 pc + .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.Tuple`2 current + .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 public specialname rtspecialname + instance void .ctor(int32 pc, + class [mscorlib]System.Tuple`2 current) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 CodeGenRenamings01/seq1@9::pc + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [mscorlib]System.Tuple`2 CodeGenRenamings01/seq1@9::current + IL_000e: ldarg.0 + IL_000f: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() + IL_0014: ret + } // end of method seq1@9::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1>& next) cil managed + { + // Code size 97 (0x61) + .maxstack 7 + .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\\CodeGenRenamings01.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 CodeGenRenamings01/seq1@9::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_003b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0051 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_0058 + + .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 + IL_002d: ldc.i4.1 + IL_002e: ldc.i4.1 + IL_002f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0034: stfld class [mscorlib]System.Tuple`2 CodeGenRenamings01/seq1@9::current + 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 + IL_0043: ldc.i4.2 + IL_0044: ldc.i4.2 + IL_0045: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_004a: stfld class [mscorlib]System.Tuple`2 CodeGenRenamings01/seq1@9::current + IL_004f: ldc.i4.1 + IL_0050: ret + + IL_0051: ldarg.0 + IL_0052: ldc.i4.3 + IL_0053: stfld int32 CodeGenRenamings01/seq1@9::pc + IL_0058: ldarg.0 + IL_0059: ldnull + IL_005a: stfld class [mscorlib]System.Tuple`2 CodeGenRenamings01/seq1@9::current + IL_005f: ldc.i4.0 + IL_0060: ret + } // end of method seq1@9::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 CodeGenRenamings01/seq1@9::pc + IL_0007: ret + } // end of method seq1@9::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 CodeGenRenamings01/seq1@9::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method seq1@9::get_CheckClose + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [mscorlib]System.Tuple`2 CodeGenRenamings01/seq1@9::current + IL_0006: ret + } // end of method seq1@9::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1> + GetFreshEnumerator() 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 8 (0x8) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ldnull + IL_0002: newobj instance void CodeGenRenamings01/seq1@9::.ctor(int32, + class [mscorlib]System.Tuple`2) + IL_0007: ret + } // end of method seq1@9::GetFreshEnumerator + + } // end of class seq1@9 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_alist() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$CodeGenRenamings01::alist@5 + IL_0005: ret + } // end of method CodeGenRenamings01::get_alist + + .method public specialname static int32[] + get_array() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32[] ''.$CodeGenRenamings01::array@6 + IL_0005: ret + } // end of method CodeGenRenamings01::get_array + + .method public specialname static class [mscorlib]System.Collections.Generic.IEnumerable`1 + get_aseq() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$CodeGenRenamings01::aseq@7 + IL_0005: ret + } // end of method CodeGenRenamings01::get_aseq + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + get_list1() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$CodeGenRenamings01::list1@8 + IL_0005: ret + } // end of method CodeGenRenamings01::get_list1 + + .method public specialname static class [mscorlib]System.Collections.Generic.IEnumerable`1> + get_seq1() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$CodeGenRenamings01::seq1@9 + IL_0005: ret + } // end of method CodeGenRenamings01::get_seq1 + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_array1() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$CodeGenRenamings01::array1@10 + IL_0005: ret + } // end of method CodeGenRenamings01::get_array1 + + .method public specialname static int32[0...,0...] + get_a3() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32[0...,0...] ''.$CodeGenRenamings01::a3@11 + IL_0005: ret + } // end of method CodeGenRenamings01::get_a3 + + .method public specialname static int32[0...,0...,0...] + get_array3D() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32[0...,0...,0...] ''.$CodeGenRenamings01::array3D@12 + IL_0005: ret + } // end of method CodeGenRenamings01::get_array3D + + .method public specialname static int32[0...,0...,0...,0...] + get_array4D() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32[0...,0...,0...,0...] ''.$CodeGenRenamings01::array4D@13 + IL_0005: ret + } // end of method CodeGenRenamings01::get_array4D + + .method public specialname static int32[] + get_a1() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32[] ''.$CodeGenRenamings01::a1@25 + IL_0005: ret + } // end of method CodeGenRenamings01::get_a1 + + .method public specialname static int32[] + get_a2() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32[] ''.$CodeGenRenamings01::a2@26 + IL_0005: ret + } // end of method CodeGenRenamings01::get_a2 + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + alist() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 CodeGenRenamings01::get_alist() + } // end of property CodeGenRenamings01::alist + .property int32[] 'array'() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] CodeGenRenamings01::get_array() + } // end of property CodeGenRenamings01::'array' + .property class [mscorlib]System.Collections.Generic.IEnumerable`1 + aseq() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.IEnumerable`1 CodeGenRenamings01::get_aseq() + } // end of property CodeGenRenamings01::aseq + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + list1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> CodeGenRenamings01::get_list1() + } // end of property CodeGenRenamings01::list1 + .property class [mscorlib]System.Collections.Generic.IEnumerable`1> + seq1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.IEnumerable`1> CodeGenRenamings01::get_seq1() + } // end of property CodeGenRenamings01::seq1 + .property class [mscorlib]System.Tuple`2[] + array1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] CodeGenRenamings01::get_array1() + } // end of property CodeGenRenamings01::array1 + .property int32[0...,0...] a3() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[0...,0...] CodeGenRenamings01::get_a3() + } // end of property CodeGenRenamings01::a3 + .property int32[0...,0...,0...] array3D() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[0...,0...,0...] CodeGenRenamings01::get_array3D() + } // end of property CodeGenRenamings01::array3D + .property int32[0...,0...,0...,0...] array4D() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[0...,0...,0...,0...] CodeGenRenamings01::get_array4D() + } // end of property CodeGenRenamings01::array4D + .property int32[] a1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] CodeGenRenamings01::get_a1() + } // end of property CodeGenRenamings01::a1 + .property int32[] a2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] CodeGenRenamings01::get_a2() + } // end of property CodeGenRenamings01::a2 +} // end of class CodeGenRenamings01 + +.class private abstract auto ansi sealed ''.$CodeGenRenamings01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 alist@5 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32[] array@6 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 aseq@7 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> list1@8 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1> seq1@9 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] array1@10 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32[0...,0...] a3@11 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32[0...,0...,0...] array3D@12 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32[0...,0...,0...,0...] array4D@13 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32[] a1@25 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32[] a2@26 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 583 (0x247) + .maxstack 8 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 alist, + [1] int32[] 'array', + [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 aseq, + [3] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> list1, + [4] class [mscorlib]System.Collections.Generic.IEnumerable`1> seq1, + [5] class [mscorlib]System.Tuple`2[] array1, + [6] int32[0...,0...] a3, + [7] int32[0...,0...,0...] array3D, + [8] int32[0...,0...,0...,0...] array4D, + [9] int32[] a1, + [10] int32[] a2, + [11] int32 'Pipe #1 input at line 27', + [12] class [mscorlib]System.Tuple`4 'Pipe #2 input at line 30', + [13] class [mscorlib]System.Tuple`4 V_13, + [14] int32 'Pipe #3 input at line 31', + [15] class [mscorlib]System.Tuple`3 'Pipe #4 input at line 34', + [16] class [mscorlib]System.Tuple`3 V_16, + [17] int32 'Pipe #5 input at line 35', + [18] class [mscorlib]System.Tuple`4 'Pipe #6 input at line 38', + [19] class [mscorlib]System.Tuple`4 V_19, + [20] int32 'Pipe #7 input at line 39') + .line 5,5 : 1,24 '' + IL_0000: ldc.i4.1 + 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, + 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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0013: dup + IL_0014: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$CodeGenRenamings01::alist@5 + IL_0019: stloc.0 + .line 6,6 : 1,26 '' + IL_001a: ldc.i4.3 + IL_001b: newarr [mscorlib]System.Int32 + IL_0020: dup + IL_0021: ldc.i4.0 + IL_0022: ldc.i4.1 + IL_0023: stelem [mscorlib]System.Int32 + IL_0028: dup + IL_0029: ldc.i4.1 + IL_002a: ldc.i4.2 + IL_002b: stelem [mscorlib]System.Int32 + IL_0030: dup + IL_0031: ldc.i4.2 + IL_0032: ldc.i4.3 + IL_0033: stelem [mscorlib]System.Int32 + 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 + IL_0043: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0048: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_004d: dup + IL_004e: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$CodeGenRenamings01::aseq@7 + IL_0053: stloc.2 + .line 8,8 : 1,27 '' + IL_0054: ldc.i4.1 + IL_0055: ldc.i4.1 + IL_0056: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_005b: ldc.i4.2 + IL_005c: ldc.i4.2 + IL_005d: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0062: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::get_Empty() + IL_0067: 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_006c: 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_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, + class [mscorlib]System.Tuple`2) + IL_007f: dup + IL_0080: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$CodeGenRenamings01::seq1@9 + IL_0085: stloc.s seq1 + .line 10,10 : 1,34 '' + IL_0087: ldc.i4.2 + IL_0088: newarr class [mscorlib]System.Tuple`2 + IL_008d: dup + IL_008e: ldc.i4.0 + IL_008f: ldc.i4.1 + IL_0090: ldc.i4.1 + IL_0091: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0096: stelem class [mscorlib]System.Tuple`2 + IL_009b: dup + IL_009c: ldc.i4.1 + IL_009d: ldc.i4.2 + IL_009e: ldc.i4.2 + IL_009f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_00a4: stelem class [mscorlib]System.Tuple`2 + IL_00a9: dup + IL_00aa: stsfld class [mscorlib]System.Tuple`2[] ''.$CodeGenRenamings01::array1@10 + IL_00af: stloc.s array1 + .line 11,11 : 1,30 '' + IL_00b1: ldc.i4.2 + IL_00b2: ldc.i4.2 + IL_00b3: ldc.i4.0 + IL_00b4: call !!0[0...,0...] [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Create(int32, + int32, + !!0) + IL_00b9: dup + IL_00ba: stsfld int32[0...,0...] ''.$CodeGenRenamings01::a3@11 + IL_00bf: stloc.s a3 + .line 12,12 : 1,37 '' + IL_00c1: ldc.i4.3 + IL_00c2: ldc.i4.3 + IL_00c3: ldc.i4.3 + IL_00c4: ldc.i4.0 + IL_00c5: call !!0[0...,0...,0...] [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Create(int32, + int32, + int32, + !!0) + IL_00ca: dup + IL_00cb: stsfld int32[0...,0...,0...] ''.$CodeGenRenamings01::array3D@12 + IL_00d0: stloc.s array3D + .line 13,13 : 1,39 '' + IL_00d2: ldc.i4.4 + IL_00d3: ldc.i4.4 + IL_00d4: ldc.i4.4 + IL_00d5: ldc.i4.4 + IL_00d6: ldc.i4.0 + IL_00d7: call !!0[0...,0...,0...,0...] [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Create(int32, + int32, + int32, + int32, + !!0) + 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 + .line 25,25 : 1,28 '' + IL_011b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 CodeGenRenamings01::get_alist() + IL_0120: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::OfList(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0125: dup + IL_0126: stsfld int32[] ''.$CodeGenRenamings01::a1@25 + IL_012b: stloc.s a1 + .line 26,26 : 1,27 '' + IL_012d: call class [mscorlib]System.Collections.Generic.IEnumerable`1 CodeGenRenamings01::get_aseq() + IL_0132: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::OfSeq(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0137: dup + IL_0138: stsfld int32[] ''.$CodeGenRenamings01::a2@26 + IL_013d: stloc.s a2 + .line 27,27 : 1,15 '' + IL_013f: call int32[] CodeGenRenamings01::get_a1() + IL_0144: ldc.i4.0 + IL_0145: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Get(!!0[], + int32) + IL_014a: stloc.s 'Pipe #1 input at line 27' + .line 27,27 : 19,33 '' + IL_014c: call int32[] CodeGenRenamings01::get_a2() + IL_0151: ldc.i4.0 + IL_0152: ldloc.s 'Pipe #1 input at line 27' + IL_0154: call void [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Set(!!0[], + int32, + !!0) + IL_0159: nop + .line 30,30 : 2,76 '' + IL_015a: call int32[0...,0...] CodeGenRenamings01::get_a3() + IL_015f: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Length1(!!0[0...,0...]) + IL_0164: call int32[0...,0...] CodeGenRenamings01::get_a3() + IL_0169: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Length2(!!0[0...,0...]) + IL_016e: call int32[0...,0...] CodeGenRenamings01::get_a3() + IL_0173: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Base1(!!0[0...,0...]) + IL_0178: call int32[0...,0...] CodeGenRenamings01::get_a3() + IL_017d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Base2(!!0[0...,0...]) + IL_0182: newobj instance void class [mscorlib]System.Tuple`4::.ctor(!0, + !1, + !2, + !3) + IL_0187: stloc.s 'Pipe #2 input at line 30' + .line 30,30 : 81,87 '' + IL_0189: ldloc.s 'Pipe #2 input at line 30' + IL_018b: stloc.s V_13 + .line 31,31 : 1,19 '' + IL_018d: call int32[0...,0...] CodeGenRenamings01::get_a3() + IL_0192: ldc.i4.0 + IL_0193: ldc.i4.0 + IL_0194: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Get(!!0[0...,0...], + int32, + int32) + IL_0199: stloc.s 'Pipe #3 input at line 31' + .line 31,31 : 23,41 '' + IL_019b: call int32[0...,0...] CodeGenRenamings01::get_a3() + IL_01a0: ldc.i4.0 + IL_01a1: ldc.i4.0 + IL_01a2: ldloc.s 'Pipe #3 input at line 31' + IL_01a4: call void [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Set(!!0[0...,0...], + int32, + int32, + !!0) + IL_01a9: nop + .line 34,34 : 2,75 '' + IL_01aa: call int32[0...,0...,0...] CodeGenRenamings01::get_array3D() + IL_01af: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Length1(!!0[0...,0...,0...]) + IL_01b4: call int32[0...,0...,0...] CodeGenRenamings01::get_array3D() + IL_01b9: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Length2(!!0[0...,0...,0...]) + IL_01be: call int32[0...,0...,0...] CodeGenRenamings01::get_array3D() + IL_01c3: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Length3(!!0[0...,0...,0...]) + IL_01c8: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_01cd: stloc.s 'Pipe #4 input at line 34' + .line 34,34 : 80,86 '' + IL_01cf: ldloc.s 'Pipe #4 input at line 34' + IL_01d1: stloc.s V_16 + .line 35,35 : 1,26 '' + IL_01d3: call int32[0...,0...,0...] CodeGenRenamings01::get_array3D() + IL_01d8: ldc.i4.0 + IL_01d9: ldc.i4.0 + IL_01da: ldc.i4.0 + IL_01db: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Get(!!0[0...,0...,0...], + int32, + int32, + int32) + IL_01e0: stloc.s 'Pipe #5 input at line 35' + .line 35,35 : 30,55 '' + IL_01e2: call int32[0...,0...,0...] CodeGenRenamings01::get_array3D() + IL_01e7: ldc.i4.0 + IL_01e8: ldc.i4.0 + IL_01e9: ldc.i4.0 + IL_01ea: ldloc.s 'Pipe #5 input at line 35' + IL_01ec: call void [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Set(!!0[0...,0...,0...], + int32, + int32, + int32, + !!0) + IL_01f1: nop + .line 38,38 : 2,100 '' + IL_01f2: call int32[0...,0...,0...,0...] CodeGenRenamings01::get_array4D() + IL_01f7: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length1(!!0[0...,0...,0...,0...]) + IL_01fc: call int32[0...,0...,0...,0...] CodeGenRenamings01::get_array4D() + IL_0201: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length2(!!0[0...,0...,0...,0...]) + IL_0206: call int32[0...,0...,0...,0...] CodeGenRenamings01::get_array4D() + IL_020b: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length3(!!0[0...,0...,0...,0...]) + IL_0210: call int32[0...,0...,0...,0...] CodeGenRenamings01::get_array4D() + IL_0215: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length4(!!0[0...,0...,0...,0...]) + IL_021a: newobj instance void class [mscorlib]System.Tuple`4::.ctor(!0, + !1, + !2, + !3) + IL_021f: stloc.s 'Pipe #6 input at line 38' + .line 38,38 : 105,111 '' + IL_0221: ldloc.s 'Pipe #6 input at line 38' + IL_0223: stloc.s V_19 + .line 39,39 : 1,28 '' + IL_0225: call int32[0...,0...,0...,0...] CodeGenRenamings01::get_array4D() + IL_022a: ldc.i4.0 + IL_022b: ldc.i4.0 + IL_022c: ldc.i4.0 + IL_022d: ldc.i4.0 + IL_022e: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Get(!!0[0...,0...,0...,0...], + int32, + int32, + int32, + int32) + IL_0233: stloc.s 'Pipe #7 input at line 39' + .line 39,39 : 32,59 '' + IL_0235: call int32[0...,0...,0...,0...] CodeGenRenamings01::get_array4D() + IL_023a: ldc.i4.0 + IL_023b: ldc.i4.0 + IL_023c: ldc.i4.0 + IL_023d: ldc.i4.0 + IL_023e: ldloc.s 'Pipe #7 input at line 39' + IL_0240: call void [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Set(!!0[0...,0...,0...,0...], + int32, + int32, + int32, + int32, + !!0) + IL_0245: nop + IL_0246: ret + } // end of method $CodeGenRenamings01::main@ + +} // end of class ''.$CodeGenRenamings01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CustomAttributeGenericParameter01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CustomAttributeGenericParameter01.fs new file mode 100644 index 00000000000..0c967a1be9f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CustomAttributeGenericParameter01.fs @@ -0,0 +1,6 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module M + +let f<[]'T>(x:'T) = x + +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CustomAttributeGenericParameter01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CustomAttributeGenericParameter01.il.bsl new file mode 100644 index 00000000000..f3c32848290 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/CustomAttributeGenericParameter01.il.bsl @@ -0,0 +1,92 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly CustomAttributeGenericParameter01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.CustomAttributeGenericParameter01 +{ + // Offset: 0x00000000 Length: 0x000002BE +} +.mresource public FSharpOptimizationData.CustomAttributeGenericParameter01 +{ + // Offset: 0x000002C8 Length: 0x0000007A +} +.module CustomAttributeGenericParameter01.exe +// MVID: {60B68B7F-F08A-F524-A745-03837F8BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05340000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed M + extends [mscorlib]System.Object +{ + .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 !!T f(!!T x) cil managed + { + .param type T + .custom instance void [mscorlib]System.CLSCompliantAttribute::.ctor(bool) = ( 01 00 01 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 4,4 : 48,49 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\CustomAttributeGenericParameter01.fs' + IL_0000: ldarg.0 + IL_0001: ret + } // end of method M::f + +} // end of class M + +.class private abstract auto ansi sealed ''.$M + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 8 (0x8) + .maxstack 8 + .line 6,6 : 1,7 '' + IL_0000: ldc.i4.0 + IL_0001: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0006: pop + IL_0007: ret + } // end of method $M::main@ + +} // end of class ''.$M + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Decimal01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Decimal01.fs new file mode 100644 index 00000000000..1620ecef597 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Decimal01.fs @@ -0,0 +1,6 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:3083 +// Implementation of decimal constants +#light + +let _ = 1.2M diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Decimal01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Decimal01.il.bsl new file mode 100644 index 00000000000..b0c34bdda4a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Decimal01.il.bsl @@ -0,0 +1,94 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly Decimal01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Decimal01 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.Decimal01 +{ + // Offset: 0x00000140 Length: 0x00000050 +} +.module Decimal01.exe +// MVID: {60B68B7F-F150-FA46-A745-03837F8BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05600000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Decimal01 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Decimal01 + +.class private abstract auto ansi sealed ''.$Decimal01 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + IL_0004: ldc.i4.0 + IL_0005: ldc.i4.1 + IL_0006: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_000b: pop + IL_000c: ret + } // end of method $Decimal01::main@ + +} // end of class ''.$Decimal01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EntryPoint01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EntryPoint01.fs new file mode 100644 index 00000000000..7aec9204b16 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EntryPoint01.fs @@ -0,0 +1,8 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:1792 + +let static_initializer = 10 + +[] +let main (argsz:string []) = + exit(if(static_initializer=10) then 0 else 1) diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EntryPoint01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EntryPoint01.il.bsl new file mode 100644 index 00000000000..d17322d83b4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EntryPoint01.il.bsl @@ -0,0 +1,132 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly EntryPoint01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.EntryPoint01 +{ + // Offset: 0x00000000 Length: 0x0000024F +} +.mresource public FSharpOptimizationData.EntryPoint01 +{ + // Offset: 0x00000258 Length: 0x00000090 +} +.module EntryPoint01.exe +// MVID: {611C4D7C-9846-72C1-A745-03837C4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06DA0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed EntryPoint01 + extends [mscorlib]System.Object +{ + .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 specialname static int32 + get_static_initializer() 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 3 (0x3) + .maxstack 8 + IL_0000: ldc.i4.s 10 + IL_0002: ret + } // end of method EntryPoint01::get_static_initializer + + .method public static int32 main(string[] argsz) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 37 (0x25) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 8,8 : 4,49 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\EntryPoint01.fs' + .line 100001,100001 : 0,0 '' + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$EntryPoint01::init@ + IL_0006: ldsfld int32 ''.$EntryPoint01::init@ + IL_000b: pop + IL_000c: nop + .line 8,8 : 9,39 '' + IL_000d: nop + .line 100001,100001 : 0,0 '' + IL_000e: call int32 EntryPoint01::get_static_initializer() + IL_0013: ldc.i4.s 10 + IL_0015: bne.un.s IL_001b + + .line 8,8 : 40,41 '' + IL_0017: ldc.i4.0 + .line 100001,100001 : 0,0 '' + IL_0018: nop + IL_0019: br.s IL_001d + + .line 8,8 : 47,48 '' + IL_001b: ldc.i4.1 + .line 100001,100001 : 0,0 '' + IL_001c: nop + .line 100001,100001 : 0,0 '' + IL_001d: tail. + IL_001f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0024: ret + } // end of method EntryPoint01::main + + .property int32 static_initializer() + { + .get int32 EntryPoint01::get_static_initializer() + } // end of property EntryPoint01::static_initializer +} // end of class EntryPoint01 + +.class private abstract auto ansi sealed ''.$EntryPoint01 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 7 (0x7) + .maxstack 3 + .locals init ([0] int32 static_initializer) + .line 4,4 : 1,28 '' + IL_0000: call int32 EntryPoint01::get_static_initializer() + IL_0005: stloc.0 + IL_0006: ret + } // end of method $EntryPoint01::.cctor + +} // end of class ''.$EntryPoint01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EqualsOnUnions01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EqualsOnUnions01.fs new file mode 100644 index 00000000000..68fabf80a51 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EqualsOnUnions01.fs @@ -0,0 +1,7 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:5543 +// Inefficiency on .Equals() +// This test has nothing to do with debugging spans, etc... +// It's a pure IL verification +type U = | A + | B of int diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EqualsOnUnions01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EqualsOnUnions01.il.bsl new file mode 100644 index 00000000000..e54889aaaf5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/EqualsOnUnions01.il.bsl @@ -0,0 +1,944 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly EqualsOnUnions01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.EqualsOnUnions01 +{ + // Offset: 0x00000000 Length: 0x0000063B +} +.mresource public FSharpOptimizationData.EqualsOnUnions01 +{ + // Offset: 0x00000640 Length: 0x000001C7 +} +.module EqualsOnUnions01.exe +// MVID: {61EFEE1F-BBFB-14A0-A745-03831FEEEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06940000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed EqualsOnUnions01 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto autochar serializable nested public beforefieldinit U + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .class abstract auto ansi sealed nested public Tags + extends [mscorlib]System.Object + { + .field public static literal int32 A = int32(0x00000000) + .field public static literal int32 B = int32(0x00000001) + } // end of class Tags + + .class auto ansi serializable nested assembly beforefieldinit specialname _A + extends EqualsOnUnions01/U + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 24 45 71 75 61 6C 73 4F 6E 55 6E 69 6F 6E // ..$EqualsOnUnion + 73 30 31 2B 55 2B 5F 41 40 44 65 62 75 67 54 79 // s01+U+_A@DebugTy + 70 65 50 72 6F 78 79 00 00 ) // peProxy.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void EqualsOnUnions01/U::.ctor() + IL_0006: ret + } // end of method _A::.ctor + + } // end of class _A + + .class auto ansi serializable nested public beforefieldinit specialname B + extends EqualsOnUnions01/U + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 23 45 71 75 61 6C 73 4F 6E 55 6E 69 6F 6E // ..#EqualsOnUnion + 73 30 31 2B 55 2B 42 40 44 65 62 75 67 54 79 70 // s01+U+B@DebugTyp + 65 50 72 6F 78 79 00 00 ) // eProxy.. + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .field assembly initonly int32 item + .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(int32 item) 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 EqualsOnUnions01/U::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 EqualsOnUnions01/U/B::item + IL_000d: ret + } // end of method B::.ctor + + .method public hidebysig instance int32 + get_Item() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 EqualsOnUnions01/U/B::item + IL_0006: ret + } // end of method B::get_Item + + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 01 00 00 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 ) + .get instance int32 EqualsOnUnions01/U/B::get_Item() + } // end of property B::Item + } // end of class B + + .class auto ansi nested assembly beforefieldinit specialname _A@DebugTypeProxy + extends [mscorlib]System.Object + { + .field assembly class EqualsOnUnions01/U/_A _obj + .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 public specialname rtspecialname + instance void .ctor(class EqualsOnUnions01/U/_A obj) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class EqualsOnUnions01/U/_A EqualsOnUnions01/U/_A@DebugTypeProxy::_obj + IL_000d: ret + } // end of method _A@DebugTypeProxy::.ctor + + } // end of class _A@DebugTypeProxy + + .class auto ansi nested assembly beforefieldinit specialname B@DebugTypeProxy + extends [mscorlib]System.Object + { + .field assembly class EqualsOnUnions01/U/B _obj + .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 public specialname rtspecialname + instance void .ctor(class EqualsOnUnions01/U/B obj) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class EqualsOnUnions01/U/B EqualsOnUnions01/U/B@DebugTypeProxy::_obj + IL_000d: ret + } // end of method B@DebugTypeProxy::.ctor + + .method public hidebysig instance int32 + get_Item() 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 12 (0xc) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class EqualsOnUnions01/U/B EqualsOnUnions01/U/B@DebugTypeProxy::_obj + IL_0006: ldfld int32 EqualsOnUnions01/U/B::item + IL_000b: ret + } // end of method B@DebugTypeProxy::get_Item + + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 01 00 00 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 ) + .get instance int32 EqualsOnUnions01/U/B@DebugTypeProxy::get_Item() + } // end of property B@DebugTypeProxy::Item + } // end of class B@DebugTypeProxy + + .field static assembly initonly class EqualsOnUnions01/U _unique_A + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 8 + IL_0000: newobj instance void EqualsOnUnions01/U/_A::.ctor() + IL_0005: stsfld class EqualsOnUnions01/U EqualsOnUnions01/U::_unique_A + IL_000a: ret + } // end of method U::.cctor + + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } // end of method U::.ctor + + .method public static class EqualsOnUnions01/U + get_A() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class EqualsOnUnions01/U EqualsOnUnions01/U::_unique_A + IL_0005: ret + } // end of method U::get_A + + .method public hidebysig instance bool + get_IsA() 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 10 (0xa) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: isinst EqualsOnUnions01/U/_A + IL_0006: ldnull + IL_0007: cgt.un + IL_0009: ret + } // end of method U::get_IsA + + .method public static class EqualsOnUnions01/U + NewB(int32 item) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 01 00 00 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void EqualsOnUnions01/U/B::.ctor(int32) + IL_0006: ret + } // end of method U::NewB + + .method public hidebysig instance bool + get_IsB() 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 10 (0xa) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: isinst EqualsOnUnions01/U/B + IL_0006: ldnull + IL_0007: cgt.un + IL_0009: ret + } // end of method U::get_IsB + + .method public hidebysig instance int32 + get_Tag() 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 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: isinst EqualsOnUnions01/U/B + IL_0006: brfalse.s IL_000b + + IL_0008: ldc.i4.1 + IL_0009: br.s IL_000c + + IL_000b: ldc.i4.0 + IL_000c: ret + } // end of method U::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method U::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class EqualsOnUnions01/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method U::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class EqualsOnUnions01/U obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 131 (0x83) + .maxstack 4 + .locals init ([0] int32 V_0, + [1] class EqualsOnUnions01/U V_1, + [2] int32 V_2, + [3] class EqualsOnUnions01/U V_3, + [4] class EqualsOnUnions01/U/B V_4, + [5] class EqualsOnUnions01/U/B V_5, + [6] class [mscorlib]System.Collections.IComparer V_6, + [7] int32 V_7, + [8] int32 V_8) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\EqualsOnUnions01.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse IL_0079 + + .line 100001,100001 : 0,0 '' + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: cgt.un + IL_000d: brfalse.s IL_0077 + + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.1 + IL_0012: isinst EqualsOnUnions01/U/B + IL_0017: brfalse.s IL_001c + + IL_0019: ldc.i4.1 + IL_001a: br.s IL_001d + + IL_001c: ldc.i4.0 + IL_001d: stloc.0 + IL_001e: ldarg.1 + IL_001f: stloc.3 + IL_0020: ldloc.3 + IL_0021: isinst EqualsOnUnions01/U/B + IL_0026: brfalse.s IL_002b + + IL_0028: ldc.i4.1 + IL_0029: br.s IL_002c + + IL_002b: ldc.i4.0 + IL_002c: stloc.2 + .line 100001,100001 : 0,0 '' + IL_002d: ldloc.0 + IL_002e: ldloc.2 + IL_002f: bne.un.s IL_0073 + + .line 100001,100001 : 0,0 '' + 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_0062: ldloc.s V_7 + IL_0064: ldloc.s V_8 + IL_0066: bge.s IL_006a + + .line 100001,100001 : 0,0 '' + IL_0068: ldc.i4.m1 + IL_0069: ret + + .line 100001,100001 : 0,0 '' + IL_006a: ldloc.s V_7 + IL_006c: ldloc.s V_8 + IL_006e: cgt + IL_0070: ret + + .line 100001,100001 : 0,0 '' + IL_0071: ldc.i4.0 + IL_0072: ret + + .line 100001,100001 : 0,0 '' + IL_0073: ldloc.0 + IL_0074: ldloc.2 + IL_0075: sub + IL_0076: ret + + .line 100001,100001 : 0,0 '' + IL_0077: ldc.i4.1 + IL_0078: ret + + .line 100001,100001 : 0,0 '' + IL_0079: ldarg.1 + IL_007a: ldnull + IL_007b: cgt.un + IL_007d: brfalse.s IL_0081 + + .line 100001,100001 : 0,0 '' + IL_007f: ldc.i4.m1 + IL_0080: ret + + .line 100001,100001 : 0,0 '' + IL_0081: ldc.i4.0 + IL_0082: ret + } // end of method U::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any EqualsOnUnions01/U + IL_0007: callvirt instance int32 EqualsOnUnions01/U::CompareTo(class EqualsOnUnions01/U) + IL_000c: ret + } // end of method U::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 146 (0x92) + .maxstack 4 + .locals init ([0] class EqualsOnUnions01/U V_0, + [1] int32 V_1, + [2] class EqualsOnUnions01/U V_2, + [3] int32 V_3, + [4] class EqualsOnUnions01/U V_4, + [5] class EqualsOnUnions01/U/B V_5, + [6] class EqualsOnUnions01/U/B V_6, + [7] class [mscorlib]System.Collections.IComparer V_7, + [8] int32 V_8, + [9] int32 V_9) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any EqualsOnUnions01/U + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse IL_0083 + + .line 100001,100001 : 0,0 '' + IL_0010: ldarg.1 + IL_0011: unbox.any EqualsOnUnions01/U + IL_0016: ldnull + IL_0017: cgt.un + IL_0019: brfalse.s IL_0081 + + .line 100001,100001 : 0,0 '' + IL_001b: ldarg.0 + IL_001c: stloc.2 + IL_001d: ldloc.2 + IL_001e: isinst EqualsOnUnions01/U/B + IL_0023: brfalse.s IL_0028 + + IL_0025: ldc.i4.1 + IL_0026: br.s IL_0029 + + IL_0028: ldc.i4.0 + IL_0029: stloc.1 + IL_002a: ldloc.0 + IL_002b: stloc.s V_4 + IL_002d: ldloc.s V_4 + IL_002f: isinst EqualsOnUnions01/U/B + IL_0034: brfalse.s IL_0039 + + IL_0036: ldc.i4.1 + IL_0037: br.s IL_003a + + IL_0039: ldc.i4.0 + IL_003a: stloc.3 + .line 100001,100001 : 0,0 '' + IL_003b: ldloc.1 + IL_003c: ldloc.3 + IL_003d: bne.un.s IL_007d + + .line 100001,100001 : 0,0 '' + IL_003f: ldarg.0 + IL_0040: isinst EqualsOnUnions01/U/B + IL_0045: brfalse.s IL_007b + + .line 100001,100001 : 0,0 '' + IL_0047: ldarg.0 + IL_0048: castclass EqualsOnUnions01/U/B + IL_004d: stloc.s V_5 + IL_004f: ldloc.0 + IL_0050: castclass EqualsOnUnions01/U/B + IL_0055: stloc.s V_6 + IL_0057: ldarg.2 + IL_0058: stloc.s V_7 + IL_005a: ldloc.s V_5 + IL_005c: ldfld int32 EqualsOnUnions01/U/B::item + IL_0061: stloc.s V_8 + IL_0063: ldloc.s V_6 + IL_0065: ldfld int32 EqualsOnUnions01/U/B::item + IL_006a: stloc.s V_9 + .line 100001,100001 : 0,0 '' + IL_006c: ldloc.s V_8 + IL_006e: ldloc.s V_9 + IL_0070: bge.s IL_0074 + + .line 100001,100001 : 0,0 '' + IL_0072: ldc.i4.m1 + IL_0073: ret + + .line 100001,100001 : 0,0 '' + IL_0074: ldloc.s V_8 + IL_0076: ldloc.s V_9 + IL_0078: cgt + IL_007a: ret + + .line 100001,100001 : 0,0 '' + IL_007b: ldc.i4.0 + IL_007c: ret + + .line 100001,100001 : 0,0 '' + IL_007d: ldloc.1 + IL_007e: ldloc.3 + IL_007f: sub + IL_0080: ret + + .line 100001,100001 : 0,0 '' + IL_0081: ldc.i4.1 + IL_0082: ret + + .line 100001,100001 : 0,0 '' + IL_0083: ldarg.1 + IL_0084: unbox.any EqualsOnUnions01/U + IL_0089: ldnull + IL_008a: cgt.un + IL_008c: brfalse.s IL_0090 + + .line 100001,100001 : 0,0 '' + IL_008e: ldc.i4.m1 + IL_008f: ret + + .line 100001,100001 : 0,0 '' + IL_0090: ldc.i4.0 + IL_0091: ret + } // end of method U::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 67 (0x43) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.0 + IL_0009: isinst EqualsOnUnions01/U/B + IL_000e: brfalse.s IL_0032 + + .line 100001,100001 : 0,0 '' + IL_0010: ldarg.0 + IL_0011: castclass EqualsOnUnions01/U/B + IL_0016: stloc.1 + IL_0017: ldc.i4.1 + IL_0018: stloc.0 + IL_0019: ldc.i4 0x9e3779b9 + IL_001e: ldarg.1 + IL_001f: stloc.2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 EqualsOnUnions01/U/B::item + IL_0026: ldloc.0 + IL_0027: ldc.i4.6 + IL_0028: shl + IL_0029: ldloc.0 + IL_002a: ldc.i4.2 + IL_002b: shr + IL_002c: add + IL_002d: add + IL_002e: add + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: ret + + .line 100001,100001 : 0,0 '' + IL_0032: ldarg.0 + IL_0033: stloc.3 + IL_0034: ldloc.3 + IL_0035: isinst EqualsOnUnions01/U/B + IL_003a: brfalse.s IL_003f + + IL_003c: ldc.i4.1 + IL_003d: br.s IL_0040 + + IL_003f: ldc.i4.0 + IL_0040: ret + + .line 100001,100001 : 0,0 '' + IL_0041: ldc.i4.0 + IL_0042: ret + } // end of method U::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method U::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 114 (0x72) + .maxstack 4 + .locals init ([0] class EqualsOnUnions01/U V_0, + [1] class EqualsOnUnions01/U V_1, + [2] int32 V_2, + [3] class EqualsOnUnions01/U V_3, + [4] int32 V_4, + [5] class EqualsOnUnions01/U V_5, + [6] class EqualsOnUnions01/U/B V_6, + [7] class EqualsOnUnions01/U/B V_7, + [8] class [mscorlib]System.Collections.IEqualityComparer V_8) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_006a + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst EqualsOnUnions01/U + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + IL_0012: ldarg.0 + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: isinst EqualsOnUnions01/U/B + IL_001a: brfalse.s IL_001f + + IL_001c: ldc.i4.1 + IL_001d: br.s IL_0020 + + IL_001f: ldc.i4.0 + IL_0020: stloc.2 + IL_0021: ldloc.1 + IL_0022: stloc.s V_5 + IL_0024: ldloc.s V_5 + IL_0026: isinst EqualsOnUnions01/U/B + IL_002b: brfalse.s IL_0030 + + IL_002d: ldc.i4.1 + IL_002e: br.s IL_0031 + + IL_0030: ldc.i4.0 + IL_0031: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0033: ldloc.2 + IL_0034: ldloc.s V_4 + IL_0036: bne.un.s IL_0066 + + .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_0064: ldc.i4.1 + IL_0065: ret + + .line 100001,100001 : 0,0 '' + IL_0066: ldc.i4.0 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: ldc.i4.0 + IL_0069: ret + + .line 100001,100001 : 0,0 '' + IL_006a: ldarg.1 + IL_006b: ldnull + IL_006c: cgt.un + IL_006e: ldc.i4.0 + IL_006f: ceq + IL_0071: ret + } // end of method U::Equals + + .method public hidebysig virtual final + instance bool Equals(class EqualsOnUnions01/U obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 101 (0x65) + .maxstack 4 + .locals init ([0] int32 V_0, + [1] class EqualsOnUnions01/U V_1, + [2] int32 V_2, + [3] class EqualsOnUnions01/U V_3, + [4] class EqualsOnUnions01/U/B V_4, + [5] class EqualsOnUnions01/U/B V_5) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_005d + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_005b + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: stloc.1 + IL_000e: ldloc.1 + IL_000f: isinst EqualsOnUnions01/U/B + IL_0014: brfalse.s IL_0019 + + IL_0016: ldc.i4.1 + IL_0017: br.s IL_001a + + IL_0019: ldc.i4.0 + IL_001a: stloc.0 + IL_001b: ldarg.1 + IL_001c: stloc.3 + IL_001d: ldloc.3 + IL_001e: isinst EqualsOnUnions01/U/B + IL_0023: brfalse.s IL_0028 + + IL_0025: ldc.i4.1 + IL_0026: br.s IL_0029 + + IL_0028: ldc.i4.0 + IL_0029: stloc.2 + .line 100001,100001 : 0,0 '' + IL_002a: ldloc.0 + IL_002b: ldloc.2 + IL_002c: bne.un.s IL_0059 + + .line 100001,100001 : 0,0 '' + IL_002e: ldarg.0 + IL_002f: isinst EqualsOnUnions01/U/B + IL_0034: brfalse.s IL_0057 + + .line 100001,100001 : 0,0 '' + IL_0036: ldarg.0 + IL_0037: castclass EqualsOnUnions01/U/B + IL_003c: stloc.s V_4 + IL_003e: ldarg.1 + IL_003f: castclass EqualsOnUnions01/U/B + IL_0044: stloc.s V_5 + IL_0046: ldloc.s V_4 + IL_0048: ldfld int32 EqualsOnUnions01/U/B::item + IL_004d: ldloc.s V_5 + IL_004f: ldfld int32 EqualsOnUnions01/U/B::item + IL_0054: ceq + IL_0056: ret + + .line 100001,100001 : 0,0 '' + IL_0057: ldc.i4.1 + IL_0058: ret + + .line 100001,100001 : 0,0 '' + IL_0059: ldc.i4.0 + IL_005a: ret + + .line 100001,100001 : 0,0 '' + IL_005b: ldc.i4.0 + IL_005c: ret + + .line 100001,100001 : 0,0 '' + IL_005d: ldarg.1 + IL_005e: ldnull + IL_005f: cgt.un + IL_0061: ldc.i4.0 + IL_0062: ceq + IL_0064: ret + } // end of method U::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class EqualsOnUnions01/U V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst EqualsOnUnions01/U + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool EqualsOnUnions01/U::Equals(class EqualsOnUnions01/U) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method U::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 EqualsOnUnions01/U::get_Tag() + } // end of property U::Tag + .property class EqualsOnUnions01/U A() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get class EqualsOnUnions01/U EqualsOnUnions01/U::get_A() + } // end of property U::A + .property instance bool IsA() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance bool EqualsOnUnions01/U::get_IsA() + } // end of property U::IsA + .property instance bool IsB() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance bool EqualsOnUnions01/U::get_IsB() + } // end of property U::IsB + } // end of class U + +} // end of class EqualsOnUnions01 + +.class private abstract auto ansi sealed ''.$EqualsOnUnions01 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $EqualsOnUnions01::main@ + +} // end of class ''.$EqualsOnUnions01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop01.fs new file mode 100644 index 00000000000..eb7c818f002 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop01.fs @@ -0,0 +1,6 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regressiont test for TFS#712639 +// Incorrect span or overlapping debugging spans +// The test will start failing once the bug is actually fixed +for wi in [ 1 .. 3 ] do + printfn "%A" wi diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop01.il.bsl new file mode 100644 index 00000000000..e8e857034c9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop01.il.bsl @@ -0,0 +1,118 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ForLoop01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ForLoop01 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.ForLoop01 +{ + // Offset: 0x00000140 Length: 0x00000050 +} +.module ForLoop01.exe +// MVID: {61EFEC5E-1795-791C-A745-03835EECEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06810000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ForLoop01 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class ForLoop01 + +.class private abstract auto ansi sealed ''.$ForLoop01 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 74 (0x4a) + .maxstack 5 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + [2] int32 wi) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .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 + IL_0003: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + 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 + 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 : 8,10 '' + IL_001a: ldloc.1 + IL_001b: ldnull + IL_001c: cgt.un + IL_001e: brfalse.s IL_0049 + + 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) + IL_0036: ldloc.2 + IL_0037: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_003c: pop + IL_003d: ldloc.1 + IL_003e: stloc.0 + IL_003f: ldloc.0 + IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0045: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0046: nop + IL_0047: br.s IL_001a + + IL_0049: ret + } // end of method $ForLoop01::main@ + +} // end of class ''.$ForLoop01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop02.fs new file mode 100644 index 00000000000..57cf7b7900d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop02.fs @@ -0,0 +1,7 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regressiont test for TFS#712639 +// Incorrect span or overlapping debugging spans +// The test will start failing once the bug is actually fixed +for wi = 1 to 3 do + printfn "%A" wi + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop02.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop02.il.bsl new file mode 100644 index 00000000000..5756a522230 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop02.il.bsl @@ -0,0 +1,101 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ForLoop02 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ForLoop02 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.ForLoop02 +{ + // Offset: 0x00000140 Length: 0x00000050 +} +.module ForLoop02.exe +// MVID: {61E07031-1736-791C-A745-03833170E061} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07170000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ForLoop02 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class ForLoop02 + +.class private abstract auto ansi sealed ''.$ForLoop02 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 37 (0x25) + .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,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,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) + IL_0013: ldloc.0 + IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0019: pop + IL_001a: ldloc.0 + IL_001b: ldc.i4.1 + IL_001c: add + IL_001d: stloc.0 + .line 5,5 : 12,14 '' + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: ldc.i4.3 + IL_0021: add + IL_0022: blt.s IL_0004 + + IL_0024: ret + } // end of method $ForLoop02::main@ + +} // end of class ''.$ForLoop02 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop03.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop03.fs new file mode 100644 index 00000000000..9ce6ae8b25d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop03.fs @@ -0,0 +1,14 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSharp1.0:4785 +// Title: Search the IEnumerator pattern first + +let ra = new ResizeArray(100) +for i = 0 to 100 do ra.Add(i) + + +let test1() = + let mutable z = 0 + for i = 0 to 10000000 do + for x in ra do + z <- z + 1 + printfn "z = %d" z diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop03.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop03.il.bsl new file mode 100644 index 00000000000..d3e9c40ae8e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ForLoop03.il.bsl @@ -0,0 +1,197 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ForLoop03 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ForLoop03 +{ + // Offset: 0x00000000 Length: 0x000001F6 +} +.mresource public FSharpOptimizationData.ForLoop03 +{ + // Offset: 0x00000200 Length: 0x0000007B +} +.module ForLoop03.exe +// MVID: {61EFEC5E-1757-791C-A745-03835EECEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06A30000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ForLoop03 + extends [mscorlib]System.Object +{ + .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 specialname static class [mscorlib]System.Collections.Generic.List`1 + get_ra() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.List`1 ''.$ForLoop03::ra@5 + IL_0005: ret + } // end of method ForLoop03::get_ra + + .method public static void test1() cil managed + { + // Code size 97 (0x61) + .maxstack 5 + .locals init ([0] int32 z, + [1] int32 i, + [2] class [mscorlib]System.Collections.Generic.List`1 V_2, + [3] valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator V_3, + [4] int32 x) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .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,7 '' + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_0040 + + .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 : 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 + + 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 + IL_0028: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: br.s IL_0013 + + IL_002c: leave.s IL_003c + + } // end .try + finally + { + IL_002e: ldloca.s V_3 + IL_0030: constrained. valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator + IL_0036: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_003b: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_003c: ldloc.1 + IL_003d: ldc.i4.1 + IL_003e: add + IL_003f: stloc.1 + .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,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) + IL_0059: ldloc.0 + IL_005a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005f: pop + IL_0060: ret + } // end of method ForLoop03::test1 + + .property class [mscorlib]System.Collections.Generic.List`1 + ra() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.List`1 ForLoop03::get_ra() + } // end of property ForLoop03::ra +} // end of class ForLoop03 + +.class private abstract auto ansi sealed ''.$ForLoop03 + extends [mscorlib]System.Object +{ + .field static assembly class [mscorlib]System.Collections.Generic.List`1 ra@5 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 41 (0x29) + .maxstack 5 + .locals init ([0] class [mscorlib]System.Collections.Generic.List`1 ra, + [1] int32 i) + .line 5,5 : 1,35 '' + IL_0000: ldc.i4.s 100 + IL_0002: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor(int32) + IL_0007: dup + IL_0008: stsfld class [mscorlib]System.Collections.Generic.List`1 ''.$ForLoop03::ra@5 + IL_000d: stloc.0 + .line 6,6 : 1,4 '' + IL_000e: ldc.i4.0 + IL_000f: stloc.1 + IL_0010: br.s IL_0021 + + .line 6,6 : 21,30 '' + IL_0012: call class [mscorlib]System.Collections.Generic.List`1 ForLoop03::get_ra() + IL_0017: ldloc.1 + IL_0018: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001d: ldloc.1 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: stloc.1 + .line 6,6 : 11,13 '' + IL_0021: ldloc.1 + IL_0022: ldc.i4.1 + IL_0023: ldc.i4.s 100 + IL_0025: add + IL_0026: blt.s IL_0012 + + IL_0028: ret + } // end of method $ForLoop03::main@ + +} // end of class ''.$ForLoop03 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GeneralizationOnUnions01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GeneralizationOnUnions01.fs new file mode 100644 index 00000000000..bd7318dd331 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GeneralizationOnUnions01.fs @@ -0,0 +1,11 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSharp1.0:6389 - Nullary union cases improperly constrain generic type parameters + +type Weirdo = | C +let f C = 0 // parameter name is C +let g () = + let C = 1 + let f C = C // what is parameter name here? Do we even care? + () + +printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl new file mode 100644 index 00000000000..35320fbb8c0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl @@ -0,0 +1,489 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly GeneralizationOnUnions01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.GeneralizationOnUnions01 +{ + // Offset: 0x00000000 Length: 0x00000689 +} +.mresource public FSharpOptimizationData.GeneralizationOnUnions01 +{ + // Offset: 0x00000690 Length: 0x000001F4 +} +.module GeneralizationOnUnions01.exe +// MVID: {61E07031-4CA2-8CD1-A745-03833170E061} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x070E0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed GeneralizationOnUnions01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested public beforefieldinit Weirdo + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field static assembly initonly class GeneralizationOnUnions01/Weirdo _unique_C + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 8 + IL_0000: newobj instance void GeneralizationOnUnions01/Weirdo::.ctor() + IL_0005: stsfld class GeneralizationOnUnions01/Weirdo GeneralizationOnUnions01/Weirdo::_unique_C + IL_000a: ret + } // end of method Weirdo::.cctor + + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } // end of method Weirdo::.ctor + + .method public static class GeneralizationOnUnions01/Weirdo + get_C() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class GeneralizationOnUnions01/Weirdo GeneralizationOnUnions01/Weirdo::_unique_C + IL_0005: ret + } // end of method Weirdo::get_C + + .method public hidebysig instance int32 + get_Tag() 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 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } // end of method Weirdo::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Weirdo::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class GeneralizationOnUnions01/Weirdo>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Weirdo::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class GeneralizationOnUnions01/Weirdo obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 26 (0x1a) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\GeneralizationOnUnions01.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0010 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_000e + + .line 100001,100001 : 0,0 '' + IL_000c: ldc.i4.0 + IL_000d: ret + + .line 100001,100001 : 0,0 '' + IL_000e: ldc.i4.1 + IL_000f: ret + + .line 100001,100001 : 0,0 '' + IL_0010: ldarg.1 + IL_0011: ldnull + IL_0012: cgt.un + IL_0014: brfalse.s IL_0018 + + .line 100001,100001 : 0,0 '' + IL_0016: ldc.i4.m1 + IL_0017: ret + + .line 100001,100001 : 0,0 '' + IL_0018: ldc.i4.0 + IL_0019: ret + } // end of method Weirdo::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any GeneralizationOnUnions01/Weirdo + IL_0007: callvirt instance int32 GeneralizationOnUnions01/Weirdo::CompareTo(class GeneralizationOnUnions01/Weirdo) + IL_000c: ret + } // end of method Weirdo::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 43 (0x2b) + .maxstack 3 + .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any GeneralizationOnUnions01/Weirdo + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.1 + IL_000e: unbox.any GeneralizationOnUnions01/Weirdo + IL_0013: ldnull + IL_0014: cgt.un + IL_0016: brfalse.s IL_001a + + .line 100001,100001 : 0,0 '' + IL_0018: ldc.i4.0 + IL_0019: ret + + .line 100001,100001 : 0,0 '' + IL_001a: ldc.i4.1 + IL_001b: ret + + .line 100001,100001 : 0,0 '' + IL_001c: ldarg.1 + IL_001d: unbox.any GeneralizationOnUnions01/Weirdo + IL_0022: ldnull + IL_0023: cgt.un + IL_0025: brfalse.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_0027: ldc.i4.m1 + IL_0028: ret + + .line 100001,100001 : 0,0 '' + IL_0029: ldc.i4.0 + IL_002a: ret + } // end of method Weirdo::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 3 + .locals init ([0] int32 V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_000c + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: ret + + .line 100001,100001 : 0,0 '' + IL_000c: ldc.i4.0 + IL_000d: ret + } // end of method Weirdo::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Weirdo::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 30 (0x1e) + .maxstack 4 + .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0, + [1] class GeneralizationOnUnions01/Weirdo V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst GeneralizationOnUnions01/Weirdo + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0014 + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + IL_0012: ldc.i4.1 + IL_0013: ret + + .line 100001,100001 : 0,0 '' + IL_0014: ldc.i4.0 + IL_0015: ret + + .line 100001,100001 : 0,0 '' + IL_0016: ldarg.1 + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: ldc.i4.0 + IL_001b: ceq + IL_001d: ret + } // end of method Weirdo::Equals + + .method public hidebysig virtual final + instance bool Equals(class GeneralizationOnUnions01/Weirdo obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 19 (0x13) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_000b + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: ret + + .line 100001,100001 : 0,0 '' + IL_000b: ldarg.1 + IL_000c: ldnull + IL_000d: cgt.un + IL_000f: ldc.i4.0 + IL_0010: ceq + IL_0012: ret + } // end of method Weirdo::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst GeneralizationOnUnions01/Weirdo + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool GeneralizationOnUnions01/Weirdo::Equals(class GeneralizationOnUnions01/Weirdo) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method Weirdo::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 GeneralizationOnUnions01/Weirdo::get_Tag() + } // end of property Weirdo::Tag + .property class GeneralizationOnUnions01/Weirdo + C() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get class GeneralizationOnUnions01/Weirdo GeneralizationOnUnions01/Weirdo::get_C() + } // end of property Weirdo::C + } // end of class Weirdo + + .class auto ansi serializable sealed nested assembly beforefieldinit f@8 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public int32 C + .method assembly specialname rtspecialname + instance void .ctor(int32 C) 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 int32 GeneralizationOnUnions01/f@8::C + IL_000d: ret + } // end of method f@8::.ctor + + .method public strict virtual instance int32 + Invoke(class GeneralizationOnUnions01/Weirdo _arg1) cil managed + { + // Code size 9 (0x9) + .maxstack 5 + .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 8,8 : 14,15 '' + IL_0002: ldarg.0 + IL_0003: ldfld int32 GeneralizationOnUnions01/f@8::C + IL_0008: ret + } // end of method f@8::Invoke + + } // end of class f@8 + + .method public static int32 f(class GeneralizationOnUnions01/Weirdo C) cil managed + { + // Code size 4 (0x4) + .maxstack 3 + .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 5,5 : 11,12 '' + IL_0002: ldc.i4.0 + IL_0003: ret + } // end of method GeneralizationOnUnions01::f + + .method public static void g() cil managed + { + // Code size 10 (0xa) + .maxstack 3 + .locals init ([0] int32 C, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) + .line 7,7 : 4,13 '' + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: newobj instance void GeneralizationOnUnions01/f@8::.ctor(int32) + IL_0008: stloc.1 + .line 9,9 : 4,6 '' + IL_0009: ret + } // end of method GeneralizationOnUnions01::g + +} // end of class GeneralizationOnUnions01 + +.class private abstract auto ansi sealed ''.$GeneralizationOnUnions01 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 8 (0x8) + .maxstack 8 + .line 11,11 : 1,7 '' + IL_0000: ldc.i4.0 + IL_0001: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0006: pop + IL_0007: ret + } // end of method $GeneralizationOnUnions01::main@ + +} // end of class ''.$GeneralizationOnUnions01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl new file mode 100644 index 00000000000..ffb061fb8fe --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl @@ -0,0 +1,205 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly GenericTypeStaticField01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 00 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.GenericTypeStaticField01 +{ + // Offset: 0x00000000 Length: 0x00000604 +} +.mresource public FSharpOptimizationData.GenericTypeStaticField01 +{ + // Offset: 0x00000608 Length: 0x000001E1 +} +.module GenericTypeStaticField01.exe +// MVID: {61FC3629-1E75-7E6B-A745-03832936FC61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05580000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed GenericTypeStaticField01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable nested public Foo`1 + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field static assembly class GenericTypeStaticField01/Foo`1 theInstance + .field static assembly int32 init@2 + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // 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 + IL_0007: pop + IL_0008: ret + } // end of method Foo`1::.ctor + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // 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 + IL_0012: ret + } // end of method Foo`1::.cctor + + .method public specialname static class GenericTypeStaticField01/Foo`1 + get_Instance() cil managed + { + // Code size 27 (0x1b) + .maxstack 8 + .line 4,4 : 28,39 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + 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_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() + IL_0010: nop + .line 16707566,16707566 : 0,0 '' + IL_0011: nop + IL_0012: br.s IL_0015 + + .line 16707566,16707566 : 0,0 '' + 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 + Instance() + { + .get class GenericTypeStaticField01/Foo`1 GenericTypeStaticField01/Foo`1::get_Instance() + } // end of property Foo`1::Instance + } // end of class Foo`1 + + .class auto ansi serializable nested public Bar`2 + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field static assembly class GenericTypeStaticField01/Bar`2 theInstance + .field static assembly int32 'init@6-1' + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // 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 + IL_0007: pop + IL_0008: ret + } // end of method Bar`2::.ctor + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // 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' + IL_0012: ret + } // end of method Bar`2::.cctor + + .method public specialname static class GenericTypeStaticField01/Bar`2 + get_Instance() cil managed + { + // Code size 27 (0x1b) + .maxstack 8 + .line 8,8 : 28,39 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + 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_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() + IL_0010: nop + .line 16707566,16707566 : 0,0 '' + IL_0011: nop + IL_0012: br.s IL_0015 + + .line 16707566,16707566 : 0,0 '' + 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 + Instance() + { + .get class GenericTypeStaticField01/Bar`2 GenericTypeStaticField01/Bar`2::get_Instance() + } // end of property Bar`2::Instance + } // end of class Bar`2 + +} // end of class GenericTypeStaticField01 + +.class private abstract auto ansi sealed ''.$GenericTypeStaticField01 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $GenericTypeStaticField01::main@ + +} // end of class ''.$GenericTypeStaticField01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/IfThenElse01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/IfThenElse01.fs new file mode 100644 index 00000000000..f81c02acfa2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/IfThenElse01.fs @@ -0,0 +1,7 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module IfThenElse01 // Regression test for F#4519 +module M = + let m () = + let f5 (x:int) (y:int) (z:'a) (w:'a) = if (x > y) then z else w + f5 10 10 'a' 'b' + m() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/IfThenElse01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/IfThenElse01.il.bsl new file mode 100644 index 00000000000..da3619e275e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/IfThenElse01.il.bsl @@ -0,0 +1,220 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly IfThenElse01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.IfThenElse01 +{ + // Offset: 0x00000000 Length: 0x000001FD +} +.mresource public FSharpOptimizationData.IfThenElse01 +{ + // Offset: 0x00000208 Length: 0x00000092 +} +.module IfThenElse01.dll +// MVID: {611C4D7C-2D6C-0B5D-A745-03837C4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06B70000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed IfThenElse01 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public M + extends [mscorlib]System.Object + { + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f5@5 + extends [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc + { + .field static assembly initonly class IfThenElse01/M/f5@5 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc::.ctor() + IL_0006: ret + } // end of method f5@5::.ctor + + .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 ) + // Code size 12 (0xc) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void class IfThenElse01/M/f5@5T::.ctor(class IfThenElse01/M/f5@5) + IL_0006: box class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>> + IL_000b: ret + } // end of method f5@5::Specialize + + .method private specialname rtspecialname static + void .cctor() 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 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void IfThenElse01/M/f5@5::.ctor() + IL_0005: stsfld class IfThenElse01/M/f5@5 IfThenElse01/M/f5@5::@_instance + IL_000a: ret + } // end of method f5@5::.cctor + + } // end of class f5@5 + + .class auto ansi serializable sealed nested assembly beforefieldinit f5@5T + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`5 + { + .field public class IfThenElse01/M/f5@5 self0@ + .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 IfThenElse01/M/f5@5 self0@) 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.OptimizedClosures/FSharpFunc`5::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class IfThenElse01/M/f5@5 class IfThenElse01/M/f5@5T::self0@ + IL_000d: ret + } // end of method f5@5T::.ctor + + .method public strict virtual instance !a + Invoke(int32 x, + int32 y, + !a z, + !a w) cil managed + { + // Code size 17 (0x11) + .maxstack 7 + .locals init ([0] class IfThenElse01/M/f5@5 V_0) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 48,63 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\IfThenElse01.fs' + IL_0000: ldarg.0 + IL_0001: ldfld class IfThenElse01/M/f5@5 class IfThenElse01/M/f5@5T::self0@ + IL_0006: stloc.0 + IL_0007: nop + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.1 + IL_0009: ldarg.2 + IL_000a: ble.s IL_000e + + .line 5,5 : 64,65 '' + IL_000c: ldarg.3 + IL_000d: ret + + .line 5,5 : 71,72 '' + IL_000e: ldarg.s w + IL_0010: ret + } // end of method f5@5T::Invoke + + } // end of class f5@5T + + .method public static char m() cil managed + { + // Code size 43 (0x2b) + .maxstack 7 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc f5, + [1] char V_1, + [2] char V_2, + [3] int32 V_3, + [4] int32 V_4) + .line 100001,100001 : 0,0 '' + IL_0000: ldsfld class IfThenElse01/M/f5@5 IfThenElse01/M/f5@5::@_instance + IL_0005: stloc.0 + .line 6,6 : 9,25 '' + IL_0006: ldloc.0 + IL_0007: ldc.i4.s 10 + IL_0009: ldc.i4.s 10 + IL_000b: ldc.i4.s 97 + IL_000d: ldc.i4.s 98 + IL_000f: stloc.1 + IL_0010: stloc.2 + IL_0011: stloc.3 + IL_0012: stloc.s V_4 + IL_0014: callvirt instance object [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc::Specialize() + IL_0019: unbox.any class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>> + IL_001e: ldloc.s V_4 + IL_0020: ldloc.3 + IL_0021: ldloc.2 + IL_0022: ldloc.1 + IL_0023: tail. + IL_0025: call !!2 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>>, + !0, + !1, + !!0, + !!1) + IL_002a: ret + } // end of method M::m + + } // end of class M + +} // end of class IfThenElse01 + +.class private abstract auto ansi sealed ''.$IfThenElse01 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 7,7 : 4,7 '' + IL_0000: call char IfThenElse01/M::m() + IL_0005: pop + IL_0006: ret + } // end of method $IfThenElse01::.cctor + +} // end of class ''.$IfThenElse01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Int64.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Int64.fs new file mode 100644 index 00000000000..46085bc227e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Int64.fs @@ -0,0 +1,4 @@ +let a = 2L +let b = 20L +let c = 2147483649L +let d = 932147483649L \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Int64.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Int64.il.bsl new file mode 100644 index 00000000000..3e6b317f3ed --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Int64.il.bsl @@ -0,0 +1,134 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 4:4:1:0 +} +.assembly Int64 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Int64 +{ + // Offset: 0x00000000 Length: 0x0000020D + // WARNING: managed resource file FSharpSignatureData.Int64 created +} +.mresource public FSharpOptimizationData.Int64 +{ + // Offset: 0x00000218 Length: 0x000000D4 + // WARNING: managed resource file FSharpOptimizationData.Int64 created +} +.module Int64.exe +// MVID: {59C696CC-77F4-40B2-A745-0383CC96C659} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x02640000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Int64 + extends [mscorlib]System.Object +{ + .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 specialname static int64 + get_a() 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 3 (0x3) + .maxstack 8 + IL_0000: ldc.i4.2 + IL_0001: conv.i8 + IL_0002: ret + } // end of method Int64::get_a + + .method public specialname static int64 + get_b() 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 4 (0x4) + .maxstack 8 + IL_0000: ldc.i4.s 20 + IL_0002: conv.i8 + IL_0003: ret + } // end of method Int64::get_b + + .method public specialname static int64 + get_c() 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 7 (0x7) + .maxstack 8 + IL_0000: ldc.i4 0x80000001 + IL_0005: conv.u8 + IL_0006: ret + } // end of method Int64::get_c + + .method public specialname static int64 + get_d() 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 10 (0xa) + .maxstack 8 + IL_0000: ldc.i8 0xd90851d401 + IL_0009: ret + } // end of method Int64::get_d + + .property int64 a() + { + .get int64 Int64::get_a() + } // end of property Int64::a + .property int64 b() + { + .get int64 Int64::get_b() + } // end of property Int64::b + .property int64 c() + { + .get int64 Int64::get_c() + } // end of property Int64::c + .property int64 d() + { + .get int64 Int64::get_d() + } // end of property Int64::d +} // end of class Int64 + +.class private abstract auto ansi sealed ''.$Int64 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $Int64::main@ + +} // end of class ''.$Int64 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file Int64.res diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/LetIfThenElse01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/LetIfThenElse01.fs new file mode 100644 index 00000000000..ca4ad97f092 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/LetIfThenElse01.fs @@ -0,0 +1,12 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:5155 +// Stepping through if/then/else which is then stored into a local mistakenly steps into "else" branch + +let F(y) = + let x1 = if System.DateTime.Now.Year > 2000 then 1 else 2 + let y1 = if System.DateTime.Now.Year > 2000 then 1 else 2 + let x2 = if System.DateTime.Now.Year < 2000 then 1 else 2 + let y2 = if System.DateTime.Now.Year < 2000 then 1 else 2 + x1,y1,x2,y2 + +F(1) |> ignore diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/LetIfThenElse01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/LetIfThenElse01.il.bsl new file mode 100644 index 00000000000..d52b78f54d7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/LetIfThenElse01.il.bsl @@ -0,0 +1,199 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly LetIfThenElse01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.LetIfThenElse01 +{ + // Offset: 0x00000000 Length: 0x000001D9 +} +.mresource public FSharpOptimizationData.LetIfThenElse01 +{ + // Offset: 0x000001E0 Length: 0x00000076 +} +.module LetIfThenElse01.exe +// MVID: {611C4D7C-BE5A-D8FD-A745-03837C4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06920000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed LetIfThenElse01 + extends [mscorlib]System.Object +{ + .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 class [mscorlib]System.Tuple`4 + F(!!a y) cil managed + { + // Code size 128 (0x80) + .maxstack 6 + .locals init ([0] int32 x1, + [1] valuetype [mscorlib]System.DateTime V_1, + [2] int32 y1, + [3] valuetype [mscorlib]System.DateTime V_3, + [4] int32 x2, + [5] valuetype [mscorlib]System.DateTime V_5, + [6] int32 y2, + [7] valuetype [mscorlib]System.DateTime V_7) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 6,6 : 12,51 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\LetIfThenElse01.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() + IL_0006: stloc.1 + IL_0007: ldloca.s V_1 + IL_0009: call instance int32 [mscorlib]System.DateTime::get_Year() + IL_000e: ldc.i4 0x7d0 + IL_0013: ble.s IL_0019 + + .line 6,6 : 52,53 '' + IL_0015: ldc.i4.1 + .line 100001,100001 : 0,0 '' + IL_0016: nop + IL_0017: br.s IL_001b + + .line 6,6 : 59,60 '' + IL_0019: ldc.i4.2 + .line 100001,100001 : 0,0 '' + IL_001a: nop + .line 100001,100001 : 0,0 '' + IL_001b: stloc.0 + .line 7,7 : 12,51 '' + IL_001c: nop + .line 100001,100001 : 0,0 '' + IL_001d: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() + IL_0022: stloc.3 + IL_0023: ldloca.s V_3 + IL_0025: call instance int32 [mscorlib]System.DateTime::get_Year() + IL_002a: ldc.i4 0x7d0 + IL_002f: ble.s IL_0035 + + .line 7,7 : 52,53 '' + IL_0031: ldc.i4.1 + .line 100001,100001 : 0,0 '' + IL_0032: nop + IL_0033: br.s IL_0037 + + .line 7,7 : 59,60 '' + IL_0035: ldc.i4.2 + .line 100001,100001 : 0,0 '' + IL_0036: nop + .line 100001,100001 : 0,0 '' + IL_0037: stloc.2 + .line 8,8 : 12,51 '' + IL_0038: nop + .line 100001,100001 : 0,0 '' + IL_0039: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() + IL_003e: stloc.s V_5 + IL_0040: ldloca.s V_5 + IL_0042: call instance int32 [mscorlib]System.DateTime::get_Year() + IL_0047: ldc.i4 0x7d0 + IL_004c: bge.s IL_0052 + + .line 8,8 : 52,53 '' + IL_004e: ldc.i4.1 + .line 100001,100001 : 0,0 '' + IL_004f: nop + IL_0050: br.s IL_0054 + + .line 8,8 : 59,60 '' + IL_0052: ldc.i4.2 + .line 100001,100001 : 0,0 '' + IL_0053: nop + .line 100001,100001 : 0,0 '' + IL_0054: stloc.s x2 + .line 9,9 : 12,51 '' + IL_0056: nop + .line 100001,100001 : 0,0 '' + IL_0057: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() + IL_005c: stloc.s V_7 + IL_005e: ldloca.s V_7 + IL_0060: call instance int32 [mscorlib]System.DateTime::get_Year() + IL_0065: ldc.i4 0x7d0 + IL_006a: bge.s IL_0070 + + .line 9,9 : 52,53 '' + IL_006c: ldc.i4.1 + .line 100001,100001 : 0,0 '' + IL_006d: nop + IL_006e: br.s IL_0072 + + .line 9,9 : 59,60 '' + IL_0070: ldc.i4.2 + .line 100001,100001 : 0,0 '' + IL_0071: nop + .line 100001,100001 : 0,0 '' + IL_0072: stloc.s y2 + .line 10,10 : 3,14 '' + IL_0074: ldloc.0 + IL_0075: ldloc.2 + IL_0076: ldloc.s x2 + IL_0078: ldloc.s y2 + IL_007a: newobj instance void class [mscorlib]System.Tuple`4::.ctor(!0, + !1, + !2, + !3) + IL_007f: ret + } // end of method LetIfThenElse01::F + +} // end of class LetIfThenElse01 + +.class private abstract auto ansi sealed ''.$LetIfThenElse01 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 10 (0xa) + .maxstack 3 + .locals init ([0] class [mscorlib]System.Tuple`4 'Pipe #1 input at line 12', + [1] class [mscorlib]System.Tuple`4 V_1) + .line 12,12 : 1,5 '' + IL_0000: ldc.i4.1 + IL_0001: call class [mscorlib]System.Tuple`4 LetIfThenElse01::F(!!0) + IL_0006: stloc.0 + .line 12,12 : 9,15 '' + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ret + } // end of method $LetIfThenElse01::main@ + +} // end of class ''.$LetIfThenElse01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Lock01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Lock01.fs new file mode 100644 index 00000000000..f6dcced5ee6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Lock01.fs @@ -0,0 +1,20 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:1881 + +// Make sure that when targeting NetFx4.0, we follow the new pattern: +// +// bool lockTaken = false; +// try +// { +// Monitor.Enter(obj, ref lockTaken); +// //do stuff +// } +// finally +// { +// if (lockTaken) +// Monitor.Exit(obj); +// } + + +let o = new System.Object() +lock o (fun () -> () ) diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Lock01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Lock01.il.bsl new file mode 100644 index 00000000000..3884536a990 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Lock01.il.bsl @@ -0,0 +1,179 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly Lock01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Lock01 +{ + // Offset: 0x00000000 Length: 0x00000180 +} +.mresource public FSharpOptimizationData.Lock01 +{ + // Offset: 0x00000188 Length: 0x00000064 +} +.module Lock01.exe +// MVID: {611C4D7C-2BCA-B308-A745-03837C4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x071E0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Lock01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit clo@20 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Lock01/clo@20 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method clo@20::.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 2 (0x2) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 20,20 : 19,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Lock01.fs' + IL_0000: ldnull + IL_0001: ret + } // end of method clo@20::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Lock01/clo@20::.ctor() + IL_0005: stsfld class Lock01/clo@20 Lock01/clo@20::@_instance + IL_000a: ret + } // end of method clo@20::.cctor + + } // end of class clo@20 + + .method public specialname static object + get_o() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld object ''.$Lock01::o@19 + IL_0005: ret + } // end of method Lock01::get_o + + .property object o() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get object Lock01::get_o() + } // end of property Lock01::o +} // end of class Lock01 + +.class private abstract auto ansi sealed ''.$Lock01 + extends [mscorlib]System.Object +{ + .field static assembly object o@19 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object o, + [1] object V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_2, + [3] bool V_3) + .line 19,19 : 1,28 '' + IL_0000: newobj instance void [mscorlib]System.Object::.ctor() + IL_0005: dup + IL_0006: stsfld object ''.$Lock01::o@19 + IL_000b: stloc.0 + .line 20,20 : 1,23 '' + IL_000c: call object Lock01::get_o() + IL_0011: stloc.1 + IL_0012: ldsfld class Lock01/clo@20 Lock01/clo@20::@_instance + IL_0017: stloc.2 + IL_0018: ldc.i4.0 + IL_0019: stloc.3 + .try + { + IL_001a: ldloc.1 + IL_001b: ldloca.s V_3 + IL_001d: call void [netstandard]System.Threading.Monitor::Enter(object, + bool&) + IL_0022: ldloc.2 + IL_0023: ldnull + IL_0024: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0029: pop + IL_002a: leave.s IL_0037 + + .line 100001,100001 : 0,0 '' + } // end .try + finally + { + IL_002c: ldloc.3 + IL_002d: brfalse.s IL_0036 + + .line 100001,100001 : 0,0 '' + IL_002f: ldloc.1 + IL_0030: call void [netstandard]System.Threading.Monitor::Exit(object) + IL_0035: endfinally + .line 100001,100001 : 0,0 '' + IL_0036: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_0037: ret + } // end of method $Lock01::main@ + +} // end of class ''.$Lock01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Marshal.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Marshal.fs new file mode 100644 index 00000000000..e6842b9b756 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Marshal.fs @@ -0,0 +1,6 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +open System.Runtime.InteropServices + +type Reader = + delegate of + []data : byte[] * []length : int -> int diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Marshal.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Marshal.il.bsl new file mode 100644 index 00000000000..a72c99aedd5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Marshal.il.bsl @@ -0,0 +1,104 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Marshal +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Marshal +{ + // Offset: 0x00000000 Length: 0x00000507 +} +.mresource public FSharpOptimizationData.Marshal +{ + // Offset: 0x00000510 Length: 0x0000004E +} +.module Marshal.exe +// MVID: {60B68B7F-7500-369C-A745-03837F8BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x068F0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Marshal + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested public Reader + extends [mscorlib]System.MulticastDelegate + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor(object 'object', + native int 'method') runtime managed + { + } // end of method Reader::.ctor + + .method public hidebysig strict virtual + instance int32 Invoke([out] uint8[] marshal([ + 1]) data, + [out] int32 length) runtime managed + { + } // end of method Reader::Invoke + + .method public hidebysig strict virtual + instance class [mscorlib]System.IAsyncResult + BeginInvoke([out] uint8[] marshal([ + 1]) data, + [out] int32 length, + class [mscorlib]System.AsyncCallback callback, + object objects) runtime managed + { + } // end of method Reader::BeginInvoke + + .method public hidebysig strict virtual + instance int32 EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed + { + } // end of method Reader::EndInvoke + + } // end of class Reader + +} // end of class Marshal + +.class private abstract auto ansi sealed ''.$Marshal + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $Marshal::main@ + +} // end of class ''.$Marshal + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline.fs new file mode 100644 index 00000000000..6b651913ae2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline.fs @@ -0,0 +1,11 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression for FSHARP1.0:5782 (Methods with MethodImplAttribute(MethodImplOptions.NoInlining) should not be inlined) +// compile with optimizations turned on: this will force an attempt to inline g() +open System.Runtime.CompilerServices + +[] +let g() = printfn "Hey!" + +let f() = g() + +f() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline.il.bsl new file mode 100644 index 00000000000..af2fb2f1a54 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline.il.bsl @@ -0,0 +1,103 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly MethodImplNoInline +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.MethodImplNoInline +{ + // Offset: 0x00000000 Length: 0x000002FB +} +.mresource public FSharpOptimizationData.MethodImplNoInline +{ + // Offset: 0x00000300 Length: 0x000000F5 +} +.module MethodImplNoInline.exe +// MVID: {611C52A3-4480-09E2-A745-0383A3521C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06F00000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed MethodImplNoInline + extends [mscorlib]System.Object +{ + .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 g() cil managed noinlining + { + // Code size 24 (0x18) + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + IL_0000: ldstr "Hey!" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: stloc.0 + IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0010: ldloc.0 + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [mscorlib]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: ret + } // end of method MethodImplNoInline::g + + .method public static void f() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: tail. + IL_0002: call void MethodImplNoInline::g() + IL_0007: ret + } // end of method MethodImplNoInline::f + +} // end of class MethodImplNoInline + +.class private abstract auto ansi sealed ''.$MethodImplNoInline + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 6 (0x6) + .maxstack 8 + IL_0000: call void MethodImplNoInline::g() + IL_0005: ret + } // end of method $MethodImplNoInline::main@ + +} // end of class ''.$MethodImplNoInline + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline02.fs new file mode 100644 index 00000000000..6074a704773 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline02.fs @@ -0,0 +1,11 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression for FSHARP1.0:5782 (Methods with MethodImplAttribute(MethodImplOptions.NoInlining) should not be inlined) +// compile with optimizations turned on: this will force an attempt to inline g() +open System.Runtime.CompilerServices + +[] +let inline g() = printfn "Hey!" + +let inline f() = g() + +f() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline02.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline02.il.bsl new file mode 100644 index 00000000000..4016869a49c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/MethodImplNoInline02.il.bsl @@ -0,0 +1,103 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly MethodImplNoInline02 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.MethodImplNoInline02 +{ + // Offset: 0x00000000 Length: 0x00000301 +} +.mresource public FSharpOptimizationData.MethodImplNoInline02 +{ + // Offset: 0x00000308 Length: 0x000000F9 +} +.module MethodImplNoInline02.exe +// MVID: {611C52A3-084F-1A8E-A745-0383A3521C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06B60000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed MethodImplNoInline02 + extends [mscorlib]System.Object +{ + .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 g() cil managed noinlining + { + // Code size 24 (0x18) + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + IL_0000: ldstr "Hey!" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: stloc.0 + IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0010: ldloc.0 + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [mscorlib]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: ret + } // end of method MethodImplNoInline02::g + + .method public static void f() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: tail. + IL_0002: call void MethodImplNoInline02::g() + IL_0007: ret + } // end of method MethodImplNoInline02::f + +} // end of class MethodImplNoInline02 + +.class private abstract auto ansi sealed ''.$MethodImplNoInline02 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 6 (0x6) + .maxstack 8 + IL_0000: call void MethodImplNoInline02::g() + IL_0005: ret + } // end of method $MethodImplNoInline02::main@ + +} // end of class ''.$MethodImplNoInline02 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ModuleWithExpression01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ModuleWithExpression01.fs new file mode 100644 index 00000000000..d9dfb9ac86f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ModuleWithExpression01.fs @@ -0,0 +1,9 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:2644 (a module may start with an expression) +// Verify that we can compile a module with an expression in it +// +#light + +module M = + printfn "hello" + let x = 1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ModuleWithExpression01.il.bsl similarity index 50% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ModuleWithExpression01.il.bsl index ec3e916229c..4dbdb7783fe 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/ModuleWithExpression01.il.bsl @@ -13,9 +13,9 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } -.assembly Field +.assembly ModuleWithExpression01 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, int32, @@ -27,99 +27,79 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 } -.mresource public FSharpSignatureData.Field +.mresource public FSharpSignatureData.ModuleWithExpression01 { - // Offset: 0x00000000 Length: 0x000003EA + // Offset: 0x00000000 Length: 0x0000020A } -.mresource public FSharpOptimizationData.Field +.mresource public FSharpOptimizationData.ModuleWithExpression01 { - // Offset: 0x000003F0 Length: 0x000000B8 + // Offset: 0x00000210 Length: 0x000000A6 } -.module Field.dll -// MVID: {61E07031-96F8-CD6E-A745-03833170E061} +.module ModuleWithExpression01.exe +// MVID: {60B68B7F-CD1E-A8B4-A745-03837F8BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x052B0000 +// Image base: 0x07550000 // =============== CLASS MEMBERS DECLARATION =================== -.class public abstract auto ansi sealed M +.class public abstract auto ansi sealed ModuleWithExpression01 extends [mscorlib]System.Object { .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 ) - .class auto ansi serializable nested public ExportAttribute - extends [mscorlib]System.Attribute + .class abstract auto ansi sealed nested public M + extends [mscorlib]System.Object { - .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 80 01 00 00 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) - .method public specialname rtspecialname - instance void .ctor() cil managed + .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 specialname static int32 + get_x() cil managed { - // Code size 9 (0x9) + .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 2 (0x2) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 9,9 : 4,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AttributeTargets\\Field.fs' - IL_0000: ldarg.0 - IL_0001: callvirt instance void [mscorlib]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ret - } // end of method ExportAttribute::.ctor - - } // end of class ExportAttribute - - .method public specialname static int32 - get_T() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: ldsfld int32 ''.$M::T@12 - IL_0005: ret - } // end of method M::get_T + IL_0000: ldc.i4.1 + IL_0001: ret + } // end of method M::get_x - .property int32 T() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 M::get_T() - } // end of property M::T -} // end of class M + .property int32 x() + { + .get int32 ModuleWithExpression01/M::get_x() + } // end of property M::x + } // end of class M -.class private abstract auto ansi sealed ''.$M +} // end of class ModuleWithExpression01 + +.class private abstract auto ansi sealed ''.$ModuleWithExpression01 extends [mscorlib]System.Object { - .field static assembly initonly int32 T@12 - .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .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 private specialname rtspecialname static - void .cctor() cil managed + .method public static void main@() cil managed { - // Code size 26 (0x1a) - .maxstack 4 - .locals init ([0] int32 T) - .line 11,12 : 1,29 '' - IL_0000: nop - .line 12,12 : 10,25 '' - IL_0001: ldstr "hello" - IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0010: pop - .line 12,12 : 27,28 '' - IL_0011: ldc.i4.1 - IL_0012: dup - IL_0013: stsfld int32 ''.$M::T@12 - IL_0018: stloc.0 - IL_0019: ret - } // end of method $M::.cctor - -} // end of class ''.$M + .entrypoint + // Code size 23 (0x17) + .maxstack 3 + .locals init ([0] int32 x) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 8,8 : 5,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\ModuleWithExpression01.fs' + IL_0000: ldstr "hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + .line 9,9 : 5,14 '' + IL_0010: call int32 ModuleWithExpression01/M::get_x() + IL_0015: stloc.0 + IL_0016: ret + } // end of method $ModuleWithExpression01::main@ + +} // end of class ''.$ModuleWithExpression01 // ============================================================= diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NoBoxingOnDispose01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NoBoxingOnDispose01.fs new file mode 100644 index 00000000000..729eb08d4e0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NoBoxingOnDispose01.fs @@ -0,0 +1,7 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for DEV11:11983 +// Title: Calling Dispose with use/using on a Struct results in boxing because of explicit interfaces + +let f1 (x:System.Collections.Generic.List<'T>) = + for a in x do + () diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NoBoxingOnDispose01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NoBoxingOnDispose01.il.bsl new file mode 100644 index 00000000000..5e703f24b53 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NoBoxingOnDispose01.il.bsl @@ -0,0 +1,117 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly NoBoxingOnDispose01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.NoBoxingOnDispose01 +{ + // Offset: 0x00000000 Length: 0x00000216 +} +.mresource public FSharpOptimizationData.NoBoxingOnDispose01 +{ + // Offset: 0x00000220 Length: 0x0000007F +} +.module NoBoxingOnDispose01.exe +// MVID: {61EFEC5E-4EA9-C934-A745-03835EECEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06BA0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed NoBoxingOnDispose01 + extends [mscorlib]System.Object +{ + .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 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,6 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\NoBoxingOnDispose01.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .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_001e + + 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 7,7 : 3,5 '' + IL_001a: nop + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0009 + + IL_001e: leave.s IL_002e + + } // end .try + finally + { + 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_002e: ret + } // end of method NoBoxingOnDispose01::f1 + +} // end of class NoBoxingOnDispose01 + +.class private abstract auto ansi sealed ''.$NoBoxingOnDispose01 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $NoBoxingOnDispose01::main@ + +} // end of class ''.$NoBoxingOnDispose01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NonEscapingArguments02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NonEscapingArguments02.fs new file mode 100644 index 00000000000..dc50b30310a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NonEscapingArguments02.fs @@ -0,0 +1,7 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:3143 + +module NonEscapingArguments02 +type ListSizeCounter<'t>(somelist: 't list) = + let size = List.length somelist + member this.Size = size diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NonEscapingArguments02.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NonEscapingArguments02.il.bsl new file mode 100644 index 00000000000..dd09e377c37 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/NonEscapingArguments02.il.bsl @@ -0,0 +1,105 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly NonEscapingArguments02 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.NonEscapingArguments02 +{ + // Offset: 0x00000000 Length: 0x00000355 +} +.mresource public FSharpOptimizationData.NonEscapingArguments02 +{ + // Offset: 0x00000360 Length: 0x0000019E +} +.module NonEscapingArguments02.dll +// MVID: {61FD32BA-BB56-6582-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06870000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed NonEscapingArguments02 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable nested public beforefieldinit ListSizeCounter`1 + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly int32 size + .method public specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 somelist) cil managed + { + // 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 + IL_0014: ret + } // end of method ListSizeCounter`1::.ctor + + .method public hidebysig specialname + instance int32 get_Size() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 7,7 : 24,28 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 class NonEscapingArguments02/ListSizeCounter`1::size + IL_0006: ret + } // end of method ListSizeCounter`1::get_Size + + .property instance int32 Size() + { + .get instance int32 NonEscapingArguments02/ListSizeCounter`1::get_Size() + } // end of property ListSizeCounter`1::Size + } // end of class ListSizeCounter`1 + +} // end of class NonEscapingArguments02 + +.class private abstract auto ansi sealed ''.$NonEscapingArguments02 + extends [mscorlib]System.Object +{ +} // end of class ''.$NonEscapingArguments02 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/PreserveSig.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/PreserveSig.fs new file mode 100644 index 00000000000..ecc3bd56b61 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/PreserveSig.fs @@ -0,0 +1,7 @@ +namespace Foo + +open System.Runtime.InteropServices + +type Bar = + [] + abstract MyCall: unit -> int32 \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/PreserveSig.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/PreserveSig.il.bsl new file mode 100644 index 00000000000..bbd2fc4fee7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/PreserveSig.il.bsl @@ -0,0 +1,68 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly PreserveSig +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.PreserveSig +{ + // Offset: 0x00000000 Length: 0x000002F1 +} +.mresource public FSharpOptimizationData.PreserveSig +{ + // Offset: 0x000002F8 Length: 0x0000004A +} +.module PreserveSig.dll +// MVID: {60B68B7F-E8CC-64FE-A745-03837F8BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05120000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class interface public abstract auto ansi serializable Foo.Bar +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig abstract virtual + instance int32 MyCall() cil managed preservesig + { + } // end of method Bar::MyCall + +} // end of class Foo.Bar + +.class private abstract auto ansi sealed ''.$PreserveSig + extends [mscorlib]System.Object +{ +} // end of class ''.$PreserveSig + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Seq_for_all01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Seq_for_all01.fs new file mode 100644 index 00000000000..bf3cad05bb8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Seq_for_all01.fs @@ -0,0 +1,7 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let q = Seq.forall (fun s -> + if not true then () + true + ) [ 1 ] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Seq_for_all01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Seq_for_all01.il.bsl new file mode 100644 index 00000000000..e0302a0c9f5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Seq_for_all01.il.bsl @@ -0,0 +1,162 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Seq_for_all01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Seq_for_all01 +{ + // Offset: 0x00000000 Length: 0x000001A7 +} +.mresource public FSharpOptimizationData.Seq_for_all01 +{ + // Offset: 0x000001B0 Length: 0x00000072 +} +.module Seq_for_all01.exe +// MVID: {611C4D7C-D30D-BA80-A745-03837C4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07110000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Seq_for_all01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit q@4 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Seq_for_all01/q@4 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method q@4::.ctor + + .method public strict virtual instance bool + Invoke(int32 s) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 31,47 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Seq_for_all01.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldc.i4.1 + IL_0002: ldc.i4.0 + IL_0003: ceq + .line 100001,100001 : 0,0 '' + IL_0005: nop + .line 100001,100001 : 0,0 '' + IL_0006: brfalse.s IL_000c + + .line 5,5 : 48,50 '' + IL_0008: nop + .line 100001,100001 : 0,0 '' + IL_0009: nop + IL_000a: br.s IL_000d + + .line 100001,100001 : 0,0 '' + IL_000c: nop + .line 6,6 : 31,35 '' + IL_000d: ldc.i4.1 + IL_000e: ret + } // end of method q@4::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Seq_for_all01/q@4::.ctor() + IL_0005: stsfld class Seq_for_all01/q@4 Seq_for_all01/q@4::@_instance + IL_000a: ret + } // end of method q@4::.cctor + + } // end of class q@4 + + .method public specialname static bool + get_q() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld bool ''.$Seq_for_all01::q@4 + IL_0005: ret + } // end of method Seq_for_all01::get_q + + .property bool q() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get bool Seq_for_all01::get_q() + } // end of property Seq_for_all01::q +} // end of class Seq_for_all01 + +.class private abstract auto ansi sealed ''.$Seq_for_all01 + extends [mscorlib]System.Object +{ + .field static assembly bool q@4 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 29 (0x1d) + .maxstack 5 + .locals init ([0] bool q) + .line 4,7 : 1,28 '' + IL_0000: ldsfld class Seq_for_all01/q@4 Seq_for_all01/q@4::@_instance + IL_0005: ldc.i4.1 + IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000b: 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_0010: call bool [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ForAll(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0015: dup + IL_0016: stsfld bool ''.$Seq_for_all01::q@4 + IL_001b: stloc.0 + IL_001c: ret + } // end of method $Seq_for_all01::main@ + +} // end of class ''.$Seq_for_all01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs01.fs new file mode 100644 index 00000000000..aaecc513ea7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs01.fs @@ -0,0 +1,14 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSharp1.0:5057 +// Title: Inefficient access of mutable field of struct + +module Experiment.Test + +type Test = struct + new (i) = {Field = i} + val mutable Field: int +end + +let test() = + let t = new Test(2) + t.Field diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs01.il.bsl new file mode 100644 index 00000000000..e110fbaec2c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs01.il.bsl @@ -0,0 +1,327 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly Structs01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Structs01 +{ + // Offset: 0x00000000 Length: 0x0000073D +} +.mresource public FSharpOptimizationData.Structs01 +{ + // Offset: 0x00000748 Length: 0x00000231 +} +.module Structs01.exe +// MVID: {61EFEE1F-701F-5E27-A745-03831FEEEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06E70000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Experiment.Test + extends [mscorlib]System.Object +{ + .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 ) + .class sequential ansi serializable sealed nested public Test + extends [mscorlib]System.ValueType + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field public int32 Field + .method public hidebysig virtual final + instance int32 CompareTo(valuetype Experiment.Test/Test obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 34 (0x22) + .maxstack 4 + .locals init ([0] valuetype Experiment.Test/Test& 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 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() + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: ldfld int32 Experiment.Test/Test::Field + IL_000f: stloc.2 + IL_0010: ldloc.0 + IL_0011: ldfld int32 Experiment.Test/Test::Field + IL_0016: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0017: ldloc.2 + IL_0018: ldloc.3 + IL_0019: bge.s IL_001d + + .line 100001,100001 : 0,0 '' + IL_001b: ldc.i4.m1 + IL_001c: ret + + .line 100001,100001 : 0,0 '' + IL_001d: ldloc.2 + IL_001e: ldloc.3 + IL_001f: cgt + IL_0021: ret + } // end of method Test::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any Experiment.Test/Test + IL_0007: call instance int32 Experiment.Test/Test::CompareTo(valuetype Experiment.Test/Test) + IL_000c: ret + } // end of method Test::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 40 (0x28) + .maxstack 4 + .locals init ([0] valuetype Experiment.Test/Test V_0, + [1] valuetype Experiment.Test/Test& V_1, + [2] class [mscorlib]System.Collections.IComparer V_2, + [3] int32 V_3, + [4] int32 V_4) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any Experiment.Test/Test + IL_0006: stloc.0 + IL_0007: ldloca.s V_0 + IL_0009: stloc.1 + IL_000a: ldarg.2 + IL_000b: stloc.2 + IL_000c: ldarg.0 + IL_000d: ldfld int32 Experiment.Test/Test::Field + IL_0012: stloc.3 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Experiment.Test/Test::Field + IL_0019: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_001b: ldloc.3 + IL_001c: ldloc.s V_4 + IL_001e: bge.s IL_0022 + + .line 100001,100001 : 0,0 '' + IL_0020: ldc.i4.m1 + IL_0021: ret + + .line 100001,100001 : 0,0 '' + IL_0022: ldloc.3 + IL_0023: ldloc.s V_4 + IL_0025: cgt + IL_0027: ret + } // end of method Test::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 27 (0x1b) + .maxstack 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 + IL_0007: ldarg.1 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: ldfld int32 Experiment.Test/Test::Field + IL_000f: ldloc.0 + IL_0010: ldc.i4.6 + IL_0011: shl + IL_0012: ldloc.0 + IL_0013: ldc.i4.2 + IL_0014: shr + IL_0015: add + IL_0016: add + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: ret + } // end of method Test::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Test::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 39 (0x27) + .maxstack 4 + .locals init ([0] valuetype Experiment.Test/Test V_0, + [1] valuetype Experiment.Test/Test& V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0006: brtrue.s IL_000a + + IL_0008: br.s IL_0025 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any Experiment.Test/Test + IL_0010: stloc.0 + IL_0011: ldloca.s V_0 + IL_0013: stloc.1 + IL_0014: ldarg.2 + IL_0015: stloc.2 + IL_0016: ldarg.0 + IL_0017: ldfld int32 Experiment.Test/Test::Field + IL_001c: ldloc.1 + IL_001d: ldfld int32 Experiment.Test/Test::Field + IL_0022: ceq + IL_0024: ret + + .line 100001,100001 : 0,0 '' + IL_0025: ldc.i4.0 + IL_0026: ret + } // end of method Test::Equals + + .method public specialname rtspecialname + instance void .ctor(int32 i) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 8,8 : 16,27 '' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 Experiment.Test/Test::Field + IL_0007: ret + } // end of method Test::.ctor + + .method public hidebysig virtual final + instance bool Equals(valuetype Experiment.Test/Test obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 18 (0x12) + .maxstack 4 + .locals init (valuetype Experiment.Test/Test& V_0) + IL_0000: ldarga.s obj + IL_0002: stloc.0 + IL_0003: ldarg.0 + IL_0004: ldfld int32 Experiment.Test/Test::Field + IL_0009: ldloc.0 + IL_000a: ldfld int32 Experiment.Test/Test::Field + IL_000f: ceq + IL_0011: ret + } // end of method Test::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 27 (0x1b) + .maxstack 4 + .locals init ([0] valuetype Experiment.Test/Test V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0006: brtrue.s IL_000a + + IL_0008: br.s IL_0019 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any Experiment.Test/Test + IL_0010: stloc.0 + IL_0011: ldarg.0 + IL_0012: ldloc.0 + IL_0013: call instance bool Experiment.Test/Test::Equals(valuetype Experiment.Test/Test) + IL_0018: ret + + .line 100001,100001 : 0,0 '' + IL_0019: ldc.i4.0 + IL_001a: ret + } // end of method Test::Equals + + } // end of class Test + + .method public static int32 test() cil managed + { + // Code size 15 (0xf) + .maxstack 3 + .locals init ([0] valuetype Experiment.Test/Test t) + .line 13,13 : 6,25 '' + IL_0000: ldc.i4.2 + IL_0001: newobj instance void Experiment.Test/Test::.ctor(int32) + IL_0006: stloc.0 + .line 14,14 : 6,13 '' + IL_0007: ldloca.s t + IL_0009: ldfld int32 Experiment.Test/Test::Field + IL_000e: ret + } // end of method Test::test + +} // end of class Experiment.Test + +.class private abstract auto ansi sealed '.$Experiment'.Test + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method Test::main@ + +} // end of class '.$Experiment'.Test + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs02.fs new file mode 100644 index 00000000000..83fdc826755 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs02.fs @@ -0,0 +1,18 @@ +// regression test for 767815: Invalid code is generated when using field initializers in struct constructor + +module Experiment.Test + +[] +type Repro = + val hash : int + new(length) = + { hash = + let mutable h = 0 + for i=0 to length-1 do + h <- 26*h + h + } + +let test() = + let t = Repro(42) + t.hash \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs02.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs02.il.bsl new file mode 100644 index 00000000000..78cbccb0b56 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/Structs02.il.bsl @@ -0,0 +1,381 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly Structs02 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Structs02 +{ + // Offset: 0x00000000 Length: 0x00000777 +} +.mresource public FSharpOptimizationData.Structs02 +{ + // Offset: 0x00000780 Length: 0x00000237 +} +.module Structs02.exe +// MVID: {61EFEE1F-7040-5E27-A745-03831FEEEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07400000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Experiment.Test + extends [mscorlib]System.Object +{ + .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 ) + .class sequential ansi serializable sealed nested public Repro + extends [mscorlib]System.ValueType + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly int32 hash@ + .method public hidebysig specialname + instance int32 get_hash() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Experiment.Test/Repro::hash@ + IL_0006: ret + } // end of method Repro::get_hash + + .method public hidebysig virtual final + instance int32 CompareTo(valuetype Experiment.Test/Repro obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 34 (0x22) + .maxstack 4 + .locals init ([0] valuetype Experiment.Test/Repro& 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 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() + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: ldfld int32 Experiment.Test/Repro::hash@ + IL_000f: stloc.2 + IL_0010: ldloc.0 + IL_0011: ldfld int32 Experiment.Test/Repro::hash@ + IL_0016: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0017: ldloc.2 + IL_0018: ldloc.3 + IL_0019: bge.s IL_001d + + .line 100001,100001 : 0,0 '' + IL_001b: ldc.i4.m1 + IL_001c: ret + + .line 100001,100001 : 0,0 '' + IL_001d: ldloc.2 + IL_001e: ldloc.3 + IL_001f: cgt + IL_0021: ret + } // end of method Repro::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any Experiment.Test/Repro + IL_0007: call instance int32 Experiment.Test/Repro::CompareTo(valuetype Experiment.Test/Repro) + IL_000c: ret + } // end of method Repro::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 40 (0x28) + .maxstack 4 + .locals init ([0] valuetype Experiment.Test/Repro V_0, + [1] valuetype Experiment.Test/Repro& V_1, + [2] class [mscorlib]System.Collections.IComparer V_2, + [3] int32 V_3, + [4] int32 V_4) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any Experiment.Test/Repro + IL_0006: stloc.0 + IL_0007: ldloca.s V_0 + IL_0009: stloc.1 + IL_000a: ldarg.2 + IL_000b: stloc.2 + IL_000c: ldarg.0 + IL_000d: ldfld int32 Experiment.Test/Repro::hash@ + IL_0012: stloc.3 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Experiment.Test/Repro::hash@ + IL_0019: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_001b: ldloc.3 + IL_001c: ldloc.s V_4 + IL_001e: bge.s IL_0022 + + .line 100001,100001 : 0,0 '' + IL_0020: ldc.i4.m1 + IL_0021: ret + + .line 100001,100001 : 0,0 '' + IL_0022: ldloc.3 + IL_0023: ldloc.s V_4 + IL_0025: cgt + IL_0027: ret + } // end of method Repro::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 27 (0x1b) + .maxstack 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 + IL_0007: ldarg.1 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: ldfld int32 Experiment.Test/Repro::hash@ + IL_000f: ldloc.0 + IL_0010: ldc.i4.6 + IL_0011: shl + IL_0012: ldloc.0 + IL_0013: ldc.i4.2 + IL_0014: shr + IL_0015: add + IL_0016: add + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: ret + } // end of method Repro::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Repro::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 39 (0x27) + .maxstack 4 + .locals init ([0] valuetype Experiment.Test/Repro V_0, + [1] valuetype Experiment.Test/Repro& V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0006: brtrue.s IL_000a + + IL_0008: br.s IL_0025 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any Experiment.Test/Repro + IL_0010: stloc.0 + IL_0011: ldloca.s V_0 + IL_0013: stloc.1 + IL_0014: ldarg.2 + IL_0015: stloc.2 + IL_0016: ldarg.0 + IL_0017: ldfld int32 Experiment.Test/Repro::hash@ + IL_001c: ldloc.1 + IL_001d: ldfld int32 Experiment.Test/Repro::hash@ + IL_0022: ceq + IL_0024: ret + + .line 100001,100001 : 0,0 '' + IL_0025: ldc.i4.0 + IL_0026: ret + } // end of method Repro::Equals + + .method public specialname rtspecialname + instance void .ctor(int32 length) cil managed + { + // Code size 37 (0x25) + .maxstack 5 + .locals init ([0] int32 h, + [1] valuetype Experiment.Test/Repro& V_1, + [2] int32 V_2, + [3] int32 i) + .line 9,14 : 5,6 '' + IL_0000: ldarg.0 + .line 10,10 : 9,26 '' + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: stloc.1 + .line 11,11 : 9,12 '' + IL_0004: ldc.i4.0 + IL_0005: stloc.3 + IL_0006: ldarg.1 + IL_0007: ldc.i4.1 + IL_0008: sub + IL_0009: stloc.2 + IL_000a: ldloc.2 + IL_000b: ldloc.3 + IL_000c: blt.s IL_001d + + .line 12,12 : 11,20 '' + IL_000e: ldc.i4.s 26 + IL_0010: ldloc.0 + IL_0011: mul + IL_0012: stloc.0 + IL_0013: ldloc.3 + IL_0014: ldc.i4.1 + IL_0015: add + IL_0016: stloc.3 + .line 11,11 : 17,19 '' + IL_0017: ldloc.3 + IL_0018: ldloc.2 + IL_0019: ldc.i4.1 + IL_001a: add + IL_001b: bne.un.s IL_000e + + IL_001d: ldloc.1 + .line 13,13 : 9,10 '' + IL_001e: ldloc.0 + IL_001f: stfld int32 Experiment.Test/Repro::hash@ + IL_0024: ret + } // end of method Repro::.ctor + + .method public hidebysig virtual final + instance bool Equals(valuetype Experiment.Test/Repro obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 18 (0x12) + .maxstack 4 + .locals init (valuetype Experiment.Test/Repro& V_0) + IL_0000: ldarga.s obj + IL_0002: stloc.0 + IL_0003: ldarg.0 + IL_0004: ldfld int32 Experiment.Test/Repro::hash@ + IL_0009: ldloc.0 + IL_000a: ldfld int32 Experiment.Test/Repro::hash@ + IL_000f: ceq + IL_0011: ret + } // end of method Repro::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 27 (0x1b) + .maxstack 4 + .locals init ([0] valuetype Experiment.Test/Repro V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0006: brtrue.s IL_000a + + IL_0008: br.s IL_0019 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any Experiment.Test/Repro + IL_0010: stloc.0 + IL_0011: ldarg.0 + IL_0012: ldloc.0 + IL_0013: call instance bool Experiment.Test/Repro::Equals(valuetype Experiment.Test/Repro) + IL_0018: ret + + .line 100001,100001 : 0,0 '' + IL_0019: ldc.i4.0 + IL_001a: ret + } // end of method Repro::Equals + + .property instance int32 hash() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 Experiment.Test/Repro::get_hash() + } // end of property Repro::hash + } // end of class Repro + + .method public static int32 test() cil managed + { + // Code size 16 (0x10) + .maxstack 3 + .locals init ([0] valuetype Experiment.Test/Repro t) + .line 17,17 : 5,22 '' + IL_0000: ldc.i4.s 42 + IL_0002: newobj instance void Experiment.Test/Repro::.ctor(int32) + IL_0007: stloc.0 + .line 18,18 : 5,11 '' + IL_0008: ldloca.s t + IL_000a: ldfld int32 Experiment.Test/Repro::hash@ + IL_000f: ret + } // end of method Test::test + +} // end of class Experiment.Test + +.class private abstract auto ansi sealed '.$Experiment'.Test + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method Test::main@ + +} // end of class '.$Experiment'.Test + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/StructsAsArrayElements01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/StructsAsArrayElements01.fs new file mode 100644 index 00000000000..352cec74bfb --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/StructsAsArrayElements01.fs @@ -0,0 +1,24 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:4560 +// Handling of structs as array elements +// For functional tests, see fsharp\core\array +module StructsAsArrayElements01 +[] +type T = + val mutable public i : int + member public this.Set i = this.i <- i + +let a = Array.create 10 Unchecked.defaultof +a.[0].Set 27 + +// This is the incorrect code that used to be generated +// +// L_0000: call valuetype Mmm/T[] Mmm::get_a() +// L_0005: ldc.i4.0 +// L_0006: ldelem.any Mmm/T +// L_000b: stloc.0 +// L_000c: ldloca.s t +// L_000e: ldfld int32 Mmm/T::i@ +// L_0013: ret +// +//Expected: no locals (no stloc.0/ldloca.s t between ldelem and ldfld) diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl new file mode 100644 index 00000000000..305e6e79e47 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl @@ -0,0 +1,351 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly StructsAsArrayElements01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.StructsAsArrayElements01 +{ + // Offset: 0x00000000 Length: 0x00000754 +} +.mresource public FSharpOptimizationData.StructsAsArrayElements01 +{ + // Offset: 0x00000758 Length: 0x0000022C +} +.module StructsAsArrayElements01.dll +// MVID: {61EFEE1F-29F3-6E68-A745-03831FEEEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06EF0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed StructsAsArrayElements01 + extends [mscorlib]System.Object +{ + .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 ) + .class sequential ansi serializable sealed nested public T + extends [mscorlib]System.ValueType + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field public int32 i + .method public hidebysig virtual final + instance int32 CompareTo(valuetype StructsAsArrayElements01/T obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 34 (0x22) + .maxstack 4 + .locals init ([0] valuetype StructsAsArrayElements01/T& 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 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() + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: ldfld int32 StructsAsArrayElements01/T::i + IL_000f: stloc.2 + IL_0010: ldloc.0 + IL_0011: ldfld int32 StructsAsArrayElements01/T::i + IL_0016: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0017: ldloc.2 + IL_0018: ldloc.3 + IL_0019: bge.s IL_001d + + .line 100001,100001 : 0,0 '' + IL_001b: ldc.i4.m1 + IL_001c: ret + + .line 100001,100001 : 0,0 '' + IL_001d: ldloc.2 + IL_001e: ldloc.3 + IL_001f: cgt + IL_0021: ret + } // end of method T::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any StructsAsArrayElements01/T + IL_0007: call instance int32 StructsAsArrayElements01/T::CompareTo(valuetype StructsAsArrayElements01/T) + IL_000c: ret + } // end of method T::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 40 (0x28) + .maxstack 4 + .locals init ([0] valuetype StructsAsArrayElements01/T V_0, + [1] valuetype StructsAsArrayElements01/T& V_1, + [2] class [mscorlib]System.Collections.IComparer V_2, + [3] int32 V_3, + [4] int32 V_4) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any StructsAsArrayElements01/T + IL_0006: stloc.0 + IL_0007: ldloca.s V_0 + IL_0009: stloc.1 + IL_000a: ldarg.2 + IL_000b: stloc.2 + IL_000c: ldarg.0 + IL_000d: ldfld int32 StructsAsArrayElements01/T::i + IL_0012: stloc.3 + IL_0013: ldloc.1 + IL_0014: ldfld int32 StructsAsArrayElements01/T::i + IL_0019: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_001b: ldloc.3 + IL_001c: ldloc.s V_4 + IL_001e: bge.s IL_0022 + + .line 100001,100001 : 0,0 '' + IL_0020: ldc.i4.m1 + IL_0021: ret + + .line 100001,100001 : 0,0 '' + IL_0022: ldloc.3 + IL_0023: ldloc.s V_4 + IL_0025: cgt + IL_0027: ret + } // end of method T::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 27 (0x1b) + .maxstack 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 + IL_0007: ldarg.1 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: ldfld int32 StructsAsArrayElements01/T::i + IL_000f: ldloc.0 + IL_0010: ldc.i4.6 + IL_0011: shl + IL_0012: ldloc.0 + IL_0013: ldc.i4.2 + IL_0014: shr + IL_0015: add + IL_0016: add + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: ret + } // end of method T::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method T::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 39 (0x27) + .maxstack 4 + .locals init ([0] valuetype StructsAsArrayElements01/T V_0, + [1] valuetype StructsAsArrayElements01/T& V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0006: brtrue.s IL_000a + + IL_0008: br.s IL_0025 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any StructsAsArrayElements01/T + IL_0010: stloc.0 + IL_0011: ldloca.s V_0 + IL_0013: stloc.1 + IL_0014: ldarg.2 + IL_0015: stloc.2 + IL_0016: ldarg.0 + IL_0017: ldfld int32 StructsAsArrayElements01/T::i + IL_001c: ldloc.1 + IL_001d: ldfld int32 StructsAsArrayElements01/T::i + IL_0022: ceq + IL_0024: ret + + .line 100001,100001 : 0,0 '' + IL_0025: ldc.i4.0 + IL_0026: ret + } // end of method T::Equals + + .method public hidebysig instance void + Set(int32 i) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 9,9 : 31,42 '' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 StructsAsArrayElements01/T::i + IL_0007: ret + } // end of method T::Set + + .method public hidebysig virtual final + instance bool Equals(valuetype StructsAsArrayElements01/T obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 18 (0x12) + .maxstack 4 + .locals init (valuetype StructsAsArrayElements01/T& V_0) + IL_0000: ldarga.s obj + IL_0002: stloc.0 + IL_0003: ldarg.0 + IL_0004: ldfld int32 StructsAsArrayElements01/T::i + IL_0009: ldloc.0 + IL_000a: ldfld int32 StructsAsArrayElements01/T::i + IL_000f: ceq + IL_0011: ret + } // end of method T::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 27 (0x1b) + .maxstack 4 + .locals init ([0] valuetype StructsAsArrayElements01/T V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0006: brtrue.s IL_000a + + IL_0008: br.s IL_0019 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any StructsAsArrayElements01/T + IL_0010: stloc.0 + IL_0011: ldarg.0 + IL_0012: ldloc.0 + IL_0013: call instance bool StructsAsArrayElements01/T::Equals(valuetype StructsAsArrayElements01/T) + IL_0018: ret + + .line 100001,100001 : 0,0 '' + IL_0019: ldc.i4.0 + IL_001a: ret + } // end of method T::Equals + + } // end of class T + + .method public specialname static valuetype StructsAsArrayElements01/T[] + get_a() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld valuetype StructsAsArrayElements01/T[] ''.$StructsAsArrayElements01::a@11 + IL_0005: ret + } // end of method StructsAsArrayElements01::get_a + + .property valuetype StructsAsArrayElements01/T[] + a() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get valuetype StructsAsArrayElements01/T[] StructsAsArrayElements01::get_a() + } // end of property StructsAsArrayElements01::a +} // end of class StructsAsArrayElements01 + +.class private abstract auto ansi sealed ''.$StructsAsArrayElements01 + extends [mscorlib]System.Object +{ + .field static assembly initonly valuetype StructsAsArrayElements01/T[] a@11 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 35 (0x23) + .maxstack 4 + .locals init ([0] valuetype StructsAsArrayElements01/T[] a, + [1] valuetype StructsAsArrayElements01/T V_1) + .line 11,11 : 1,48 '' + IL_0000: ldc.i4.s 10 + IL_0002: ldloc.1 + IL_0003: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0008: dup + IL_0009: stsfld valuetype StructsAsArrayElements01/T[] ''.$StructsAsArrayElements01::a@11 + IL_000e: stloc.0 + .line 12,12 : 1,13 '' + IL_000f: call valuetype StructsAsArrayElements01/T[] StructsAsArrayElements01::get_a() + IL_0014: ldc.i4.0 + IL_0015: ldelema StructsAsArrayElements01/T + IL_001a: ldc.i4.s 27 + IL_001c: call instance void StructsAsArrayElements01/T::Set(int32) + IL_0021: nop + IL_0022: ret + } // end of method $StructsAsArrayElements01::.cctor + +} // end of class ''.$StructsAsArrayElements01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs new file mode 100644 index 00000000000..53c4fe04035 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs @@ -0,0 +1,7 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +// Verify that the deprecated command line option "--no-generate-filter-blocks" is honored +try + () + with + | e when e.GetHashCode() = 0 -> () + | _ -> () diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl new file mode 100644 index 00000000000..0c8705bf204 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl @@ -0,0 +1,114 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TryWith_NoFilterBlocks01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TryWith_NoFilterBlocks01 +{ + // Offset: 0x00000000 Length: 0x00000159 +} +.mresource public FSharpOptimizationData.TryWith_NoFilterBlocks01 +{ + // Offset: 0x00000160 Length: 0x0000005F +} +.module TryWith_NoFilterBlocks01.exe +// MVID: {61F2AFF9-3DEF-9A40-A745-0383F9AFF261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x057D0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TryWith_NoFilterBlocks01 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class TryWith_NoFilterBlocks01 + +.class private abstract auto ansi sealed ''.$TryWith_NoFilterBlocks01 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 29 (0x1d) + .maxstack 4 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e, + [2] class [mscorlib]System.Exception V_2) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 1,4 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\TryWith_NoFilterBlocks01.fs' + .try + { + IL_0000: nop + .line 4,4 : 3,5 '' + IL_0001: leave.s IL_001c + + .line 5,5 : 2,6 '' + } // end .try + catch [mscorlib]System.Object + { + IL_0003: castclass [mscorlib]System.Exception + IL_0008: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0009: ldloc.0 + IL_000a: stloc.1 + .line 6,6 : 12,31 '' + 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_0016: ldloc.0 + IL_0017: stloc.2 + .line 6,6 : 35,37 '' + IL_0018: leave.s IL_001c + + .line 7,7 : 10,12 '' + IL_001a: leave.s IL_001c + + .line 100001,100001 : 0,0 '' + } // end handler + IL_001c: ret + } // end of method $TryWith_NoFilterBlocks01::main@ + +} // end of class ''.$TryWith_NoFilterBlocks01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.cs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.cs new file mode 100644 index 00000000000..800d4b1e5be --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.cs @@ -0,0 +1,190 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Security; +using System.Security.Permissions; + +namespace CustomSecAttr +{ + [SerializableAttribute()] + public sealed class CustomPermission : CodeAccessPermission, IUnrestrictedPermission + { + private bool unrestricted; + + public CustomPermission(PermissionState state) + { + if (state == PermissionState.Unrestricted) + { + unrestricted = true; + } + else + { + unrestricted = false; + } + } + + //Define the rest of your custom permission here. You must + //implement IsUnrestricted and override the Copy, Intersect, + //IsSubsetOf, ToXML, and FromXML methods. + public bool IsUnrestricted() + { + return unrestricted; + } + + public override IPermission Copy() + { + CustomPermission copy = new CustomPermission(PermissionState.None); + + if (this.IsUnrestricted()) + { + copy.unrestricted = true; + } + else + { + copy.unrestricted = false; + } + return copy; + } + + public override IPermission Intersect(IPermission target) + { + try + { + if (null == target) + { + return null; + } + CustomPermission PassedPermission = (CustomPermission)target; + + if (!PassedPermission.IsUnrestricted()) + { + return PassedPermission; + } + return this.Copy(); + } + catch (InvalidCastException) + { + throw new ArgumentException("Argument_WrongType", this.GetType().FullName); + } + } + + public override bool IsSubsetOf(IPermission target) + { + if (null == target) + { + return !this.unrestricted; + } + try + { + CustomPermission passedpermission = (CustomPermission)target; + if (this.unrestricted == passedpermission.unrestricted) + { + return true; + } + else + { + return false; + } + } + catch (InvalidCastException) + { + throw new ArgumentException("Argument_WrongType", this.GetType().FullName); + } + } + + public override SecurityElement ToXml() + { + SecurityElement element = new SecurityElement("IPermission"); + Type type = this.GetType(); + StringBuilder AssemblyName = new StringBuilder(type.Assembly.ToString()); + AssemblyName.Replace('\"', '\''); + element.AddAttribute("class", type.FullName + ", " + AssemblyName); + element.AddAttribute("version", "1"); + element.AddAttribute("Unrestricted", unrestricted.ToString()); + return element; + } + + public override void FromXml(SecurityElement PassedElement) + { + string element = PassedElement.Attribute("Unrestricted"); + if (null != element) + { + this.unrestricted = Convert.ToBoolean(element); + } + } + } + + // Mark - CustomePermissionAttribute + [AttributeUsageAttribute(AttributeTargets.All, AllowMultiple = true)] + public class CustomPermissionAttribute : CodeAccessSecurityAttribute + { + bool unrestricted = false; + + public new bool Unrestricted + { + get { return unrestricted; } + set { unrestricted = value; } + } + + public CustomPermissionAttribute(SecurityAction action) + : base(action) + { + } + public override IPermission CreatePermission() + { + if (Unrestricted) + { + return new CustomPermission(PermissionState.Unrestricted); + } + else + { + return new CustomPermission(PermissionState.None); + } + } + } + + public enum SecurityArgType + { + A = 1, + B = 2, + C = 3, + } + + // Mark - CustomePermissio2nAttribute + [AttributeUsageAttribute(AttributeTargets.All, AllowMultiple = true)] + //public class CustomPermission2Attribute : CodeAccessSecurityAttribute + public class CustomPermission2Attribute : CustomPermissionAttribute + { + bool unrestricted = false; + SecurityArgType x = SecurityArgType.A; + + public new bool Unrestricted + { + get { return unrestricted; } + set { unrestricted = value; } + } + + public SecurityArgType SecurityArg + { + get { return x; } + set { x = value; } + } + + public CustomPermission2Attribute(SecurityAction action) + : base(action) + { + } + public override IPermission CreatePermission() + { + if (Unrestricted) + { + return new CustomPermission(PermissionState.Unrestricted); + } + else + { + return new CustomPermission(PermissionState.None); + } + } + } +} \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.fs new file mode 100644 index 00000000000..9e8f7e29795 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.fs @@ -0,0 +1,18 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +open CustomSecAttr +open System.Security +open System.Security.Permissions + +module AttrTest = + + + [] + [] + type Foo() = + [] + [] + member x.someMethod() = 6336 + + + [] + do() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.il.bsl new file mode 100644 index 00000000000..84875c94cab --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/cas.il.bsl @@ -0,0 +1,128 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern cas +{ + .ver 0:0:0:0 +} +.assembly cas +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + .custom instance void [cas]CustomSecAttr.CustomPermission2Attribute::.ctor(valuetype [mscorlib]System.Security.Permissions.SecurityAction) = ( 01 00 03 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .permissionset assert + = {[cas]CustomSecAttr.CustomPermission2Attribute = {}} + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.cas +{ + // Offset: 0x00000000 Length: 0x00000619 +} +.mresource public FSharpOptimizationData.cas +{ + // Offset: 0x00000620 Length: 0x000000F3 +} +.module cas.exe +// MVID: {61F2D6A5-35EA-18E3-A745-0383A5D6F261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05050000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Cas + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public AttrTest + extends [mscorlib]System.Object + { + .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 ) + .class auto ansi serializable nested public Foo + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .permissionset linkcheck + = {class 'System.Security.Permissions.SecurityPermissionAttribute, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' = {property enum class 'System.Security.Permissions.SecurityPermissionFlag, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 'Flags' = int32(2)}} + .permissionset demand + = {class 'System.Security.Permissions.PrincipalPermissionAttribute, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' = {property string 'Role' = string('test')}} + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // 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 + IL_0007: pop + IL_0008: ret + } // end of method Foo::.ctor + + .method public hidebysig instance int32 + someMethod() cil managed + { + .permissionset demand + = {class 'System.Security.Permissions.PrincipalPermissionAttribute, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' = {property string 'Role' = string('test')}} + .permissionset assert + = {[cas]CustomSecAttr.CustomPermission2Attribute = {property enum class 'CustomSecAttr.SecurityArgType, cas, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' 'SecurityArg' = int32(2)}} + // Code size 8 (0x8) + .maxstack 3 + .locals init ([0] class Cas/AttrTest/Foo x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 14,14 : 33,37 '' + IL_0002: ldc.i4 0x18c0 + IL_0007: ret + } // end of method Foo::someMethod + + } // end of class Foo + + } // end of class AttrTest + +} // end of class Cas + +.class private abstract auto ansi sealed ''.$Cas + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + .line 18,18 : 7,9 '' + IL_0000: ret + } // end of method $Cas::main@ + +} // end of class ''.$Cas + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/env.lst new file mode 100644 index 00000000000..06f54d7b01e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/env.lst @@ -0,0 +1,54 @@ + SOURCE=AnonRecd.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AnonRecd.exe" # AnonRecd.fs + SOURCE=CodeGenRenamings01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CodeGenRenamings01.exe" # CodeGenRenamings01.fs - + + SOURCE=ArgumentNamesInClosures01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ArgumentNamesInClosures01.dll" # ArgumentNamesInClosures01.fs - + + SOURCE=Decimal01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Decimal01.exe" # Decimal01.fs + + SOURCE=EntryPoint01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd EntryPoint01.exe" # EntryPoint01.fs + + SOURCE=EqualsOnUnions01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd EqualsOnUnions01.exe" # EqualsOnUnions01.fs - + + SOURCE=ForLoop01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop01.exe" # ForLoop01.fs - + + SOURCE=ForLoop02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop02.exe" # ForLoop02.fs + SOURCE=ForLoop03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop03.exe" # ForLoop03.fs + SOURCE=NoBoxingOnDispose01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoBoxingOnDispose01.exe" # NoBoxingOnDispose01.fs + + SOURCE=IfThenElse01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd IfThenElse01.dll" # IfThenElse01.fs + + SOURCE=LetIfThenElse01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetIfThenElse01.exe" # LetIfThenElse01.fs - + + SOURCE=Lock01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Lock01.exe" # Lock01.fs - + + SOURCE=ModuleWithExpression01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ModuleWithExpression01.exe" # ModuleWithExpression01.fs + + SOURCE=NonEscapingArguments02.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NonEscapingArguments02.dll" # NonEscapingArguments02.fs + + SOURCE=Seq_for_all01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Seq_for_all01.exe" # Seq_for_all01.fs + + + SOURCE=StructsAsArrayElements01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StructsAsArrayElements01.dll" # StructsAsArrayElements01.fs - + + SOURCE=PreserveSig.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd PreserveSig.dll" # PreserveSig.fs - + +# The name of this test is a bit misleading for legacy reasons: it used to test the --no-generate-filter-blocks option, which is now gone + SOURCE=TryWith_NoFilterBlocks01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TryWith_NoFilterBlocks01.exe" # TryWith_NoFilterBlocks01.fs + + SOURCE=Structs01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Structs01.exe" # Structs01.fs - + SOURCE=Structs02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Structs02.exe" # Structs02.fs - + + SOURCE=cas.fs PRECMD="\$CSC_PIPE /t:library /reference:System.Core.dll cas.cs" SCFLAGS="-r cas.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd cas.exe" # cas.fs - + + SOURCE=Marshal.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Marshal.exe" # Marshal.fs + SOURCE=MethodImplNoInline.fs SCFLAGS="-O" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplNoInline.exe" # MethodImplNoInline.fs + SOURCE=MethodImplNoInline02.fs SCFLAGS="-O" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplNoInline02.exe" # MethodImplNoInline02.fs + + SOURCE=CustomAttributeGenericParameter01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CustomAttributeGenericParameter01.exe" # CustomAttributeGenericParameter01.fs - + +# Need to create 2.0 baseline + SOURCE=GenericTypeStaticField01.fs SCFLAGS="-g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenericTypeStaticField01.exe" # GenericTypeStaticField01.fs - + + SOURCE=GeneralizationOnUnions01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GeneralizationOnUnions01.exe" # GeneralizationOnUnions01.fs + + SOURCE=AbstractClass.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AbstractClass.exe" # AbstractClass.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/generictypestaticfield01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/generictypestaticfield01.fs new file mode 100644 index 00000000000..e38c268a067 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/generictypestaticfield01.fs @@ -0,0 +1,8 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +type Foo<'a>() = + static let theInstance = new Foo<'a>() + static member Instance = theInstance + +type Bar<'a,'b>() = + static let theInstance = new Bar<'a,'b>() + static member Instance = theInstance diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/keep.lst similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/keep.lst rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Misc/keep.lst diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs new file mode 100644 index 00000000000..5eb45508692 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs @@ -0,0 +1,117 @@ +// #Conformance #DataExpressions #Query +// GroupBy LINQ101 samples converted to query +open System +open System.Collections.Generic +open System.Linq + +// Count - Simple +let factorsOf300 = [2;2;3;5;5] + +let uniqueFactors = + query { + for n in factorsOf300 do + distinct + } |> Seq.length + +// Sum - Simple +let numbers = [ 5; 4; 1; 3; 9; 8; 6; 7; 2; 0 ] + +let numSum = + query { + for n in numbers do + sumBy n + } + +// Sum - Projection +let words = ["cherry"; "apple"; "blueberry"] + +let totalChars = + query { + for w in words do + sumBy (w.Length) + } + +// Sum - Grouped +let products = getProductList() + +let categories = + query { + for p in products do + groupValBy p p.Category into g + let sum = query { + for x in g do + sumBy x.UnitsInStock + } + select (g.Key, sum) + } |> Seq.toArray + +// Min - simple +let minNum = query { for n in numbers do minBy n } + +// Min - Projection +let shortestWord = query { for w in words do minBy w.Length } + +// Min - Grouped +let categories2 = + query { + for p in products do + groupValBy p p.Category into g + let min = query { for x in g do minBy x.UnitPrice } + select (g.Key, min) + } |> Seq.toArray + +// Min - Elements +let categories3 = + query { + for p in products do + groupValBy p p.Category into g + let min = g.Min(fun (p : Product) -> p.UnitPrice) + let cheapestProducts = query { for x in g do where (x.UnitPrice = min) } + select (g.Key, cheapestProducts) + } |> Seq.toArray + +// Max - Simple +let maxNum = query { for n in numbers do maxBy n } + +// Max - Projection +let longestLength = query { for w in words do maxBy w.Length } + +// Max - Grouped +let categories4 = + query { + for p in products do + groupValBy p p.Category into g + let mostExpensivePrice = query { for x in g do maxBy x.UnitPrice } + select (g.Key, mostExpensivePrice) + } |> Seq.toArray + +// Max - Elements +let categories5 = + query { + for p in products do + groupValBy p p.Category into g + let maxPrice = query { for x in g do maxBy x.UnitPrice } + let mostExpensiveProducts = query { for x in g do where (x.UnitPrice = maxPrice) } + select (g.Key, mostExpensiveProducts) + } |> Seq.toArray + +// Average - Simple +let numbers2 = [5.0; 4.0; 1.0; 3.0; 9.0; 8.0; 6.0; 7.0; 2.0; 0.0] +let averageNum = query { for n in numbers2 do averageBy n } + +// Average - Projection +let averageLength = + query { + for w in words do + let wl = w.Length |> float + averageBy wl + } + +// Average - Grouped +let categories6 = + query { + for p in products do + groupValBy p p.Category into g + let averagePrice = query { for x in g do averageBy x.UnitPrice } + select (g.Key, averagePrice) + } |> Seq.toArray \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl new file mode 100644 index 00000000000..c8603a78df6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl @@ -0,0 +1,8009 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern Utils +{ + .ver 0:0:0:0 +} +.assembly extern System.Core +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly Linq101Aggregates01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Linq101Aggregates01 +{ + // Offset: 0x00000000 Length: 0x000005E5 +} +.mresource public FSharpOptimizationData.Linq101Aggregates01 +{ + // Offset: 0x000005F0 Length: 0x00000211 +} +.module Linq101Aggregates01.exe +// MVID: {61FD32BA-D281-4783-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05570000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Linq101Aggregates01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #1 input at line 11@12' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #1 input at line 11@12'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .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\\QueryExpressionStepping\\Linq101Aggregates01.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #1 input at line 11@12'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #1 input at line 11@12'::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::current + IL_0006: ret + } // end of method 'Pipe #1 input at line 11@12'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Aggregates01/'Pipe #1 input at line 11@12'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method 'Pipe #1 input at line 11@12'::GetFreshEnumerator + + } // end of class 'Pipe #1 input at line 11@12' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname numSum@21 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/numSum@21::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method numSum@21::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/numSum@21::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/numSum@21::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/numSum@21::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101Aggregates01/numSum@21::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method numSum@21::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/numSum@21::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method numSum@21::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/numSum@21::current + IL_0006: ret + } // end of method numSum@21::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Aggregates01/numSum@21::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method numSum@21::GetFreshEnumerator + + } // end of class numSum@21 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'numSum@22-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'numSum@22-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'numSum@22-1'::.ctor + + .method public strict virtual instance int32 + Invoke(int32 n) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 22,22 : 15,16 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'numSum@22-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'numSum@22-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'numSum@22-1' Linq101Aggregates01/'numSum@22-1'::@_instance + IL_000a: ret + } // end of method 'numSum@22-1'::.cctor + + } // end of class 'numSum@22-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname totalChars@30 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101Aggregates01/totalChars@30::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method totalChars@30::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] string V_0, + [1] string w) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/totalChars@30::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101Aggregates01/totalChars@30::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method totalChars@30::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method totalChars@30::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101Aggregates01/totalChars@30::current + IL_0006: ret + } // end of method totalChars@30::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Aggregates01/totalChars@30::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method totalChars@30::GetFreshEnumerator + + } // end of class totalChars@30 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'totalChars@31-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'totalChars@31-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'totalChars@31-1'::.ctor + + .method public strict virtual instance int32 + Invoke(string w) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 31,31 : 16,24 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0006: ret + } // end of method 'totalChars@31-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'totalChars@31-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'totalChars@31-1' Linq101Aggregates01/'totalChars@31-1'::@_instance + IL_000a: ret + } // end of method 'totalChars@31-1'::.cctor + + } // end of class 'totalChars@31-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@39' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Aggregates01/'Pipe #2 input at line 38@39'::builder@ + IL_000d: ret + } // end of method 'Pipe #2 input at line 38@39'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 40,40 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #2 input at line 38@39'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #2 input at line 38@39'::Invoke + + } // end of class 'Pipe #2 input at line 38@39' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@40-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #2 input at line 38@40-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 38@40-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 40,40 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #2 input at line 38@40-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #2 input at line 38@40-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #2 input at line 38@40-1' Linq101Aggregates01/'Pipe #2 input at line 38@40-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 38@40-1'::.cctor + + } // end of class 'Pipe #2 input at line 38@40-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@40-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #2 input at line 38@40-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 38@40-2'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 40,40 : 22,32 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #2 input at line 38@40-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #2 input at line 38@40-2'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #2 input at line 38@40-2' Linq101Aggregates01/'Pipe #2 input at line 38@40-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 38@40-2'::.cctor + + } // end of class 'Pipe #2 input at line 38@40-2' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname sum@42 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [System.Core]System.Linq.IGrouping`2 g + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 [Utils]Utils/Product current + .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 public specialname rtspecialname + instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, + class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [Utils]Utils/Product current) cil managed + { + // Code size 36 (0x24) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/sum@42::g + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/sum@42::pc + IL_0015: ldarg.0 + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current + IL_001d: ldarg.0 + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret + } // end of method sum@42::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 150 (0x96) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/sum@42::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0069 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008d + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .line 42,42 : 13,16 '' + IL_0025: nop + .line 42,42 : 13,16 '' + IL_0026: ldarg.0 + 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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/sum@42::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/sum@42::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/sum@42::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/sum@42::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method sum@42::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/sum@42::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method sum@42::get_CheckClose + + .method public strict virtual instance class [Utils]Utils/Product + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current + IL_0006: ret + } // end of method sum@42::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/sum@42::g + IL_0006: ldnull + IL_0007: ldc.i4.0 + IL_0008: ldnull + IL_0009: newobj instance void Linq101Aggregates01/sum@42::.ctor(class [System.Core]System.Linq.IGrouping`2, + class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + class [Utils]Utils/Product) + IL_000e: ret + } // end of method sum@42::GetFreshEnumerator + + } // end of class sum@42 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'sum@43-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'sum@43-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'sum@43-1'::.ctor + + .method public strict virtual instance int32 + Invoke(class [Utils]Utils/Product x) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 43,43 : 19,33 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance int32 [Utils]Utils/Product::get_UnitsInStock() + IL_0008: ret + } // end of method 'sum@43-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'sum@43-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'sum@43-1' Linq101Aggregates01/'sum@43-1'::@_instance + IL_000a: ret + } // end of method 'sum@43-1'::.cctor + + } // end of class 'sum@43-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@40-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,int32>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,int32>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #2 input at line 38@40-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #2 input at line 38@40-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,int32>,object> + Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed + { + // Code size 137 (0x89) + .maxstack 8 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, + [1] int32 sum, + [2] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_3, + [4] class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 V_4, + [5] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_5, + [6] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_6, + [7] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_7, + [8] int32 V_8, + [9] int32 V_9, + [10] class [mscorlib]System.IDisposable V_10) + .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 + IL_0008: ldloc.2 + IL_0009: stloc.3 + IL_000a: ldloc.0 + IL_000b: ldnull + IL_000c: ldc.i4.0 + IL_000d: ldnull + IL_000e: newobj instance void Linq101Aggregates01/sum@42::.ctor(class [System.Core]System.Linq.IGrouping`2, + class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + class [Utils]Utils/Product) + IL_0013: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0018: stloc.s V_4 + IL_001a: ldsfld class Linq101Aggregates01/'sum@43-1' Linq101Aggregates01/'sum@43-1'::@_instance + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0028: stloc.s V_6 + IL_002a: ldloc.s V_6 + IL_002c: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stloc.s V_7 + .try + { + IL_0033: ldc.i4.0 + IL_0034: stloc.s V_9 + IL_0036: ldloc.s V_7 + IL_0038: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_003d: brfalse.s IL_0055 + + IL_003f: ldloc.s V_9 + IL_0041: ldloc.s V_5 + IL_0043: ldloc.s V_7 + IL_0045: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() + IL_004a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_004f: add.ovf + IL_0050: stloc.s V_9 + .line 100001,100001 : 0,0 '' + IL_0052: nop + IL_0053: br.s IL_0036 + + IL_0055: ldloc.s V_9 + IL_0057: stloc.s V_8 + IL_0059: leave.s IL_0071 + + } // end .try + finally + { + IL_005b: ldloc.s V_7 + IL_005d: isinst [mscorlib]System.IDisposable + IL_0062: stloc.s V_10 + .line 100001,100001 : 0,0 '' + IL_0064: ldloc.s V_10 + IL_0066: brfalse.s IL_0070 + + .line 100001,100001 : 0,0 '' + IL_0068: ldloc.s V_10 + IL_006a: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_006f: endfinally + .line 100001,100001 : 0,0 '' + IL_0070: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_0071: ldloc.s V_8 + IL_0073: stloc.1 + .line 45,45 : 9,28 '' + IL_0074: ldarg.0 + IL_0075: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #2 input at line 38@40-3'::builder@ + IL_007a: ldloc.0 + IL_007b: ldloc.1 + IL_007c: newobj instance void class [mscorlib]System.Tuple`2,int32>::.ctor(!0, + !1) + IL_0081: tail. + IL_0083: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,int32>,object>(!!0) + IL_0088: ret + } // end of method 'Pipe #2 input at line 38@40-3'::Invoke + + } // end of class 'Pipe #2 input at line 38@40-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@45-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #2 input at line 38@45-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 38@45-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`2,int32> tupledArg) cil managed + { + // Code size 27 (0x1b) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, + [1] int32 sum) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2,int32>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2,int32>::get_Item2() + IL_000d: stloc.1 + .line 45,45 : 17,27 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0014: ldloc.1 + IL_0015: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_001a: ret + } // end of method 'Pipe #2 input at line 38@45-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #2 input at line 38@45-4'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #2 input at line 38@45-4' Linq101Aggregates01/'Pipe #2 input at line 38@45-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 38@45-4'::.cctor + + } // end of class 'Pipe #2 input at line 38@45-4' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname minNum@49 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/minNum@49::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method minNum@49::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/minNum@49::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/minNum@49::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/minNum@49::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101Aggregates01/minNum@49::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method minNum@49::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/minNum@49::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method minNum@49::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/minNum@49::current + IL_0006: ret + } // end of method minNum@49::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Aggregates01/minNum@49::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method minNum@49::GetFreshEnumerator + + } // end of class minNum@49 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'minNum@49-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'minNum@49-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'minNum@49-1'::.ctor + + .method public strict virtual instance int32 + Invoke(int32 n) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 49,49 : 48,49 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'minNum@49-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'minNum@49-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'minNum@49-1' Linq101Aggregates01/'minNum@49-1'::@_instance + IL_000a: ret + } // end of method 'minNum@49-1'::.cctor + + } // end of class 'minNum@49-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname shortestWord@52 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101Aggregates01/shortestWord@52::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method shortestWord@52::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] string V_0, + [1] string w) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101Aggregates01/shortestWord@52::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method shortestWord@52::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method shortestWord@52::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101Aggregates01/shortestWord@52::current + IL_0006: ret + } // end of method shortestWord@52::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method shortestWord@52::GetFreshEnumerator + + } // end of class shortestWord@52 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'shortestWord@52-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'shortestWord@52-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'shortestWord@52-1'::.ctor + + .method public strict virtual instance int32 + Invoke(string w) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 52,52 : 52,60 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0006: ret + } // end of method 'shortestWord@52-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'shortestWord@52-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'shortestWord@52-1' Linq101Aggregates01/'shortestWord@52-1'::@_instance + IL_000a: ret + } // end of method 'shortestWord@52-1'::.cctor + + } // end of class 'shortestWord@52-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 56@57' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Aggregates01/'Pipe #3 input at line 56@57'::builder@ + IL_000d: ret + } // end of method 'Pipe #3 input at line 56@57'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 58,58 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #3 input at line 56@57'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #3 input at line 56@57'::Invoke + + } // end of class 'Pipe #3 input at line 56@57' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 56@58-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #3 input at line 56@58-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 56@58-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 58,58 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #3 input at line 56@58-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@58-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-1' Linq101Aggregates01/'Pipe #3 input at line 56@58-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 56@58-1'::.cctor + + } // end of class 'Pipe #3 input at line 56@58-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 56@58-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #3 input at line 56@58-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 56@58-2'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 58,58 : 22,32 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #3 input at line 56@58-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@58-2'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-2' Linq101Aggregates01/'Pipe #3 input at line 56@58-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 56@58-2'::.cctor + + } // end of class 'Pipe #3 input at line 56@58-2' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname min@59 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [System.Core]System.Linq.IGrouping`2 g + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 [Utils]Utils/Product current + .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 public specialname rtspecialname + instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, + class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [Utils]Utils/Product current) cil managed + { + // Code size 36 (0x24) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/min@59::g + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/min@59::pc + IL_0015: ldarg.0 + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current + IL_001d: ldarg.0 + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret + } // end of method min@59::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 150 (0x96) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/min@59::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0069 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008d + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .line 59,59 : 27,30 '' + IL_0025: nop + .line 59,59 : 27,30 '' + IL_0026: ldarg.0 + 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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/min@59::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/min@59::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/min@59::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/min@59::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method min@59::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/min@59::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method min@59::get_CheckClose + + .method public strict virtual instance class [Utils]Utils/Product + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current + IL_0006: ret + } // end of method min@59::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/min@59::g + IL_0006: ldnull + IL_0007: ldc.i4.0 + IL_0008: ldnull + IL_0009: 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_000e: ret + } // end of method min@59::GetFreshEnumerator + + } // end of class min@59 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'min@59-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'min@59-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'min@59-1'::.ctor + + .method public strict virtual instance valuetype [mscorlib]System.Decimal + Invoke(class [Utils]Utils/Product x) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 59,59 : 47,58 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_0008: ret + } // end of method 'min@59-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'min@59-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'min@59-1' Linq101Aggregates01/'min@59-1'::@_instance + IL_000a: ret + } // end of method 'min@59-1'::.cctor + + } // end of class 'min@59-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 56@58-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #3 input at line 56@58-3'::.ctor + + .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) + .maxstack 9 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, + [1] valuetype [mscorlib]System.Decimal min) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 59,59 : 19,24 '' + 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_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_001f: 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, + !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 + } // end of method 'Pipe #3 input at line 56@58-3'::Invoke + + } // end of class 'Pipe #3 input at line 56@58-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 56@60-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #3 input at line 56@60-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 56@60-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal> tupledArg) cil managed + { + // Code size 27 (0x1b) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, + [1] valuetype [mscorlib]System.Decimal min) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::get_Item2() + IL_000d: stloc.1 + .line 60,60 : 17,27 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0014: ldloc.1 + IL_0015: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_001a: ret + } // end of method 'Pipe #3 input at line 56@60-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@60-4'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #3 input at line 56@60-4' Linq101Aggregates01/'Pipe #3 input at line 56@60-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 56@60-4'::.cctor + + } // end of class 'Pipe #3 input at line 56@60-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 65@66' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Aggregates01/'Pipe #4 input at line 65@66'::builder@ + IL_000d: ret + } // end of method 'Pipe #4 input at line 65@66'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 67,67 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #4 input at line 65@66'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #4 input at line 65@66'::Invoke + + } // end of class 'Pipe #4 input at line 65@66' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 65@67-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #4 input at line 65@67-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 65@67-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 67,67 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #4 input at line 65@67-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@67-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-1' Linq101Aggregates01/'Pipe #4 input at line 65@67-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 65@67-1'::.cctor + + } // end of class 'Pipe #4 input at line 65@67-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 65@67-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #4 input at line 65@67-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 65@67-2'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 67,67 : 22,32 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #4 input at line 65@67-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@67-2'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-2' Linq101Aggregates01/'Pipe #4 input at line 65@67-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 65@67-2'::.cctor + + } // end of class 'Pipe #4 input at line 65@67-2' + + .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname 'min@68-2' + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .method assembly static valuetype [mscorlib]System.Decimal + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 68,68 : 46,57 '' + IL_0000: ldarg.0 + IL_0001: tail. + IL_0003: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_0008: ret + } // end of method 'min@68-2'::Invoke + + } // end of class 'min@68-2' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname cheapestProducts@69 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [System.Core]System.Linq.IGrouping`2 g + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 [Utils]Utils/Product current + .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 public specialname rtspecialname + instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, + class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [Utils]Utils/Product current) cil managed + { + // Code size 36 (0x24) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/cheapestProducts@69::g + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0015: ldarg.0 + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current + IL_001d: ldarg.0 + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret + } // end of method cheapestProducts@69::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 150 (0x96) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0069 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008d + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .line 69,69 : 40,43 '' + IL_0025: nop + .line 69,69 : 40,43 '' + IL_0026: ldarg.0 + 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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method cheapestProducts@69::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method cheapestProducts@69::get_CheckClose + + .method public strict virtual instance class [Utils]Utils/Product + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current + IL_0006: ret + } // end of method cheapestProducts@69::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/cheapestProducts@69::g + IL_0006: ldnull + IL_0007: ldc.i4.0 + IL_0008: ldnull + IL_0009: newobj instance void Linq101Aggregates01/cheapestProducts@69::.ctor(class [System.Core]System.Linq.IGrouping`2, + class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + class [Utils]Utils/Product) + IL_000e: ret + } // end of method cheapestProducts@69::GetFreshEnumerator + + } // end of class cheapestProducts@69 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'cheapestProducts@69-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public valuetype [mscorlib]System.Decimal min + .method assembly specialname rtspecialname + instance void .ctor(valuetype [mscorlib]System.Decimal min) 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 valuetype [mscorlib]System.Decimal Linq101Aggregates01/'cheapestProducts@69-1'::min + IL_000d: ret + } // end of method 'cheapestProducts@69-1'::.ctor + + .method public strict virtual instance bool + Invoke(class [Utils]Utils/Product x) cil managed + { + // Code size 18 (0x12) + .maxstack 8 + .line 69,69 : 61,78 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_0006: ldarg.0 + IL_0007: ldfld valuetype [mscorlib]System.Decimal Linq101Aggregates01/'cheapestProducts@69-1'::min + IL_000c: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_0011: ret + } // end of method 'cheapestProducts@69-1'::Invoke + + } // end of class 'cheapestProducts@69-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 65@67-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #4 input at line 65@67-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #4 input at line 65@67-3'::.ctor + + .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 81 (0x51) + .maxstack 9 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, + [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 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 68,68 : 9,58 '' + IL_0002: ldloc.0 + IL_0003: ldnull + IL_0004: ldftn valuetype [mscorlib]System.Decimal Linq101Aggregates01/'min@68-2'::Invoke(class [Utils]Utils/Product) + IL_000a: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + 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 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 + IL_001b: ldloc.3 + IL_001c: ldloc.0 + IL_001d: ldnull + IL_001e: ldc.i4.0 + IL_001f: ldnull + IL_0020: newobj instance void Linq101Aggregates01/cheapestProducts@69::.ctor(class [System.Core]System.Linq.IGrouping`2, + class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + class [Utils]Utils/Product) + IL_0025: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_002a: ldloc.1 + IL_002b: newobj instance void Linq101Aggregates01/'cheapestProducts@69-1'::.ctor(valuetype [mscorlib]System.Decimal) + IL_0030: 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_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_003a: stloc.2 + .line 70,70 : 9,41 '' + IL_003b: ldarg.0 + IL_003c: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #4 input at line 65@67-3'::builder@ + IL_0041: ldloc.0 + IL_0042: ldloc.1 + IL_0043: ldloc.2 + IL_0044: newobj instance void class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::.ctor(!0, + !1, + !2) + IL_0049: tail. + IL_004b: 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_0050: ret + } // end of method 'Pipe #4 input at line 65@67-3'::Invoke + + } // end of class 'Pipe #4 input at line 65@67-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 65@70-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Tuple`2>> + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #4 input at line 65@70-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Tuple`2>>::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 65@70-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2> + Invoke(class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1> tupledArg) cil managed + { + // Code size 34 (0x22) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, + [1] valuetype [mscorlib]System.Decimal min, + [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 cheapestProducts) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::get_Item2() + IL_000d: stloc.1 + IL_000e: ldarg.1 + IL_000f: call instance !2 class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::get_Item3() + IL_0014: stloc.2 + .line 70,70 : 17,40 '' + IL_0015: ldloc.0 + IL_0016: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_001b: ldloc.2 + IL_001c: newobj instance void class [mscorlib]System.Tuple`2>::.ctor(!0, + !1) + IL_0021: ret + } // end of method 'Pipe #4 input at line 65@70-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@70-4'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #4 input at line 65@70-4' Linq101Aggregates01/'Pipe #4 input at line 65@70-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 65@70-4'::.cctor + + } // end of class 'Pipe #4 input at line 65@70-4' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname maxNum@74 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/maxNum@74::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method maxNum@74::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/maxNum@74::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101Aggregates01/maxNum@74::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method maxNum@74::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method maxNum@74::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/maxNum@74::current + IL_0006: ret + } // end of method maxNum@74::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method maxNum@74::GetFreshEnumerator + + } // end of class maxNum@74 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'maxNum@74-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'maxNum@74-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'maxNum@74-1'::.ctor + + .method public strict virtual instance int32 + Invoke(int32 n) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 74,74 : 48,49 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'maxNum@74-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'maxNum@74-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'maxNum@74-1' Linq101Aggregates01/'maxNum@74-1'::@_instance + IL_000a: ret + } // end of method 'maxNum@74-1'::.cctor + + } // end of class 'maxNum@74-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname longestLength@77 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101Aggregates01/longestLength@77::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method longestLength@77::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] string V_0, + [1] string w) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/longestLength@77::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101Aggregates01/longestLength@77::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method longestLength@77::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method longestLength@77::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101Aggregates01/longestLength@77::current + IL_0006: ret + } // end of method longestLength@77::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method longestLength@77::GetFreshEnumerator + + } // end of class longestLength@77 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'longestLength@77-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'longestLength@77-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'longestLength@77-1'::.ctor + + .method public strict virtual instance int32 + Invoke(string w) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 77,77 : 53,61 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0006: ret + } // end of method 'longestLength@77-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'longestLength@77-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'longestLength@77-1' Linq101Aggregates01/'longestLength@77-1'::@_instance + IL_000a: ret + } // end of method 'longestLength@77-1'::.cctor + + } // end of class 'longestLength@77-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #5 input at line 81@82' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Aggregates01/'Pipe #5 input at line 81@82'::builder@ + IL_000d: ret + } // end of method 'Pipe #5 input at line 81@82'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 83,83 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #5 input at line 81@82'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #5 input at line 81@82'::Invoke + + } // end of class 'Pipe #5 input at line 81@82' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #5 input at line 81@83-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #5 input at line 81@83-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #5 input at line 81@83-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 83,83 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #5 input at line 81@83-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@83-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-1' Linq101Aggregates01/'Pipe #5 input at line 81@83-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #5 input at line 81@83-1'::.cctor + + } // end of class 'Pipe #5 input at line 81@83-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #5 input at line 81@83-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #5 input at line 81@83-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #5 input at line 81@83-2'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 83,83 : 22,32 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #5 input at line 81@83-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@83-2'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-2' Linq101Aggregates01/'Pipe #5 input at line 81@83-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #5 input at line 81@83-2'::.cctor + + } // end of class 'Pipe #5 input at line 81@83-2' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname mostExpensivePrice@84 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [System.Core]System.Linq.IGrouping`2 g + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 [Utils]Utils/Product current + .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 public specialname rtspecialname + instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, + class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [Utils]Utils/Product current) cil managed + { + // Code size 36 (0x24) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensivePrice@84::g + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0015: ldarg.0 + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current + IL_001d: ldarg.0 + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret + } // end of method mostExpensivePrice@84::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 150 (0x96) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0069 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008d + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .line 84,84 : 42,45 '' + IL_0025: nop + .line 84,84 : 42,45 '' + IL_0026: ldarg.0 + 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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method mostExpensivePrice@84::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method mostExpensivePrice@84::get_CheckClose + + .method public strict virtual instance class [Utils]Utils/Product + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current + IL_0006: ret + } // end of method mostExpensivePrice@84::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensivePrice@84::g + IL_0006: ldnull + IL_0007: ldc.i4.0 + IL_0008: ldnull + IL_0009: 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_000e: ret + } // end of method mostExpensivePrice@84::GetFreshEnumerator + + } // end of class mostExpensivePrice@84 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'mostExpensivePrice@84-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'mostExpensivePrice@84-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'mostExpensivePrice@84-1'::.ctor + + .method public strict virtual instance valuetype [mscorlib]System.Decimal + Invoke(class [Utils]Utils/Product x) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 84,84 : 62,73 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_0008: ret + } // end of method 'mostExpensivePrice@84-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'mostExpensivePrice@84-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'mostExpensivePrice@84-1' Linq101Aggregates01/'mostExpensivePrice@84-1'::@_instance + IL_000a: ret + } // end of method 'mostExpensivePrice@84-1'::.cctor + + } // end of class 'mostExpensivePrice@84-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #5 input at line 81@83-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #5 input at line 81@83-3'::.ctor + + .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) + .maxstack 9 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, + [1] valuetype [mscorlib]System.Decimal mostExpensivePrice) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 84,84 : 34,39 '' + 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_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_001f: 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, + !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 + } // end of method 'Pipe #5 input at line 81@83-3'::Invoke + + } // end of class 'Pipe #5 input at line 81@83-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #5 input at line 81@85-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #5 input at line 81@85-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #5 input at line 81@85-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal> tupledArg) cil managed + { + // Code size 27 (0x1b) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, + [1] valuetype [mscorlib]System.Decimal mostExpensivePrice) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::get_Item2() + IL_000d: stloc.1 + .line 85,85 : 17,42 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0014: ldloc.1 + IL_0015: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_001a: ret + } // end of method 'Pipe #5 input at line 81@85-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@85-4'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #5 input at line 81@85-4' Linq101Aggregates01/'Pipe #5 input at line 81@85-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #5 input at line 81@85-4'::.cctor + + } // end of class 'Pipe #5 input at line 81@85-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 90@91' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Aggregates01/'Pipe #6 input at line 90@91'::builder@ + IL_000d: ret + } // end of method 'Pipe #6 input at line 90@91'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 92,92 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #6 input at line 90@91'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #6 input at line 90@91'::Invoke + + } // end of class 'Pipe #6 input at line 90@91' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 90@92-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #6 input at line 90@92-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #6 input at line 90@92-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 92,92 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #6 input at line 90@92-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@92-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-1' Linq101Aggregates01/'Pipe #6 input at line 90@92-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #6 input at line 90@92-1'::.cctor + + } // end of class 'Pipe #6 input at line 90@92-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 90@92-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #6 input at line 90@92-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #6 input at line 90@92-2'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 92,92 : 22,32 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #6 input at line 90@92-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@92-2'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-2' Linq101Aggregates01/'Pipe #6 input at line 90@92-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #6 input at line 90@92-2'::.cctor + + } // end of class 'Pipe #6 input at line 90@92-2' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname maxPrice@93 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [System.Core]System.Linq.IGrouping`2 g + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 [Utils]Utils/Product current + .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 public specialname rtspecialname + instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, + class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [Utils]Utils/Product current) cil managed + { + // Code size 36 (0x24) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/maxPrice@93::g + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0015: ldarg.0 + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current + IL_001d: ldarg.0 + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret + } // end of method maxPrice@93::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 150 (0x96) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0069 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008d + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .line 93,93 : 32,35 '' + IL_0025: nop + .line 93,93 : 32,35 '' + IL_0026: ldarg.0 + 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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method maxPrice@93::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method maxPrice@93::get_CheckClose + + .method public strict virtual instance class [Utils]Utils/Product + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current + IL_0006: ret + } // end of method maxPrice@93::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/maxPrice@93::g + IL_0006: ldnull + IL_0007: ldc.i4.0 + IL_0008: ldnull + IL_0009: 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_000e: ret + } // end of method maxPrice@93::GetFreshEnumerator + + } // end of class maxPrice@93 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'maxPrice@93-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'maxPrice@93-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'maxPrice@93-1'::.ctor + + .method public strict virtual instance valuetype [mscorlib]System.Decimal + Invoke(class [Utils]Utils/Product x) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 93,93 : 52,63 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_0008: ret + } // end of method 'maxPrice@93-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'maxPrice@93-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'maxPrice@93-1' Linq101Aggregates01/'maxPrice@93-1'::@_instance + IL_000a: ret + } // end of method 'maxPrice@93-1'::.cctor + + } // end of class 'maxPrice@93-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname mostExpensiveProducts@94 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [System.Core]System.Linq.IGrouping`2 g + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 [Utils]Utils/Product current + .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 public specialname rtspecialname + instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, + class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [Utils]Utils/Product current) cil managed + { + // Code size 36 (0x24) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensiveProducts@94::g + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0015: ldarg.0 + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current + IL_001d: ldarg.0 + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret + } // end of method mostExpensiveProducts@94::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 150 (0x96) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0069 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008d + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .line 94,94 : 45,48 '' + IL_0025: nop + .line 94,94 : 45,48 '' + IL_0026: ldarg.0 + 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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method mostExpensiveProducts@94::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method mostExpensiveProducts@94::get_CheckClose + + .method public strict virtual instance class [Utils]Utils/Product + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current + IL_0006: ret + } // end of method mostExpensiveProducts@94::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensiveProducts@94::g + IL_0006: ldnull + IL_0007: ldc.i4.0 + IL_0008: ldnull + IL_0009: 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_000e: ret + } // end of method mostExpensiveProducts@94::GetFreshEnumerator + + } // end of class mostExpensiveProducts@94 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'mostExpensiveProducts@94-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public valuetype [mscorlib]System.Decimal maxPrice + .method assembly specialname rtspecialname + instance void .ctor(valuetype [mscorlib]System.Decimal maxPrice) 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 valuetype [mscorlib]System.Decimal Linq101Aggregates01/'mostExpensiveProducts@94-1'::maxPrice + IL_000d: ret + } // end of method 'mostExpensiveProducts@94-1'::.ctor + + .method public strict virtual instance bool + Invoke(class [Utils]Utils/Product x) cil managed + { + // Code size 18 (0x12) + .maxstack 8 + .line 94,94 : 66,88 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_0006: ldarg.0 + IL_0007: ldfld valuetype [mscorlib]System.Decimal Linq101Aggregates01/'mostExpensiveProducts@94-1'::maxPrice + IL_000c: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_0011: ret + } // end of method 'mostExpensiveProducts@94-1'::Invoke + + } // end of class 'mostExpensiveProducts@94-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 90@92-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #6 input at line 90@92-3'::.ctor + + .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) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 93,93 : 24,29 '' + 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_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_001f: stloc.1 + .line 94,94 : 37,42 '' + 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_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_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_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_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' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 90@95-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Tuple`2>> + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #6 input at line 90@95-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Tuple`2>>::.ctor() + IL_0006: ret + } // end of method 'Pipe #6 input at line 90@95-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2> + Invoke(class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1> tupledArg) cil managed + { + // Code size 34 (0x22) + .maxstack 6 + .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) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::get_Item2() + IL_000d: stloc.1 + IL_000e: ldarg.1 + IL_000f: call instance !2 class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::get_Item3() + IL_0014: stloc.2 + .line 95,95 : 17,45 '' + IL_0015: ldloc.0 + IL_0016: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_001b: ldloc.2 + IL_001c: newobj instance void class [mscorlib]System.Tuple`2>::.ctor(!0, + !1) + IL_0021: ret + } // end of method 'Pipe #6 input at line 90@95-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@95-4'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #6 input at line 90@95-4' Linq101Aggregates01/'Pipe #6 input at line 90@95-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #6 input at line 90@95-4'::.cctor + + } // end of class 'Pipe #6 input at line 90@95-4' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname averageNum@100 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 float64 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + float64 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld float64 Linq101Aggregates01/averageNum@100::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method averageNum@100::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 157 (0x9d) + .maxstack 6 + .locals init ([0] float64 V_0, + [1] float64 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 135 (0x87) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/averageNum@100::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_005d: ldarg.0 + IL_005e: ldc.r8 0.0 + IL_0067: stfld float64 Linq101Aggregates01/averageNum@100::current + IL_006c: leave.s IL_0078 + + } // end .try + catch [mscorlib]System.Object + { + IL_006e: castclass [mscorlib]System.Exception + IL_0073: stloc.1 + IL_0074: ldloc.1 + IL_0075: stloc.0 + IL_0076: leave.s IL_0078 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0078: nop + IL_0079: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_007e: ldloc.0 + IL_007f: ldnull + IL_0080: cgt.un + IL_0082: brfalse.s IL_0086 + + .line 100001,100001 : 0,0 '' + IL_0084: ldloc.0 + IL_0085: throw + + .line 100001,100001 : 0,0 '' + IL_0086: ret + } // end of method averageNum@100::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method averageNum@100::get_CheckClose + + .method public strict virtual instance float64 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld float64 Linq101Aggregates01/averageNum@100::current + IL_0006: ret + } // end of method averageNum@100::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 17 (0x11) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.r8 0.0 + IL_000b: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + float64) + IL_0010: ret + } // end of method averageNum@100::GetFreshEnumerator + + } // end of class averageNum@100 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'averageNum@100-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'averageNum@100-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'averageNum@100-1'::.ctor + + .method public strict virtual instance float64 + Invoke(float64 n) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 100,100 : 57,58 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'averageNum@100-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'averageNum@100-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'averageNum@100-1' Linq101Aggregates01/'averageNum@100-1'::@_instance + IL_000a: ret + } // end of method 'averageNum@100-1'::.cctor + + } // end of class 'averageNum@100-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit averageLength@105 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/averageLength@105::builder@ + IL_000d: ret + } // end of method averageLength@105::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(string _arg1) cil managed + { + // Code size 33 (0x21) + .maxstack 7 + .locals init ([0] string w, + [1] float64 wl, + [2] int32 'Pipe #1 input at line 106') + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 106,106 : 18,26 '' + IL_0002: ldloc.0 + IL_0003: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0008: stloc.2 + .line 106,106 : 30,35 '' + IL_0009: ldloc.2 + IL_000a: conv.r8 + IL_000b: stloc.1 + .line 107,107 : 9,21 '' + 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_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 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'averageLength@107-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64> + { + .field static assembly initonly class Linq101Aggregates01/'averageLength@107-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64>::.ctor() + IL_0006: ret + } // end of method 'averageLength@107-1'::.ctor + + .method public strict virtual instance float64 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 16 (0x10) + .maxstack 5 + .locals init ([0] string w, + [1] float64 wl) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 107,107 : 19,21 '' + IL_000e: ldloc.1 + IL_000f: ret + } // end of method 'averageLength@107-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'averageLength@107-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'averageLength@107-1' Linq101Aggregates01/'averageLength@107-1'::@_instance + IL_000a: ret + } // end of method 'averageLength@107-1'::.cctor + + } // end of class 'averageLength@107-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #7 input at line 112@113' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Aggregates01/'Pipe #7 input at line 112@113'::builder@ + IL_000d: ret + } // end of method 'Pipe #7 input at line 112@113'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 114,114 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #7 input at line 112@113'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #7 input at line 112@113'::Invoke + + } // end of class 'Pipe #7 input at line 112@113' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #7 input at line 112@114-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #7 input at line 112@114-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #7 input at line 112@114-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 114,114 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #7 input at line 112@114-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@114-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-1' Linq101Aggregates01/'Pipe #7 input at line 112@114-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #7 input at line 112@114-1'::.cctor + + } // end of class 'Pipe #7 input at line 112@114-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #7 input at line 112@114-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #7 input at line 112@114-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #7 input at line 112@114-2'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 114,114 : 22,32 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #7 input at line 112@114-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@114-2'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-2' Linq101Aggregates01/'Pipe #7 input at line 112@114-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #7 input at line 112@114-2'::.cctor + + } // end of class 'Pipe #7 input at line 112@114-2' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname averagePrice@115 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [System.Core]System.Linq.IGrouping`2 g + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 [Utils]Utils/Product current + .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 public specialname rtspecialname + instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, + class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [Utils]Utils/Product current) cil managed + { + // Code size 36 (0x24) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/averagePrice@115::g + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0015: ldarg.0 + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current + IL_001d: ldarg.0 + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret + } // end of method averagePrice@115::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 150 (0x96) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0069 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008d + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .line 115,115 : 36,39 '' + IL_0025: nop + .line 115,115 : 36,39 '' + IL_0026: ldarg.0 + 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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method averagePrice@115::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method averagePrice@115::get_CheckClose + + .method public strict virtual instance class [Utils]Utils/Product + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current + IL_0006: ret + } // end of method averagePrice@115::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/averagePrice@115::g + IL_0006: ldnull + IL_0007: ldc.i4.0 + IL_0008: ldnull + IL_0009: newobj instance void Linq101Aggregates01/averagePrice@115::.ctor(class [System.Core]System.Linq.IGrouping`2, + class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + class [Utils]Utils/Product) + IL_000e: ret + } // end of method averagePrice@115::GetFreshEnumerator + + } // end of class averagePrice@115 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'averagePrice@115-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Aggregates01/'averagePrice@115-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'averagePrice@115-1'::.ctor + + .method public strict virtual instance valuetype [mscorlib]System.Decimal + Invoke(class [Utils]Utils/Product x) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 115,115 : 60,71 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_0008: ret + } // end of method 'averagePrice@115-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'averagePrice@115-1'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'averagePrice@115-1' Linq101Aggregates01/'averagePrice@115-1'::@_instance + IL_000a: ret + } // end of method 'averagePrice@115-1'::.cctor + + } // end of class 'averagePrice@115-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #7 input at line 112@114-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #7 input at line 112@114-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #7 input at line 112@114-3'::.ctor + + .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 216 (0xd8) + .maxstack 9 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, + [1] valuetype [mscorlib]System.Decimal averagePrice, + [2] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_3, + [4] class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 V_4, + [5] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_5, + [6] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_6, + [7] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_7, + [8] valuetype [mscorlib]System.Decimal V_8, + [9] valuetype [mscorlib]System.Decimal V_9, + [10] int32 V_10, + [11] valuetype [mscorlib]System.Decimal V_11, + [12] int32 V_12, + [13] class [mscorlib]System.IDisposable V_13) + .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 + IL_0008: ldloc.2 + IL_0009: stloc.3 + IL_000a: ldloc.0 + IL_000b: ldnull + IL_000c: ldc.i4.0 + IL_000d: ldnull + IL_000e: newobj instance void Linq101Aggregates01/averagePrice@115::.ctor(class [System.Core]System.Linq.IGrouping`2, + class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + class [Utils]Utils/Product) + IL_0013: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0018: stloc.s V_4 + IL_001a: ldsfld class Linq101Aggregates01/'averagePrice@115-1' Linq101Aggregates01/'averagePrice@115-1'::@_instance + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0028: stloc.s V_6 + .line 100001,100001 : 0,0 '' + IL_002a: ldloc.s V_6 + IL_002c: box class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_0031: brtrue.s IL_003e + + .line 100001,100001 : 0,0 '' + IL_0033: ldstr "source" + IL_0038: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) + IL_003d: throw + + .line 100001,100001 : 0,0 '' + IL_003e: nop + IL_003f: ldloc.s V_6 + IL_0041: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0046: stloc.s V_7 + .try + { + IL_0048: ldc.i4.0 + IL_0049: ldc.i4.0 + IL_004a: ldc.i4.0 + IL_004b: ldc.i4.0 + IL_004c: ldc.i4.0 + IL_004d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0052: stloc.s V_9 + IL_0054: ldc.i4.0 + IL_0055: stloc.s V_10 + IL_0057: ldloc.s V_7 + IL_0059: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_005e: brfalse.s IL_0080 + + IL_0060: ldloc.s V_9 + IL_0062: ldloc.s V_5 + IL_0064: ldloc.s V_7 + IL_0066: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() + IL_006b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + 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 + IL_0077: ldloc.s V_10 + IL_0079: ldc.i4.1 + IL_007a: add + IL_007b: stloc.s V_10 + .line 100001,100001 : 0,0 '' + IL_007d: nop + IL_007e: br.s IL_0057 + + .line 100001,100001 : 0,0 '' + IL_0080: ldloc.s V_10 + IL_0082: brtrue.s IL_008f + + .line 100001,100001 : 0,0 '' + IL_0084: ldstr "source" + IL_0089: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) + IL_008e: throw + + .line 100001,100001 : 0,0 '' + IL_008f: nop + IL_0090: ldloc.s V_9 + IL_0092: stloc.s V_11 + IL_0094: ldloc.s V_10 + IL_0096: stloc.s V_12 + IL_0098: ldloc.s V_11 + IL_009a: ldloc.s V_12 + IL_009c: call valuetype [netstandard]System.Decimal [netstandard]System.Convert::ToDecimal(int32) + IL_00a1: call valuetype [netstandard]System.Decimal [netstandard]System.Decimal::Divide(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_00a6: stloc.s V_8 + IL_00a8: leave.s IL_00c0 + + } // end .try + finally + { + IL_00aa: ldloc.s V_7 + IL_00ac: isinst [mscorlib]System.IDisposable + IL_00b1: stloc.s V_13 + .line 100001,100001 : 0,0 '' + IL_00b3: ldloc.s V_13 + IL_00b5: brfalse.s IL_00bf + + .line 100001,100001 : 0,0 '' + IL_00b7: ldloc.s V_13 + IL_00b9: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_00be: endfinally + .line 100001,100001 : 0,0 '' + IL_00bf: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_00c0: ldloc.s V_8 + IL_00c2: stloc.1 + .line 116,116 : 9,37 '' + IL_00c3: ldarg.0 + IL_00c4: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #7 input at line 112@114-3'::builder@ + IL_00c9: ldloc.0 + IL_00ca: ldloc.1 + IL_00cb: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, + !1) + IL_00d0: tail. + IL_00d2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) + IL_00d7: ret + } // end of method 'Pipe #7 input at line 112@114-3'::Invoke + + } // end of class 'Pipe #7 input at line 112@114-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #7 input at line 112@116-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Aggregates01/'Pipe #7 input at line 112@116-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #7 input at line 112@116-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal> tupledArg) cil managed + { + // Code size 27 (0x1b) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, + [1] valuetype [mscorlib]System.Decimal averagePrice) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::get_Item2() + IL_000d: stloc.1 + .line 116,116 : 17,36 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0014: ldloc.1 + IL_0015: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_001a: ret + } // end of method 'Pipe #7 input at line 112@116-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@116-4'::.ctor() + IL_0005: stsfld class Linq101Aggregates01/'Pipe #7 input at line 112@116-4' Linq101Aggregates01/'Pipe #7 input at line 112@116-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #7 input at line 112@116-4'::.cctor + + } // end of class 'Pipe #7 input at line 112@116-4' + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_factorsOf300() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::factorsOf300@8 + IL_0005: ret + } // end of method Linq101Aggregates01::get_factorsOf300 + + .method public specialname static int32 + get_uniqueFactors() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$Linq101Aggregates01::uniqueFactors@10 + IL_0005: ret + } // end of method Linq101Aggregates01::get_uniqueFactors + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers@17 + IL_0005: ret + } // end of method Linq101Aggregates01::get_numbers + + .method public specialname static int32 + get_numSum() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$Linq101Aggregates01::numSum@19 + IL_0005: ret + } // end of method Linq101Aggregates01::get_numSum + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_words() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::words@26 + IL_0005: ret + } // end of method Linq101Aggregates01::get_words + + .method public specialname static int32 + get_totalChars() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$Linq101Aggregates01::totalChars@28 + IL_0005: ret + } // end of method Linq101Aggregates01::get_totalChars + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_products() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::products@35 + IL_0005: ret + } // end of method Linq101Aggregates01::get_products + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_categories() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories@37 + IL_0005: ret + } // end of method Linq101Aggregates01::get_categories + + .method public specialname static int32 + get_minNum() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$Linq101Aggregates01::minNum@49 + IL_0005: ret + } // end of method Linq101Aggregates01::get_minNum + + .method public specialname static int32 + get_shortestWord() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$Linq101Aggregates01::shortestWord@52 + IL_0005: ret + } // end of method Linq101Aggregates01::get_shortestWord + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_categories2() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories2@55 + IL_0005: ret + } // end of method Linq101Aggregates01::get_categories2 + + .method public specialname static class [mscorlib]System.Tuple`2>[] + get_categories3() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories3@64 + IL_0005: ret + } // end of method Linq101Aggregates01::get_categories3 + + .method public specialname static int32 + get_maxNum() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$Linq101Aggregates01::maxNum@74 + IL_0005: ret + } // end of method Linq101Aggregates01::get_maxNum + + .method public specialname static int32 + get_longestLength() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$Linq101Aggregates01::longestLength@77 + IL_0005: ret + } // end of method Linq101Aggregates01::get_longestLength + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_categories4() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories4@80 + IL_0005: ret + } // end of method Linq101Aggregates01::get_categories4 + + .method public specialname static class [mscorlib]System.Tuple`2>[] + get_categories5() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories5@89 + IL_0005: ret + } // end of method Linq101Aggregates01::get_categories5 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbers2() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers2@99 + IL_0005: ret + } // end of method Linq101Aggregates01::get_numbers2 + + .method public specialname static float64 + get_averageNum() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld float64 ''.$Linq101Aggregates01::averageNum@100 + IL_0005: ret + } // end of method Linq101Aggregates01::get_averageNum + + .method public specialname static float64 + get_averageLength() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld float64 ''.$Linq101Aggregates01::averageLength@103 + IL_0005: ret + } // end of method Linq101Aggregates01::get_averageLength + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_categories6() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories6@111 + IL_0005: ret + } // end of method Linq101Aggregates01::get_categories6 + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + factorsOf300() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_factorsOf300() + } // end of property Linq101Aggregates01::factorsOf300 + .property int32 uniqueFactors() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 Linq101Aggregates01::get_uniqueFactors() + } // end of property Linq101Aggregates01::uniqueFactors + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() + } // end of property Linq101Aggregates01::numbers + .property int32 numSum() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 Linq101Aggregates01::get_numSum() + } // end of property Linq101Aggregates01::numSum + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + words() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + } // end of property Linq101Aggregates01::words + .property int32 totalChars() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 Linq101Aggregates01::get_totalChars() + } // end of property Linq101Aggregates01::totalChars + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + products() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + } // end of property Linq101Aggregates01::products + .property class [mscorlib]System.Tuple`2[] + categories() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Aggregates01::get_categories() + } // end of property Linq101Aggregates01::categories + .property int32 minNum() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 Linq101Aggregates01::get_minNum() + } // end of property Linq101Aggregates01::minNum + .property int32 shortestWord() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 Linq101Aggregates01::get_shortestWord() + } // end of property Linq101Aggregates01::shortestWord + .property class [mscorlib]System.Tuple`2[] + categories2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Aggregates01::get_categories2() + } // end of property Linq101Aggregates01::categories2 + .property class [mscorlib]System.Tuple`2>[] + categories3() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2>[] Linq101Aggregates01::get_categories3() + } // end of property Linq101Aggregates01::categories3 + .property int32 maxNum() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 Linq101Aggregates01::get_maxNum() + } // end of property Linq101Aggregates01::maxNum + .property int32 longestLength() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 Linq101Aggregates01::get_longestLength() + } // end of property Linq101Aggregates01::longestLength + .property class [mscorlib]System.Tuple`2[] + categories4() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Aggregates01::get_categories4() + } // end of property Linq101Aggregates01::categories4 + .property class [mscorlib]System.Tuple`2>[] + categories5() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2>[] Linq101Aggregates01::get_categories5() + } // end of property Linq101Aggregates01::categories5 + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbers2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers2() + } // end of property Linq101Aggregates01::numbers2 + .property float64 averageNum() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get float64 Linq101Aggregates01::get_averageNum() + } // end of property Linq101Aggregates01::averageNum + .property float64 averageLength() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get float64 Linq101Aggregates01::get_averageLength() + } // end of property Linq101Aggregates01::averageLength + .property class [mscorlib]System.Tuple`2[] + categories6() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Aggregates01::get_categories6() + } // end of property Linq101Aggregates01::categories6 +} // end of class Linq101Aggregates01 + +.class private abstract auto ansi sealed ''.$Linq101Aggregates01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 factorsOf300@8 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 uniqueFactors@10 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers@17 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 numSum@19 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words@26 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 totalChars@28 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@35 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] categories@37 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 minNum@49 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 shortestWord@52 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] categories2@55 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2>[] categories3@64 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 maxNum@74 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 longestLength@77 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] categories4@80 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2>[] categories5@89 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers2@99 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly float64 averageNum@100 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly float64 averageLength@103 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] categories6@111 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 1749 (0x6d5) + .maxstack 13 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 factorsOf300, + [1] int32 uniqueFactors, + [2] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, + [3] int32 numSum, + [4] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words, + [5] int32 totalChars, + [6] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, + [7] class [mscorlib]System.Tuple`2[] categories, + [8] int32 minNum, + [9] int32 shortestWord, + [10] class [mscorlib]System.Tuple`2[] categories2, + [11] class [mscorlib]System.Tuple`2>[] categories3, + [12] int32 maxNum, + [13] int32 longestLength, + [14] class [mscorlib]System.Tuple`2[] categories4, + [15] class [mscorlib]System.Tuple`2>[] categories5, + [16] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers2, + [17] float64 averageNum, + [18] float64 averageLength, + [19] class [mscorlib]System.Tuple`2[] categories6, + [20] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 11', + [21] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_21, + [22] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_22, + [23] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_23, + [24] class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 V_24, + [25] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_25, + [26] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_26, + [27] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_27, + [28] int32 V_28, + [29] int32 V_29, + [30] class [mscorlib]System.IDisposable V_30, + [31] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_31, + [32] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_32, + [33] class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 V_33, + [34] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_34, + [35] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_35, + [36] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_36, + [37] int32 V_37, + [38] int32 V_38, + [39] class [mscorlib]System.IDisposable V_39, + [40] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #2 input at line 38', + [41] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_41, + [42] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #3 input at line 56', + [43] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_43, + [44] class [mscorlib]System.Collections.Generic.IEnumerable`1>> 'Pipe #4 input at line 65', + [45] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_45, + [46] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #5 input at line 81', + [47] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_47, + [48] class [mscorlib]System.Collections.Generic.IEnumerable`1>> 'Pipe #6 input at line 90', + [49] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_49, + [50] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_50, + [51] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_51, + [52] class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 V_52, + [53] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_53, + [54] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_54, + [55] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_55, + [56] float64 V_56, + [57] float64 V_57, + [58] int32 V_58, + [59] float64 V_59, + [60] int32 V_60, + [61] class [mscorlib]System.IDisposable V_61, + [62] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_62, + [63] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_63, + [64] class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable> V_64, + [65] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64> V_65, + [66] class [mscorlib]System.Collections.Generic.IEnumerable`1> V_66, + [67] class [mscorlib]System.Collections.Generic.IEnumerator`1> V_67, + [68] float64 V_68, + [69] float64 V_69, + [70] int32 V_70, + [71] float64 V_71, + [72] int32 V_72, + [73] class [mscorlib]System.IDisposable V_73, + [74] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #7 input at line 112', + [75] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_75) + .line 8,8 : 1,31 '' + IL_0000: ldc.i4.2 + IL_0001: ldc.i4.2 + IL_0002: ldc.i4.3 + IL_0003: ldc.i4.5 + IL_0004: ldc.i4.5 + IL_0005: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000a: 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_000f: 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_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: 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_001e: 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_0023: dup + IL_0024: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::factorsOf300@8 + IL_0029: stloc.0 + .line 11,11 : 5,10 '' + 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: newobj instance void Linq101Aggregates01/'Pipe #1 input at line 11@12'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + 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_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_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_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_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_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_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_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_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_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_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_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_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_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: newobj instance void Linq101Aggregates01/numSum@21::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + 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_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_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_00f5: nop + IL_00f6: br.s IL_00d9 + + IL_00f8: ldloc.s V_29 + IL_00fa: stloc.s V_28 + IL_00fc: leave.s IL_0114 + + } // end .try + finally + { + IL_00fe: ldloc.s V_27 + IL_0100: isinst [mscorlib]System.IDisposable + IL_0105: stloc.s V_30 + .line 100001,100001 : 0,0 '' + IL_0107: ldloc.s V_30 + IL_0109: brfalse.s IL_0113 + + .line 100001,100001 : 0,0 '' + IL_010b: ldloc.s V_30 + IL_010d: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_0112: endfinally + .line 100001,100001 : 0,0 '' + IL_0113: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + 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_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_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_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_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_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_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_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_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_019a: nop + IL_019b: br.s IL_017e + + IL_019d: ldloc.s V_38 + IL_019f: stloc.s V_37 + IL_01a1: leave.s IL_01b9 + + } // end .try + finally + { + IL_01a3: ldloc.s V_36 + IL_01a5: isinst [mscorlib]System.IDisposable + IL_01aa: stloc.s V_39 + .line 100001,100001 : 0,0 '' + IL_01ac: ldloc.s V_39 + IL_01ae: brfalse.s IL_01b8 + + .line 100001,100001 : 0,0 '' + IL_01b0: ldloc.s V_39 + IL_01b2: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_01b7: endfinally + .line 100001,100001 : 0,0 '' + IL_01b8: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + 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_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_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 + .line 39,39 : 9,12 '' + IL_01dd: ldloc.s V_41 + IL_01df: ldloc.s V_41 + 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_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_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_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_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_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_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_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_024e: dup + IL_024f: stsfld int32 ''.$Linq101Aggregates01::minNum@49 + IL_0254: stloc.s minNum + .line 52,52 : 20,25 '' + 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: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + 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_0272: dup + IL_0273: stsfld int32 ''.$Linq101Aggregates01::shortestWord@52 + IL_0278: stloc.s shortestWord + .line 56,56 : 5,10 '' + 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_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_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_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_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_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_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_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 + 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_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_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_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_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_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_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_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_035a: dup + IL_035b: stsfld int32 ''.$Linq101Aggregates01::maxNum@74 + IL_0360: stloc.s maxNum + .line 77,77 : 21,26 '' + 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_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_037e: dup + IL_037f: stsfld int32 ''.$Linq101Aggregates01::longestLength@77 + IL_0384: stloc.s longestLength + .line 81,81 : 5,10 '' + 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_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_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_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_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_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_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_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: 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_051e: ldstr "source" + IL_0523: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) + IL_0528: throw + + .line 100001,100001 : 0,0 '' + 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_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_58 + .line 100001,100001 : 0,0 '' + IL_0563: nop + IL_0564: br.s IL_0541 + + .line 100001,100001 : 0,0 '' + IL_0566: ldloc.s V_58 + IL_0568: brtrue.s IL_0575 + + .line 100001,100001 : 0,0 '' + IL_056a: ldstr "source" + IL_056f: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) + IL_0574: throw + + .line 100001,100001 : 0,0 '' + 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_0588: ldloc.s V_55 + IL_058a: isinst [mscorlib]System.IDisposable + IL_058f: stloc.s V_61 + .line 100001,100001 : 0,0 '' + IL_0591: ldloc.s V_61 + IL_0593: brfalse.s IL_059d + + .line 100001,100001 : 0,0 '' + IL_0595: ldloc.s V_61 + IL_0597: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_059c: endfinally + .line 100001,100001 : 0,0 '' + IL_059d: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + 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_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_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_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_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_05e8: ldstr "source" + IL_05ed: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) + IL_05f2: throw + + .line 100001,100001 : 0,0 '' + 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_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_70 + .line 100001,100001 : 0,0 '' + IL_062d: nop + IL_062e: br.s IL_060b + + .line 100001,100001 : 0,0 '' + IL_0630: ldloc.s V_70 + IL_0632: brtrue.s IL_063f + + .line 100001,100001 : 0,0 '' + IL_0634: ldstr "source" + IL_0639: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) + IL_063e: throw + + .line 100001,100001 : 0,0 '' + 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_0652: ldloc.s V_67 + IL_0654: isinst [mscorlib]System.IDisposable + IL_0659: stloc.s V_73 + .line 100001,100001 : 0,0 '' + IL_065b: ldloc.s V_73 + IL_065d: brfalse.s IL_0667 + + .line 100001,100001 : 0,0 '' + IL_065f: ldloc.s V_73 + IL_0661: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_0666: endfinally + .line 100001,100001 : 0,0 '' + IL_0667: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + 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_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_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_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_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_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_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_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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.fs new file mode 100644 index 00000000000..b43ac72c5da --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.fs @@ -0,0 +1,55 @@ +// #Conformance #DataExpressions #Query +// GroupBy LINQ101 samples converted to query +open System +open System.Collections.Generic +open System.Linq + +// First - simple +let products = getProductList() + +let products12 = + query { + for p in products do + where (p.ProductID = 12) + head + } + +// First - Condition +let strings = [ "zero"; "one"; "two"; "three"; "four"; "five"; "six"; "seven"; "eight"; "nine" ] + +let startsWithO = + query { + for s in strings do + where (s.[0] = 'o') + head + } + +// FirstOrDefault - Simple +let numbers : int list = [] +let firstNumOrDefault = + query { + for n in numbers do + headOrDefault + } + +// FirstOrDefault - Condition +// TODO: DevDiv: 184318 +//let products = getProductList() +// +//let product789 = +// query{ +// for p in products do +// where (p.ProductID = 789) +// headOrDefault +// } +//if product789 <> null then printfn "product789 failed"; raise (new Exception("exit 1")) + +// ElementAt +let numbers2 = [ 5; 4; 1; 3; 9; 8; 6; 7; 2; 0 ] + +let fourthLowNum = + query { + for n in numbers2 do + where (n > 5) + nth 1 + } \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl new file mode 100644 index 00000000000..d87ae14159c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl @@ -0,0 +1,1685 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern Utils +{ + .ver 0:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly Linq101ElementOperators01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Linq101ElementOperators01 +{ + // Offset: 0x00000000 Length: 0x0000037E +} +.mresource public FSharpOptimizationData.Linq101ElementOperators01 +{ + // Offset: 0x00000388 Length: 0x00000127 +} +.module Linq101ElementOperators01.exe +// MVID: {61F2D6A6-19D7-C20D-A745-0383A6D6F261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07130000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Linq101ElementOperators01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname products12@12 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 [Utils]Utils/Product current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [Utils]Utils/Product current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method products12@12::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product p) + .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\\QueryExpressionStepping\\Linq101ElementOperators01.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/products12@12::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/products12@12::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101ElementOperators01/products12@12::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method products12@12::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/products12@12::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method products12@12::get_CheckClose + + .method public strict virtual instance class [Utils]Utils/Product + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current + IL_0006: ret + } // end of method products12@12::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101ElementOperators01/products12@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + class [Utils]Utils/Product) + IL_0008: ret + } // end of method products12@12::GetFreshEnumerator + + } // end of class products12@12 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'products12@13-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101ElementOperators01/'products12@13-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'products12@13-1'::.ctor + + .method public strict virtual instance bool + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 11 (0xb) + .maxstack 8 + .line 13,13 : 16,32 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance int32 [Utils]Utils/Product::get_ProductID() + IL_0006: ldc.i4.s 12 + IL_0008: ceq + IL_000a: ret + } // end of method 'products12@13-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101ElementOperators01/'products12@13-1'::.ctor() + IL_0005: stsfld class Linq101ElementOperators01/'products12@13-1' Linq101ElementOperators01/'products12@13-1'::@_instance + IL_000a: ret + } // end of method 'products12@13-1'::.cctor + + } // end of class 'products12@13-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname startsWithO@22 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101ElementOperators01/startsWithO@22::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method startsWithO@22::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] string V_0, + [1] string s) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101ElementOperators01/startsWithO@22::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method startsWithO@22::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method startsWithO@22::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101ElementOperators01/startsWithO@22::current + IL_0006: ret + } // end of method startsWithO@22::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101ElementOperators01/startsWithO@22::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method startsWithO@22::GetFreshEnumerator + + } // end of class startsWithO@22 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'startsWithO@23-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101ElementOperators01/'startsWithO@23-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'startsWithO@23-1'::.ctor + + .method public strict virtual instance bool + Invoke(string s) cil managed + { + // Code size 12 (0xc) + .maxstack 8 + .line 23,23 : 16,27 '' + IL_0000: ldarg.1 + IL_0001: ldc.i4.0 + IL_0002: callvirt instance char [netstandard]System.String::get_Chars(int32) + IL_0007: ldc.i4.s 111 + IL_0009: ceq + IL_000b: ret + } // end of method 'startsWithO@23-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101ElementOperators01/'startsWithO@23-1'::.ctor() + IL_0005: stsfld class Linq101ElementOperators01/'startsWithO@23-1' Linq101ElementOperators01/'startsWithO@23-1'::@_instance + IL_000a: ret + } // end of method 'startsWithO@23-1'::.cctor + + } // end of class 'startsWithO@23-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname firstNumOrDefault@31 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method firstNumOrDefault@31::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method firstNumOrDefault@31::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method firstNumOrDefault@31::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current + IL_0006: ret + } // end of method firstNumOrDefault@31::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101ElementOperators01/firstNumOrDefault@31::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method firstNumOrDefault@31::GetFreshEnumerator + + } // end of class firstNumOrDefault@31 + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname fourthLowNum@52 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method fourthLowNum@52::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method fourthLowNum@52::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method fourthLowNum@52::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::current + IL_0006: ret + } // end of method fourthLowNum@52::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101ElementOperators01/fourthLowNum@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method fourthLowNum@52::GetFreshEnumerator + + } // end of class fourthLowNum@52 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'fourthLowNum@53-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101ElementOperators01/'fourthLowNum@53-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'fourthLowNum@53-1'::.ctor + + .method public strict virtual instance bool + Invoke(int32 n) cil managed + { + // Code size 5 (0x5) + .maxstack 8 + .line 53,53 : 16,21 '' + IL_0000: ldarg.1 + IL_0001: ldc.i4.5 + IL_0002: cgt + IL_0004: ret + } // end of method 'fourthLowNum@53-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101ElementOperators01/'fourthLowNum@53-1'::.ctor() + IL_0005: stsfld class Linq101ElementOperators01/'fourthLowNum@53-1' Linq101ElementOperators01/'fourthLowNum@53-1'::@_instance + IL_000a: ret + } // end of method 'fourthLowNum@53-1'::.cctor + + } // end of class 'fourthLowNum@53-1' + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_products() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::products@8 + IL_0005: ret + } // end of method Linq101ElementOperators01::get_products + + .method public specialname static class [Utils]Utils/Product + get_products12() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [Utils]Utils/Product ''.$Linq101ElementOperators01::products12@10 + IL_0005: ret + } // end of method Linq101ElementOperators01::get_products12 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_strings() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::strings@18 + IL_0005: ret + } // end of method Linq101ElementOperators01::get_strings + + .method public specialname static string + get_startsWithO() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld string ''.$Linq101ElementOperators01::startsWithO@20 + IL_0005: ret + } // end of method Linq101ElementOperators01::get_startsWithO + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbers() 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 6 (0x6) + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0005: ret + } // end of method Linq101ElementOperators01::get_numbers + + .method public specialname static int32 + get_firstNumOrDefault() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$Linq101ElementOperators01::firstNumOrDefault@29 + IL_0005: ret + } // end of method Linq101ElementOperators01::get_firstNumOrDefault + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbers2() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::numbers2@48 + IL_0005: ret + } // end of method Linq101ElementOperators01::get_numbers2 + + .method public specialname static int32 + get_fourthLowNum() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$Linq101ElementOperators01::fourthLowNum@50 + IL_0005: ret + } // end of method Linq101ElementOperators01::get_fourthLowNum + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + products() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_products() + } // end of property Linq101ElementOperators01::products + .property class [Utils]Utils/Product products12() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [Utils]Utils/Product Linq101ElementOperators01::get_products12() + } // end of property Linq101ElementOperators01::products12 + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + strings() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_strings() + } // end of property Linq101ElementOperators01::strings + .property string startsWithO() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get string Linq101ElementOperators01::get_startsWithO() + } // end of property Linq101ElementOperators01::startsWithO + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbers() + { + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers() + } // end of property Linq101ElementOperators01::numbers + .property int32 firstNumOrDefault() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 Linq101ElementOperators01::get_firstNumOrDefault() + } // end of property Linq101ElementOperators01::firstNumOrDefault + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbers2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers2() + } // end of property Linq101ElementOperators01::numbers2 + .property int32 fourthLowNum() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 Linq101ElementOperators01::get_fourthLowNum() + } // end of property Linq101ElementOperators01::fourthLowNum +} // end of class Linq101ElementOperators01 + +.class private abstract auto ansi sealed ''.$Linq101ElementOperators01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@8 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [Utils]Utils/Product products12@10 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 strings@18 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly string startsWithO@20 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 firstNumOrDefault@29 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers2@48 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 fourthLowNum@50 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 377 (0x179) + .maxstack 13 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, + [1] class [Utils]Utils/Product products12, + [2] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 strings, + [3] string startsWithO, + [4] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, + [5] int32 firstNumOrDefault, + [6] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers2, + [7] int32 fourthLowNum, + [8] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_8, + [9] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_9, + [10] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_10) + .line 8,8 : 1,32 '' + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + 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 + IL_0013: ldloc.s V_8 + IL_0015: ldloc.s V_8 + IL_0017: ldnull + IL_0018: ldc.i4.0 + IL_0019: ldnull + IL_001a: newobj instance void Linq101ElementOperators01/products12@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + class [Utils]Utils/Product) + IL_001f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0024: ldsfld class Linq101ElementOperators01/'products12@13-1' Linq101ElementOperators01/'products12@13-1'::@_instance + IL_0029: 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_002e: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Head(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_0033: dup + IL_0034: stsfld class [Utils]Utils/Product ''.$Linq101ElementOperators01::products12@10 + IL_0039: stloc.1 + .line 18,18 : 1,97 '' + IL_003a: ldstr "zero" + IL_003f: ldstr "one" + IL_0044: ldstr "two" + IL_0049: ldstr "three" + IL_004e: ldstr "four" + IL_0053: ldstr "five" + IL_0058: ldstr "six" + IL_005d: ldstr "seven" + IL_0062: ldstr "eight" + IL_0067: ldstr "nine" + IL_006c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0071: 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_0076: 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_007b: 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_0080: 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_0085: 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_008a: 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_008f: 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_0094: 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_0099: 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_009e: 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_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 + IL_00b1: ldloc.s V_9 + IL_00b3: ldloc.s V_9 + IL_00b5: ldnull + IL_00b6: ldc.i4.0 + IL_00b7: ldnull + IL_00b8: newobj instance void Linq101ElementOperators01/startsWithO@22::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_00bd: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00c2: ldsfld class Linq101ElementOperators01/'startsWithO@23-1' Linq101ElementOperators01/'startsWithO@23-1'::@_instance + IL_00c7: 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_00cc: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Head(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_00d1: dup + IL_00d2: stsfld string ''.$Linq101ElementOperators01::startsWithO@20 + IL_00d7: stloc.3 + .line 28,28 : 1,28 '' + 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: 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: 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 + .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, + 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, + 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, + 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, + 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, + 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, + 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, + 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, + 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, + 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, + 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 + .line 51,51 : 5,10 '' + 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: 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, + 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, + int32) + 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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs new file mode 100644 index 00000000000..5391f1b5b1d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs @@ -0,0 +1,58 @@ +// #Conformance #DataExpressions #Query +// GroupBy LINQ101 samples converted to query +open System +open System.Collections.Generic +open System.Linq + +let digits = [ "zero"; "one"; "two"; "three"; "four"; "five"; "six"; "seven"; "eight"; "nine" ] + +// GroupBy - Simple 1 +let numbers = [ 5; 4; 1; 3; 9; 8; 6; 7; 2; 0 ] + +let numberGroups = + query { + for n in numbers do + groupValBy n (n % 5) into g + select (g.Key, g.ToArray()) + } |> Seq.toArray + +// GroupBy - Simple 2 +let words = ["blueberry"; "chimpanzee"; "abacus"; "banana"; "apple"; "cheese" ] + +let wordGroups = + query { + for w in words do + groupValBy w (w.[0]) into g + select (g.Key, g.ToArray()) + } |> Seq.toArray + +// GroupBy - Simple 3 +let products = getProductList() + +let orderGroups = + query { + for p in products do + groupValBy p p.Category into g + select (g.Key, g.ToArray()) + } |> Seq.toArray + +// GroupBy - Nested +let customers = getCustomerList() + +let customerOrderGroups = + query { + for c in customers do + let yearGroups = + query { + for o in c.Orders do + groupValBy o (o.OrderDate.Year) into yg + let monthGroups = + query { + for o in yg do + groupValBy o (o.OrderDate.Month) into mg + select (mg.Key, mg.ToArray()) + } + select (yg.Key, monthGroups.ToArray()) + } + select (c.CompanyName, yearGroups.ToArray()) + } |> Seq.toArray \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl new file mode 100644 index 00000000000..465ac26c138 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl @@ -0,0 +1,1696 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern System.Core +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern Utils +{ + .ver 0:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly Linq101Grouping01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Linq101Grouping01 +{ + // Offset: 0x00000000 Length: 0x00000403 +} +.mresource public FSharpOptimizationData.Linq101Grouping01 +{ + // Offset: 0x00000408 Length: 0x00000129 +} +.module Linq101Grouping01.exe +// MVID: {61FD32BA-FB79-E5BF-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06EB0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Linq101Grouping01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 13@14' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Grouping01/'Pipe #1 input at line 13@14'::builder@ + IL_000d: ret + } // end of method 'Pipe #1 input at line 13@14'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(int32 _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] int32 n) + .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\\QueryExpressionStepping\\Linq101Grouping01.fs' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 15,15 : 9,29 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #1 input at line 13@14'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #1 input at line 13@14'::Invoke + + } // end of class 'Pipe #1 input at line 13@14' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 13@15-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Grouping01/'Pipe #1 input at line 13@15-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 13@15-1'::.ctor + + .method public strict virtual instance int32 + Invoke(int32 n) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 15,15 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #1 input at line 13@15-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'Pipe #1 input at line 13@15-1'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'Pipe #1 input at line 13@15-1' Linq101Grouping01/'Pipe #1 input at line 13@15-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 13@15-1'::.cctor + + } // end of class 'Pipe #1 input at line 13@15-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 13@15-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Grouping01/'Pipe #1 input at line 13@15-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 13@15-2'::.ctor + + .method public strict virtual instance int32 + Invoke(int32 n) cil managed + { + // Code size 4 (0x4) + .maxstack 8 + .line 15,15 : 23,28 '' + IL_0000: ldarg.1 + IL_0001: ldc.i4.5 + IL_0002: rem + IL_0003: ret + } // end of method 'Pipe #1 input at line 13@15-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'Pipe #1 input at line 13@15-2'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'Pipe #1 input at line 13@15-2' Linq101Grouping01/'Pipe #1 input at line 13@15-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 13@15-2'::.cctor + + } // end of class 'Pipe #1 input at line 13@15-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 13@15-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #1 input at line 13@15-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #1 input at line 13@15-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g) + .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 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_0010: ret + } // end of method 'Pipe #1 input at line 13@15-3'::Invoke + + } // end of class 'Pipe #1 input at line 13@15-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 13@16-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Grouping01/'Pipe #1 input at line 13@16-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 13@16-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [System.Core]System.Linq.IGrouping`2 g) cil managed + { + // Code size 18 (0x12) + .maxstack 8 + .line 16,16 : 17,35 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0006: ldarg.1 + IL_0007: call !!0[] [System.Core]System.Linq.Enumerable::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000c: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0011: ret + } // end of method 'Pipe #1 input at line 13@16-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'Pipe #1 input at line 13@16-4'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'Pipe #1 input at line 13@16-4' Linq101Grouping01/'Pipe #1 input at line 13@16-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 13@16-4'::.cctor + + } // end of class 'Pipe #1 input at line 13@16-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 23@24' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Grouping01/'Pipe #2 input at line 23@24'::builder@ + IL_000d: ret + } // end of method 'Pipe #2 input at line 23@24'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(string _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] string w) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 25,25 : 9,29 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #2 input at line 23@24'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #2 input at line 23@24'::Invoke + + } // end of class 'Pipe #2 input at line 23@24' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 23@25-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Grouping01/'Pipe #2 input at line 23@25-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 23@25-1'::.ctor + + .method public strict virtual instance string + Invoke(string w) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 25,25 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #2 input at line 23@25-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'Pipe #2 input at line 23@25-1'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'Pipe #2 input at line 23@25-1' Linq101Grouping01/'Pipe #2 input at line 23@25-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 23@25-1'::.cctor + + } // end of class 'Pipe #2 input at line 23@25-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 23@25-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Grouping01/'Pipe #2 input at line 23@25-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 23@25-2'::.ctor + + .method public strict virtual instance char + Invoke(string w) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 25,25 : 23,28 '' + IL_0000: ldarg.1 + IL_0001: ldc.i4.0 + IL_0002: callvirt instance char [netstandard]System.String::get_Chars(int32) + IL_0007: ret + } // end of method 'Pipe #2 input at line 23@25-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'Pipe #2 input at line 23@25-2'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'Pipe #2 input at line 23@25-2' Linq101Grouping01/'Pipe #2 input at line 23@25-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 23@25-2'::.cctor + + } // end of class 'Pipe #2 input at line 23@25-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 23@25-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #2 input at line 23@25-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #2 input at line 23@25-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g) + .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 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_0010: ret + } // end of method 'Pipe #2 input at line 23@25-3'::Invoke + + } // end of class 'Pipe #2 input at line 23@25-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 23@26-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Grouping01/'Pipe #2 input at line 23@26-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 23@26-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [System.Core]System.Linq.IGrouping`2 g) cil managed + { + // Code size 18 (0x12) + .maxstack 8 + .line 26,26 : 17,35 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0006: ldarg.1 + IL_0007: call !!0[] [System.Core]System.Linq.Enumerable::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000c: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0011: ret + } // end of method 'Pipe #2 input at line 23@26-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'Pipe #2 input at line 23@26-4'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'Pipe #2 input at line 23@26-4' Linq101Grouping01/'Pipe #2 input at line 23@26-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 23@26-4'::.cctor + + } // end of class 'Pipe #2 input at line 23@26-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 33@34' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Grouping01/'Pipe #3 input at line 33@34'::builder@ + IL_000d: ret + } // end of method 'Pipe #3 input at line 33@34'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 35,35 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #3 input at line 33@34'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #3 input at line 33@34'::Invoke + + } // end of class 'Pipe #3 input at line 33@34' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 33@35-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Grouping01/'Pipe #3 input at line 33@35-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 33@35-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 35,35 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #3 input at line 33@35-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'Pipe #3 input at line 33@35-1'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'Pipe #3 input at line 33@35-1' Linq101Grouping01/'Pipe #3 input at line 33@35-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 33@35-1'::.cctor + + } // end of class 'Pipe #3 input at line 33@35-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 33@35-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Grouping01/'Pipe #3 input at line 33@35-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 33@35-2'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 35,35 : 22,32 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #3 input at line 33@35-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'Pipe #3 input at line 33@35-2'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'Pipe #3 input at line 33@35-2' Linq101Grouping01/'Pipe #3 input at line 33@35-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 33@35-2'::.cctor + + } // end of class 'Pipe #3 input at line 33@35-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 33@35-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #3 input at line 33@35-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #3 input at line 33@35-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g) + .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 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_0010: ret + } // end of method 'Pipe #3 input at line 33@35-3'::Invoke + + } // end of class 'Pipe #3 input at line 33@35-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 33@36-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Grouping01/'Pipe #3 input at line 33@36-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 33@36-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [System.Core]System.Linq.IGrouping`2 g) cil managed + { + // Code size 18 (0x12) + .maxstack 8 + .line 36,36 : 17,35 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0006: ldarg.1 + IL_0007: call !!0[] [System.Core]System.Linq.Enumerable::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000c: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0011: ret + } // end of method 'Pipe #3 input at line 33@36-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'Pipe #3 input at line 33@36-4'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'Pipe #3 input at line 33@36-4' Linq101Grouping01/'Pipe #3 input at line 33@36-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 33@36-4'::.cctor + + } // end of class 'Pipe #3 input at line 33@36-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit yearGroups@47 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Grouping01/yearGroups@47::builder@ + IL_000d: ret + } // end of method yearGroups@47::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Order _arg2) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 48,48 : 17,48 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/yearGroups@47::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method yearGroups@47::Invoke + + } // end of class yearGroups@47 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'yearGroups@48-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Grouping01/'yearGroups@48-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'yearGroups@48-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Order + Invoke(class [Utils]Utils/Order o) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 48,48 : 28,29 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'yearGroups@48-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'yearGroups@48-1'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'yearGroups@48-1' Linq101Grouping01/'yearGroups@48-1'::@_instance + IL_000a: ret + } // end of method 'yearGroups@48-1'::.cctor + + } // end of class 'yearGroups@48-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'yearGroups@48-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Grouping01/'yearGroups@48-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'yearGroups@48-2'::.ctor + + .method public strict virtual instance int32 + Invoke(class [Utils]Utils/Order o) cil managed + { + // Code size 15 (0xf) + .maxstack 5 + .locals init ([0] valuetype [mscorlib]System.DateTime V_0) + .line 48,48 : 31,47 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance valuetype [mscorlib]System.DateTime [Utils]Utils/Order::get_OrderDate() + IL_0006: stloc.0 + IL_0007: ldloca.s V_0 + IL_0009: call instance int32 [mscorlib]System.DateTime::get_Year() + IL_000e: ret + } // end of method 'yearGroups@48-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'yearGroups@48-2'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'yearGroups@48-2' Linq101Grouping01/'yearGroups@48-2'::@_instance + IL_000a: ret + } // end of method 'yearGroups@48-2'::.cctor + + } // end of class 'yearGroups@48-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit monthGroups@51 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Grouping01/monthGroups@51::builder@ + IL_000d: ret + } // end of method monthGroups@51::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Order _arg4) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 52,52 : 25,57 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/monthGroups@51::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method monthGroups@51::Invoke + + } // end of class monthGroups@51 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'monthGroups@52-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Grouping01/'monthGroups@52-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'monthGroups@52-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Order + Invoke(class [Utils]Utils/Order o) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 52,52 : 36,37 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'monthGroups@52-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'monthGroups@52-1'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'monthGroups@52-1' Linq101Grouping01/'monthGroups@52-1'::@_instance + IL_000a: ret + } // end of method 'monthGroups@52-1'::.cctor + + } // end of class 'monthGroups@52-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'monthGroups@52-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Grouping01/'monthGroups@52-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'monthGroups@52-2'::.ctor + + .method public strict virtual instance int32 + Invoke(class [Utils]Utils/Order o) cil managed + { + // Code size 15 (0xf) + .maxstack 5 + .locals init ([0] valuetype [mscorlib]System.DateTime V_0) + .line 52,52 : 39,56 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance valuetype [mscorlib]System.DateTime [Utils]Utils/Order::get_OrderDate() + IL_0006: stloc.0 + IL_0007: ldloca.s V_0 + IL_0009: call instance int32 [mscorlib]System.DateTime::get_Month() + IL_000e: ret + } // end of method 'monthGroups@52-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'monthGroups@52-2'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'monthGroups@52-2' Linq101Grouping01/'monthGroups@52-2'::@_instance + IL_000a: ret + } // end of method 'monthGroups@52-2'::.cctor + + } // end of class 'monthGroups@52-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'monthGroups@52-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'monthGroups@52-3'::builder@ + IL_000d: ret + } // end of method 'monthGroups@52-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [System.Core]System.Linq.IGrouping`2 _arg5) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 mg) + .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 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_0010: ret + } // end of method 'monthGroups@52-3'::Invoke + + } // end of class 'monthGroups@52-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'monthGroups@53-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Grouping01/'monthGroups@53-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'monthGroups@53-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [System.Core]System.Linq.IGrouping`2 mg) cil managed + { + // Code size 18 (0x12) + .maxstack 8 + .line 53,53 : 33,53 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0006: ldarg.1 + IL_0007: call !!0[] [System.Core]System.Linq.Enumerable::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000c: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0011: ret + } // end of method 'monthGroups@53-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'monthGroups@53-4'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'monthGroups@53-4' Linq101Grouping01/'monthGroups@53-4'::@_instance + IL_000a: ret + } // end of method 'monthGroups@53-4'::.cctor + + } // end of class 'monthGroups@53-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'yearGroups@48-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.Generic.IEnumerable`1>>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,class [mscorlib]System.Collections.Generic.IEnumerable`1>>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'yearGroups@48-3'::builder@ + IL_000d: ret + } // end of method 'yearGroups@48-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.Generic.IEnumerable`1>>,object> + Invoke(class [System.Core]System.Linq.IGrouping`2 _arg3) cil managed + { + // Code size 93 (0x5d) + .maxstack 10 + .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 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 + 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 + IL_000e: 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_0013: ldloc.2 + IL_0014: newobj instance void Linq101Grouping01/monthGroups@51::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0019: 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_001e: ldsfld class Linq101Grouping01/'monthGroups@52-1' Linq101Grouping01/'monthGroups@52-1'::@_instance + IL_0023: ldsfld class Linq101Grouping01/'monthGroups@52-2' Linq101Grouping01/'monthGroups@52-2'::@_instance + IL_0028: 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_002d: ldloc.2 + IL_002e: newobj instance void Linq101Grouping01/'monthGroups@52-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0033: 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_0038: ldsfld class Linq101Grouping01/'monthGroups@53-4' Linq101Grouping01/'monthGroups@53-4'::@_instance + IL_003d: 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_0042: 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_0047: stloc.1 + .line 55,55 : 17,55 '' + IL_0048: ldarg.0 + IL_0049: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'yearGroups@48-3'::builder@ + IL_004e: ldloc.0 + IL_004f: ldloc.1 + IL_0050: newobj instance void class [mscorlib]System.Tuple`2,class [mscorlib]System.Collections.Generic.IEnumerable`1>>::.ctor(!0, + !1) + IL_0055: tail. + IL_0057: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,class [mscorlib]System.Collections.Generic.IEnumerable`1>>,object>(!!0) + IL_005c: ret + } // end of method 'yearGroups@48-3'::Invoke + + } // end of class 'yearGroups@48-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'yearGroups@55-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Collections.Generic.IEnumerable`1>>,class [mscorlib]System.Tuple`2[]>> + { + .field static assembly initonly class Linq101Grouping01/'yearGroups@55-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Collections.Generic.IEnumerable`1>>,class [mscorlib]System.Tuple`2[]>>::.ctor() + IL_0006: ret + } // end of method 'yearGroups@55-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2[]> + Invoke(class [mscorlib]System.Tuple`2,class [mscorlib]System.Collections.Generic.IEnumerable`1>> tupledArg) cil managed + { + // Code size 32 (0x20) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 yg, + [1] class [mscorlib]System.Collections.Generic.IEnumerable`1> monthGroups) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2,class [mscorlib]System.Collections.Generic.IEnumerable`1>>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2,class [mscorlib]System.Collections.Generic.IEnumerable`1>>::get_Item2() + IL_000d: stloc.1 + .line 55,55 : 25,54 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0014: ldloc.1 + IL_0015: call !!0[] [System.Core]System.Linq.Enumerable::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_001a: newobj instance void class [mscorlib]System.Tuple`2[]>::.ctor(!0, + !1) + IL_001f: ret + } // end of method 'yearGroups@55-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'yearGroups@55-4'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'yearGroups@55-4' Linq101Grouping01/'yearGroups@55-4'::@_instance + IL_000a: ret + } // end of method 'yearGroups@55-4'::.cctor + + } // end of class 'yearGroups@55-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 43@44' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2[]>>>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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[]>>>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #4 input at line 43@44'::builder@ + IL_000d: ret + } // end of method 'Pipe #4 input at line 43@44'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2[]>>>,object> + Invoke(class [Utils]Utils/Customer _arg1) cil managed + { + // Code size 98 (0x62) + .maxstack 10 + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .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 + 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 + IL_000e: callvirt instance class [Utils]Utils/Order[] [Utils]Utils/Customer::get_Orders() + IL_0013: 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_0018: ldloc.2 + IL_0019: newobj instance void Linq101Grouping01/yearGroups@47::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_001e: 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_0023: ldsfld class Linq101Grouping01/'yearGroups@48-1' Linq101Grouping01/'yearGroups@48-1'::@_instance + IL_0028: ldsfld class Linq101Grouping01/'yearGroups@48-2' Linq101Grouping01/'yearGroups@48-2'::@_instance + IL_002d: 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_0032: ldloc.2 + IL_0033: newobj instance void Linq101Grouping01/'yearGroups@48-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0038: 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,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_003d: ldsfld class Linq101Grouping01/'yearGroups@55-4' Linq101Grouping01/'yearGroups@55-4'::@_instance + IL_0042: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,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_0047: 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_004c: stloc.1 + .line 57,57 : 9,53 '' + IL_004d: ldarg.0 + IL_004e: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #4 input at line 43@44'::builder@ + IL_0053: ldloc.0 + IL_0054: ldloc.1 + IL_0055: newobj instance void class [mscorlib]System.Tuple`2[]>>>::.ctor(!0, + !1) + IL_005a: tail. + IL_005c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield[]>>>,object>(!!0) + IL_0061: ret + } // end of method 'Pipe #4 input at line 43@44'::Invoke + + } // end of class 'Pipe #4 input at line 43@44' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 43@57-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2[]>>>,class [mscorlib]System.Tuple`2[]>[]>> + { + .field static assembly initonly class Linq101Grouping01/'Pipe #4 input at line 43@57-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2[]>>>,class [mscorlib]System.Tuple`2[]>[]>>::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 43@57-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2[]>[]> + Invoke(class [mscorlib]System.Tuple`2[]>>> tupledArg) cil managed + { + // Code size 32 (0x20) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [mscorlib]System.Collections.Generic.IEnumerable`1[]>> yearGroups) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2[]>>>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2[]>>>::get_Item2() + IL_000d: stloc.1 + .line 57,57 : 17,52 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance string [Utils]Utils/Customer::get_CompanyName() + IL_0014: ldloc.1 + IL_0015: call !!0[] [System.Core]System.Linq.Enumerable::ToArray[]>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_001a: newobj instance void class [mscorlib]System.Tuple`2[]>[]>::.ctor(!0, + !1) + IL_001f: ret + } // end of method 'Pipe #4 input at line 43@57-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Grouping01/'Pipe #4 input at line 43@57-1'::.ctor() + IL_0005: stsfld class Linq101Grouping01/'Pipe #4 input at line 43@57-1' Linq101Grouping01/'Pipe #4 input at line 43@57-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 43@57-1'::.cctor + + } // end of class 'Pipe #4 input at line 43@57-1' + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_digits() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::digits@7 + IL_0005: ret + } // end of method Linq101Grouping01::get_digits + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::numbers@10 + IL_0005: ret + } // end of method Linq101Grouping01::get_numbers + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_numberGroups() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Grouping01::numberGroups@12 + IL_0005: ret + } // end of method Linq101Grouping01::get_numberGroups + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_words() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::words@20 + IL_0005: ret + } // end of method Linq101Grouping01::get_words + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_wordGroups() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Grouping01::wordGroups@22 + IL_0005: ret + } // end of method Linq101Grouping01::get_wordGroups + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_products() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::products@30 + IL_0005: ret + } // end of method Linq101Grouping01::get_products + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_orderGroups() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Grouping01::orderGroups@32 + IL_0005: ret + } // end of method Linq101Grouping01::get_orderGroups + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_customers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::customers@40 + IL_0005: ret + } // end of method Linq101Grouping01::get_customers + + .method public specialname static class [mscorlib]System.Tuple`2[]>[]>[] + get_customerOrderGroups() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[]>[]>[] ''.$Linq101Grouping01::customerOrderGroups@42 + IL_0005: ret + } // end of method Linq101Grouping01::get_customerOrderGroups + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + digits() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_digits() + } // end of property Linq101Grouping01::digits + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_numbers() + } // end of property Linq101Grouping01::numbers + .property class [mscorlib]System.Tuple`2[] + numberGroups() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Grouping01::get_numberGroups() + } // end of property Linq101Grouping01::numberGroups + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + words() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_words() + } // end of property Linq101Grouping01::words + .property class [mscorlib]System.Tuple`2[] + wordGroups() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Grouping01::get_wordGroups() + } // end of property Linq101Grouping01::wordGroups + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + products() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_products() + } // end of property Linq101Grouping01::products + .property class [mscorlib]System.Tuple`2[] + orderGroups() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Grouping01::get_orderGroups() + } // end of property Linq101Grouping01::orderGroups + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + customers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_customers() + } // end of property Linq101Grouping01::customers + .property class [mscorlib]System.Tuple`2[]>[]>[] + customerOrderGroups() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[]>[]>[] Linq101Grouping01::get_customerOrderGroups() + } // end of property Linq101Grouping01::customerOrderGroups +} // end of class Linq101Grouping01 + +.class private abstract auto ansi sealed ''.$Linq101Grouping01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 digits@7 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers@10 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] numberGroups@12 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words@20 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] wordGroups@22 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@30 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] orderGroups@32 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers@40 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[]>[]>[] customerOrderGroups@42 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // 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, + [2] class [mscorlib]System.Tuple`2[] numberGroups, + [3] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words, + [4] class [mscorlib]System.Tuple`2[] wordGroups, + [5] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, + [6] class [mscorlib]System.Tuple`2[] orderGroups, + [7] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers, + [8] class [mscorlib]System.Tuple`2[]>[]>[] customerOrderGroups, + [9] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #1 input at line 13', + [10] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_10, + [11] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #2 input at line 23', + [12] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_12, + [13] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #3 input at line 33', + [14] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_14, + [15] class [mscorlib]System.Collections.Generic.IEnumerable`1[]>[]>> 'Pipe #4 input at line 43', + [16] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_16) + .line 7,7 : 1,96 '' + IL_0000: ldstr "zero" + IL_0005: ldstr "one" + IL_000a: ldstr "two" + IL_000f: ldstr "three" + IL_0014: ldstr "four" + IL_0019: ldstr "five" + IL_001e: ldstr "six" + IL_0023: ldstr "seven" + IL_0028: ldstr "eight" + IL_002d: ldstr "nine" + IL_0032: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0037: 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_003c: 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_0041: 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_0046: 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_004b: 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_0050: 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_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_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_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_0064: 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_0069: dup + IL_006a: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::digits@7 + IL_006f: stloc.0 + .line 10,10 : 1,47 '' + IL_0070: ldc.i4.5 + IL_0071: ldc.i4.4 + IL_0072: ldc.i4.1 + IL_0073: ldc.i4.3 + IL_0074: ldc.i4.s 9 + IL_0076: ldc.i4.8 + IL_0077: ldc.i4.6 + IL_0078: ldc.i4.7 + IL_0079: ldc.i4.2 + IL_007a: ldc.i4.0 + IL_007b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0080: 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_0085: 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_008a: 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_008f: 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_0094: 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_0099: 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_009e: 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_00a3: 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_00a8: 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_00ad: 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_00b2: dup + IL_00b3: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::numbers@10 + IL_00b8: stloc.1 + .line 13,13 : 5,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_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_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_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_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_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_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_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_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_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_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_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_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_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_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 + .line 24,24 : 9,12 '' + IL_016f: ldloc.s V_12 + IL_0171: ldloc.s V_12 + 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs new file mode 100644 index 00000000000..697f1ca7ad1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs @@ -0,0 +1,43 @@ +// #Conformance #DataExpressions #Query +// Join LINQ101 samples converted to query +open System +open System.Collections.Generic +open System.Linq + +// Cross Join +let categories = ["Beverages"; "Condiments"; "Vegetables"; "Dairy Products"; "Seafood"] +let products = getProductList() + +let q = + query { + for c in categories do + join p in products on (c = p.Category) + select (c, p.ProductName) + } |> Seq.toArray + +// Group Join +let q2 = + query { + for c in categories do + groupJoin p in products on (c = p.Category) into ps + select (c, ps) + } |> Seq.toArray + +// Cross Join with Group Join +let q3 = + query { + for c in categories do + groupJoin p in products on (c = p.Category) into ps + for p in ps do + select (c, p.ProductName) + } |> Seq.toArray + +// Left Outer Join +let q4 = + query { + for c in categories do + groupJoin p in products on (c = p.Category) into ps + for p in ps.DefaultIfEmpty() do + let t = if (box p = null) then "(No products)" else p.ProductName + select (c, t) + } |> Seq.toArray \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl new file mode 100644 index 00000000000..6ea0b8858b0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl @@ -0,0 +1,1434 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern Utils +{ + .ver 0:0:0:0 +} +.assembly extern System.Core +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly Linq101Joins01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Linq101Joins01 +{ + // Offset: 0x00000000 Length: 0x0000030A +} +.mresource public FSharpOptimizationData.Linq101Joins01 +{ + // Offset: 0x00000310 Length: 0x000000C3 +} +.module Linq101Joins01.exe +// MVID: {61FD32BA-151B-685E-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x052C0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Linq101Joins01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 12@14' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Joins01/'Pipe #1 input at line 12@14' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 12@14'::.ctor + + .method public strict virtual instance string + Invoke(string c) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 14,14 : 32,33 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Joins01.fs' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #1 input at line 12@14'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #1 input at line 12@14'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #1 input at line 12@14' Linq101Joins01/'Pipe #1 input at line 12@14'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 12@14'::.cctor + + } // end of class 'Pipe #1 input at line 12@14' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 12@14-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Joins01/'Pipe #1 input at line 12@14-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 12@14-1'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 14,14 : 36,46 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #1 input at line 12@14-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #1 input at line 12@14-1'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #1 input at line 12@14-1' Linq101Joins01/'Pipe #1 input at line 12@14-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 12@14-1'::.cctor + + } // end of class 'Pipe #1 input at line 12@14-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 12@14-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3> + { + .field static assembly initonly class Linq101Joins01/'Pipe #1 input at line 12@14-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3>::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 12@14-2'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(string c, + class [Utils]Utils/Product p) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 14,14 : 9,47 '' + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0007: ret + } // end of method 'Pipe #1 input at line 12@14-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #1 input at line 12@14-2'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #1 input at line 12@14-2' Linq101Joins01/'Pipe #1 input at line 12@14-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 12@14-2'::.cctor + + } // end of class 'Pipe #1 input at line 12@14-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 12@14-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #1 input at line 12@14-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #1 input at line 12@14-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [mscorlib]System.Tuple`2 _arg1) cil managed + { + // Code size 37 (0x25) + .maxstack 7 + .locals init ([0] class [mscorlib]System.Tuple`2 V_0, + [1] class [Utils]Utils/Product p, + [2] string c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0008: stloc.1 + 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 + IL_0017: ldloc.1 + IL_0018: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_001d: tail. + IL_001f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_0024: ret + } // end of method 'Pipe #1 input at line 12@14-3'::Invoke + + } // end of class 'Pipe #1 input at line 12@14-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 12@15-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Joins01/'Pipe #1 input at line 12@15-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 12@15-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 27 (0x1b) + .maxstack 6 + .locals init ([0] string c, + [1] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 15,15 : 17,33 '' + IL_000e: ldloc.0 + IL_000f: ldloc.1 + IL_0010: callvirt instance string [Utils]Utils/Product::get_ProductName() + IL_0015: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_001a: ret + } // end of method 'Pipe #1 input at line 12@15-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #1 input at line 12@15-4'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #1 input at line 12@15-4' Linq101Joins01/'Pipe #1 input at line 12@15-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 12@15-4'::.cctor + + } // end of class 'Pipe #1 input at line 12@15-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 20@22' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Joins01/'Pipe #2 input at line 20@22' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 20@22'::.ctor + + .method public strict virtual instance string + Invoke(string c) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 22,22 : 37,38 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #2 input at line 20@22'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #2 input at line 20@22'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #2 input at line 20@22' Linq101Joins01/'Pipe #2 input at line 20@22'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 20@22'::.cctor + + } // end of class 'Pipe #2 input at line 20@22' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 20@22-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Joins01/'Pipe #2 input at line 20@22-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 20@22-1'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 22,22 : 41,51 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #2 input at line 20@22-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #2 input at line 20@22-1'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #2 input at line 20@22-1' Linq101Joins01/'Pipe #2 input at line 20@22-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 20@22-1'::.cctor + + } // end of class 'Pipe #2 input at line 20@22-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 20@22-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3,class [mscorlib]System.Tuple`2>> + { + .field static assembly initonly class Linq101Joins01/'Pipe #2 input at line 20@22-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3,class [mscorlib]System.Tuple`2>>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 20@22-2'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2> + Invoke(string c, + class [mscorlib]System.Collections.Generic.IEnumerable`1 ps) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 22,22 : 9,60 '' + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: newobj instance void class [mscorlib]System.Tuple`2>::.ctor(!0, + !1) + IL_0007: ret + } // end of method 'Pipe #2 input at line 20@22-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #2 input at line 20@22-2'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #2 input at line 20@22-2' Linq101Joins01/'Pipe #2 input at line 20@22-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 20@22-2'::.cctor + + } // end of class 'Pipe #2 input at line 20@22-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 20@22-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #2 input at line 20@22-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #2 input at line 20@22-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2>,object> + Invoke(class [mscorlib]System.Tuple`2> _arg1) cil managed + { + // Code size 37 (0x25) + .maxstack 7 + .locals init ([0] class [mscorlib]System.Tuple`2> V_0, + [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 ps, + [2] string c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance !1 class [mscorlib]System.Tuple`2>::get_Item2() + IL_0008: stloc.1 + 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 + IL_0017: ldloc.1 + IL_0018: newobj instance void class [mscorlib]System.Tuple`2>::.ctor(!0, + !1) + IL_001d: tail. + IL_001f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield>,object>(!!0) + IL_0024: ret + } // end of method 'Pipe #2 input at line 20@22-3'::Invoke + + } // end of class 'Pipe #2 input at line 20@22-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 20@23-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>,class [mscorlib]System.Tuple`2>> + { + .field static assembly initonly class Linq101Joins01/'Pipe #2 input at line 20@23-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>,class [mscorlib]System.Tuple`2>>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 20@23-4'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2> + Invoke(class [mscorlib]System.Tuple`2> tupledArg) cil managed + { + // Code size 22 (0x16) + .maxstack 6 + .locals init ([0] string c, + [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 ps) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2>::get_Item2() + IL_000d: stloc.1 + .line 23,23 : 17,22 '' + IL_000e: ldloc.0 + IL_000f: ldloc.1 + IL_0010: newobj instance void class [mscorlib]System.Tuple`2>::.ctor(!0, + !1) + IL_0015: ret + } // end of method 'Pipe #2 input at line 20@23-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #2 input at line 20@23-4'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #2 input at line 20@23-4' Linq101Joins01/'Pipe #2 input at line 20@23-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 20@23-4'::.cctor + + } // end of class 'Pipe #2 input at line 20@23-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 28@30' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Joins01/'Pipe #3 input at line 28@30' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 28@30'::.ctor + + .method public strict virtual instance string + Invoke(string c) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 30,30 : 37,38 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #3 input at line 28@30'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #3 input at line 28@30'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #3 input at line 28@30' Linq101Joins01/'Pipe #3 input at line 28@30'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 28@30'::.cctor + + } // end of class 'Pipe #3 input at line 28@30' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 28@30-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Joins01/'Pipe #3 input at line 28@30-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 28@30-1'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 30,30 : 41,51 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #3 input at line 28@30-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #3 input at line 28@30-1'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #3 input at line 28@30-1' Linq101Joins01/'Pipe #3 input at line 28@30-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 28@30-1'::.cctor + + } // end of class 'Pipe #3 input at line 28@30-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 28@30-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3,class [mscorlib]System.Tuple`2>> + { + .field static assembly initonly class Linq101Joins01/'Pipe #3 input at line 28@30-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3,class [mscorlib]System.Tuple`2>>::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 28@30-2'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2> + Invoke(string c, + class [mscorlib]System.Collections.Generic.IEnumerable`1 ps) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 30,30 : 9,60 '' + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: newobj instance void class [mscorlib]System.Tuple`2>::.ctor(!0, + !1) + IL_0007: ret + } // end of method 'Pipe #3 input at line 28@30-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #3 input at line 28@30-2'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #3 input at line 28@30-2' Linq101Joins01/'Pipe #3 input at line 28@30-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 28@30-2'::.cctor + + } // end of class 'Pipe #3 input at line 28@30-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 28@31-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [Utils]Utils/Product>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerable`1 ps + .field public string c + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder builder@, + class [mscorlib]System.Collections.Generic.IEnumerable`1 ps, + string c) 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 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [Utils]Utils/Product>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #3 input at line 28@31-4'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101Joins01/'Pipe #3 input at line 28@31-4'::ps + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld string Linq101Joins01/'Pipe #3 input at line 28@31-4'::c + IL_001b: ret + } // end of method 'Pipe #3 input at line 28@31-4'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [Utils]Utils/Product>,object> + Invoke(class [Utils]Utils/Product _arg2) cil managed + { + // Code size 34 (0x22) + .maxstack 8 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 32,32 : 9,34 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #3 input at line 28@31-4'::builder@ + IL_0008: ldarg.0 + IL_0009: ldfld string Linq101Joins01/'Pipe #3 input at line 28@31-4'::c + IL_000e: ldarg.0 + IL_000f: ldfld class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101Joins01/'Pipe #3 input at line 28@31-4'::ps + IL_0014: ldloc.0 + IL_0015: newobj instance void class [mscorlib]System.Tuple`3,class [Utils]Utils/Product>::.ctor(!0, + !1, + !2) + IL_001a: tail. + IL_001c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,class [Utils]Utils/Product>,object>(!!0) + IL_0021: ret + } // end of method 'Pipe #3 input at line 28@31-4'::Invoke + + } // end of class 'Pipe #3 input at line 28@31-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 28@30-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [Utils]Utils/Product>,class [mscorlib]System.Collections.IEnumerable>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,class [Utils]Utils/Product>,class [mscorlib]System.Collections.IEnumerable>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #3 input at line 28@30-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #3 input at line 28@30-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [Utils]Utils/Product>,class [mscorlib]System.Collections.IEnumerable> + Invoke(class [mscorlib]System.Tuple`2> _arg1) cil managed + { + // Code size 55 (0x37) + .maxstack 9 + .locals init ([0] class [mscorlib]System.Tuple`2> V_0, + [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 ps, + [2] string c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance !1 class [mscorlib]System.Tuple`2>::get_Item2() + IL_0008: stloc.1 + 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 + IL_0017: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #3 input at line 28@30-3'::builder@ + IL_001c: ldloc.1 + IL_001d: 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_0022: ldarg.0 + IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #3 input at line 28@30-3'::builder@ + IL_0028: ldloc.1 + IL_0029: ldloc.2 + IL_002a: newobj instance void Linq101Joins01/'Pipe #3 input at line 28@31-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder, + class [mscorlib]System.Collections.Generic.IEnumerable`1, + string) + IL_002f: tail. + IL_0031: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [Utils]Utils/Product>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0036: ret + } // end of method 'Pipe #3 input at line 28@30-3'::Invoke + + } // end of class 'Pipe #3 input at line 28@30-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 28@32-5' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [Utils]Utils/Product>,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Joins01/'Pipe #3 input at line 28@32-5' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [Utils]Utils/Product>,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 28@32-5'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`3,class [Utils]Utils/Product> tupledArg) cil managed + { + // Code size 34 (0x22) + .maxstack 6 + .locals init ([0] string c, + [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 ps, + [2] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`3,class [Utils]Utils/Product>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`3,class [Utils]Utils/Product>::get_Item2() + IL_000d: stloc.1 + IL_000e: ldarg.1 + IL_000f: call instance !2 class [mscorlib]System.Tuple`3,class [Utils]Utils/Product>::get_Item3() + IL_0014: stloc.2 + .line 32,32 : 17,33 '' + IL_0015: ldloc.0 + IL_0016: ldloc.2 + IL_0017: callvirt instance string [Utils]Utils/Product::get_ProductName() + IL_001c: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0021: ret + } // end of method 'Pipe #3 input at line 28@32-5'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #3 input at line 28@32-5'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #3 input at line 28@32-5' Linq101Joins01/'Pipe #3 input at line 28@32-5'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 28@32-5'::.cctor + + } // end of class 'Pipe #3 input at line 28@32-5' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 37@39' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Joins01/'Pipe #4 input at line 37@39' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 37@39'::.ctor + + .method public strict virtual instance string + Invoke(string c) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 39,39 : 37,38 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #4 input at line 37@39'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #4 input at line 37@39'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #4 input at line 37@39' Linq101Joins01/'Pipe #4 input at line 37@39'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 37@39'::.cctor + + } // end of class 'Pipe #4 input at line 37@39' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 37@39-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Joins01/'Pipe #4 input at line 37@39-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 37@39-1'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 39,39 : 41,51 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #4 input at line 37@39-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #4 input at line 37@39-1'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #4 input at line 37@39-1' Linq101Joins01/'Pipe #4 input at line 37@39-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 37@39-1'::.cctor + + } // end of class 'Pipe #4 input at line 37@39-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 37@39-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3,class [mscorlib]System.Tuple`2>> + { + .field static assembly initonly class Linq101Joins01/'Pipe #4 input at line 37@39-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3,class [mscorlib]System.Tuple`2>>::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 37@39-2'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2> + Invoke(string c, + class [mscorlib]System.Collections.Generic.IEnumerable`1 ps) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 39,39 : 9,60 '' + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: newobj instance void class [mscorlib]System.Tuple`2>::.ctor(!0, + !1) + IL_0007: ret + } // end of method 'Pipe #4 input at line 37@39-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #4 input at line 37@39-2'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #4 input at line 37@39-2' Linq101Joins01/'Pipe #4 input at line 37@39-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 37@39-2'::.cctor + + } // end of class 'Pipe #4 input at line 37@39-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 37@40-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [Utils]Utils/Product,string>,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerable`1 ps + .field public string c + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder builder@, + class [mscorlib]System.Collections.Generic.IEnumerable`1 ps, + string c) 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 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [Utils]Utils/Product,string>,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #4 input at line 37@40-4'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101Joins01/'Pipe #4 input at line 37@40-4'::ps + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld string Linq101Joins01/'Pipe #4 input at line 37@40-4'::c + IL_001b: ret + } // end of method 'Pipe #4 input at line 37@40-4'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [Utils]Utils/Product,string>,object> + Invoke(class [Utils]Utils/Product _arg2) cil managed + { + // Code size 66 (0x42) + .maxstack 9 + .locals init ([0] class [Utils]Utils/Product p, + [1] string t) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 41,41 : 17,39 '' + IL_0002: nop + .line 100001,100001 : 0,0 '' + IL_0003: ldloc.0 + IL_0004: box [Utils]Utils/Product + IL_0009: ldnull + IL_000a: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityIntrinsic(!!0, + !!0) + IL_000f: brfalse.s IL_0019 + + .line 41,41 : 40,55 '' + IL_0011: ldstr "(No products)" + .line 100001,100001 : 0,0 '' + IL_0016: nop + IL_0017: br.s IL_0020 + + .line 41,41 : 61,74 '' + IL_0019: ldloc.0 + IL_001a: callvirt instance string [Utils]Utils/Product::get_ProductName() + .line 100001,100001 : 0,0 '' + IL_001f: nop + .line 100001,100001 : 0,0 '' + IL_0020: stloc.1 + .line 42,42 : 9,22 '' + IL_0021: ldarg.0 + IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #4 input at line 37@40-4'::builder@ + IL_0027: ldarg.0 + IL_0028: ldfld string Linq101Joins01/'Pipe #4 input at line 37@40-4'::c + IL_002d: ldarg.0 + IL_002e: ldfld class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101Joins01/'Pipe #4 input at line 37@40-4'::ps + IL_0033: ldloc.0 + IL_0034: ldloc.1 + IL_0035: newobj instance void class [mscorlib]System.Tuple`4,class [Utils]Utils/Product,string>::.ctor(!0, + !1, + !2, + !3) + IL_003a: tail. + IL_003c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,class [Utils]Utils/Product,string>,object>(!!0) + IL_0041: ret + } // end of method 'Pipe #4 input at line 37@40-4'::Invoke + + } // end of class 'Pipe #4 input at line 37@40-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 37@39-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [Utils]Utils/Product,string>,class [mscorlib]System.Collections.IEnumerable>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,class [Utils]Utils/Product,string>,class [mscorlib]System.Collections.IEnumerable>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #4 input at line 37@39-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #4 input at line 37@39-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [Utils]Utils/Product,string>,class [mscorlib]System.Collections.IEnumerable> + Invoke(class [mscorlib]System.Tuple`2> _arg1) cil managed + { + // Code size 60 (0x3c) + .maxstack 9 + .locals init ([0] class [mscorlib]System.Tuple`2> V_0, + [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 ps, + [2] string c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance !1 class [mscorlib]System.Tuple`2>::get_Item2() + IL_0008: stloc.1 + 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 + IL_0017: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #4 input at line 37@39-3'::builder@ + IL_001c: ldloc.1 + IL_001d: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::DefaultIfEmpty(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0022: 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_0027: ldarg.0 + IL_0028: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #4 input at line 37@39-3'::builder@ + IL_002d: ldloc.1 + IL_002e: ldloc.2 + IL_002f: newobj instance void Linq101Joins01/'Pipe #4 input at line 37@40-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder, + class [mscorlib]System.Collections.Generic.IEnumerable`1, + string) + IL_0034: tail. + IL_0036: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [Utils]Utils/Product,string>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_003b: ret + } // end of method 'Pipe #4 input at line 37@39-3'::Invoke + + } // end of class 'Pipe #4 input at line 37@39-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 37@42-5' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [Utils]Utils/Product,string>,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Joins01/'Pipe #4 input at line 37@42-5' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [Utils]Utils/Product,string>,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 37@42-5'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`4,class [Utils]Utils/Product,string> tupledArg) cil managed + { + // Code size 36 (0x24) + .maxstack 6 + .locals init ([0] string c, + [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 ps, + [2] class [Utils]Utils/Product p, + [3] string t) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`4,class [Utils]Utils/Product,string>::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`4,class [Utils]Utils/Product,string>::get_Item2() + IL_000d: stloc.1 + IL_000e: ldarg.1 + IL_000f: call instance !2 class [mscorlib]System.Tuple`4,class [Utils]Utils/Product,string>::get_Item3() + IL_0014: stloc.2 + IL_0015: ldarg.1 + IL_0016: call instance !3 class [mscorlib]System.Tuple`4,class [Utils]Utils/Product,string>::get_Item4() + IL_001b: stloc.3 + .line 42,42 : 17,21 '' + IL_001c: ldloc.0 + IL_001d: ldloc.3 + IL_001e: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0023: ret + } // end of method 'Pipe #4 input at line 37@42-5'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Joins01/'Pipe #4 input at line 37@42-5'::.ctor() + IL_0005: stsfld class Linq101Joins01/'Pipe #4 input at line 37@42-5' Linq101Joins01/'Pipe #4 input at line 37@42-5'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 37@42-5'::.cctor + + } // end of class 'Pipe #4 input at line 37@42-5' + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_categories() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Joins01::categories@8 + IL_0005: ret + } // end of method Linq101Joins01::get_categories + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_products() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Joins01::products@9 + IL_0005: ret + } // end of method Linq101Joins01::get_products + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_q() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Joins01::q@11 + IL_0005: ret + } // end of method Linq101Joins01::get_q + + .method public specialname static class [mscorlib]System.Tuple`2>[] + get_q2() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Joins01::q2@19 + IL_0005: ret + } // end of method Linq101Joins01::get_q2 + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_q3() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Joins01::q3@27 + IL_0005: ret + } // end of method Linq101Joins01::get_q3 + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_q4() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Joins01::q4@36 + IL_0005: ret + } // end of method Linq101Joins01::get_q4 + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + categories() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_categories() + } // end of property Linq101Joins01::categories + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + products() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_products() + } // end of property Linq101Joins01::products + .property class [mscorlib]System.Tuple`2[] + q() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Joins01::get_q() + } // end of property Linq101Joins01::q + .property class [mscorlib]System.Tuple`2>[] + q2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2>[] Linq101Joins01::get_q2() + } // end of property Linq101Joins01::q2 + .property class [mscorlib]System.Tuple`2[] + q3() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Joins01::get_q3() + } // end of property Linq101Joins01::q3 + .property class [mscorlib]System.Tuple`2[] + q4() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Joins01::get_q4() + } // end of property Linq101Joins01::q4 +} // end of class Linq101Joins01 + +.class private abstract auto ansi sealed ''.$Linq101Joins01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 categories@8 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@9 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] q@11 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2>[] q2@19 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] q3@27 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] q4@36 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // 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, + [2] class [mscorlib]System.Tuple`2[] q, + [3] class [mscorlib]System.Tuple`2>[] q2, + [4] class [mscorlib]System.Tuple`2[] q3, + [5] class [mscorlib]System.Tuple`2[] q4, + [6] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #1 input at line 12', + [7] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_7, + [8] class [mscorlib]System.Collections.Generic.IEnumerable`1>> 'Pipe #2 input at line 20', + [9] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_9, + [10] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #3 input at line 28', + [11] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_11, + [12] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #4 input at line 37', + [13] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_13) + .line 8,8 : 1,88 '' + IL_0000: ldstr "Beverages" + IL_0005: ldstr "Condiments" + IL_000a: ldstr "Vegetables" + IL_000f: ldstr "Dairy Products" + IL_0014: ldstr "Seafood" + IL_0019: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_001e: 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_0023: 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_0028: 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_002d: 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_0032: 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_0037: dup + IL_0038: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Joins01::categories@8 + IL_003d: stloc.0 + .line 9,9 : 1,32 '' + IL_003e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_0043: dup + IL_0044: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Joins01::products@9 + IL_0049: stloc.1 + .line 12,12 : 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_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_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_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_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_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_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: 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_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_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_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_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_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_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_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_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_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_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: 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_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_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_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_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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.fs new file mode 100644 index 00000000000..f8e78ed5080 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.fs @@ -0,0 +1,64 @@ +// #Conformance #DataExpressions #Query +// Ordering LINQ101 samples converted to query +open System +open System.Collections.Generic +open System.Linq + +// OrderBy - Simple 1 +let words = ["cherry"; "apple"; "blueberry"] +let sortedWords = + query { + for w in words do + sortBy w + } |> Seq.toList + +// OrderBy - Simple 2 +let sortedWords2 = + query { + for w in words do + sortBy (w.Length) + } |> Seq.toList + +// OrderBy - Simple 3 +let products = getProductList() +let sortedProducts = + query { + for p in products do + sortBy p.ProductName + select p + } |> Seq.toArray + +// OrderByDescending - Simple 1 +// Dev11:179653 +//let doubles = [1.7M, 2.3M, 1.9M, 4.1M, 2.9M] +//let sortedDoubles = +// query { +// for d in doubles do +// sortByDescending d +// } |> Seq.toArray +//if sortedDoubles <> + +// OrderByDescending - Simple 2 +let sortedProducts2 = + query { + for p in products do + sortByDescending p.UnitsInStock + } |> Seq.toArray + +// ThenBy - Simple +let digits = [ "zero"; "one"; "two"; "three"; "four"; "five"; "six"; "seven"; "eight"; "nine" ] +let sortedDigits = + query { + for d in digits do + sortBy d.Length + thenBy d + } |> Seq.toList + +// ThenByDescending - Simple +let sortedProducts3 = + query { + for p in products do + sortBy p.Category + thenByDescending p.UnitPrice + select p + } |> Seq.toArray \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl new file mode 100644 index 00000000000..55a7e663c2d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl @@ -0,0 +1,2116 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern Utils +{ + .ver 0:0:0:0 +} +.assembly Linq101Ordering01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Linq101Ordering01 +{ + // Offset: 0x00000000 Length: 0x000003AE +} +.mresource public FSharpOptimizationData.Linq101Ordering01 +{ + // Offset: 0x000003B8 Length: 0x00000134 +} +.module Linq101Ordering01.exe +// MVID: {61FD32BA-649A-6956-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x051E0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Linq101Ordering01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #1 input at line 10@11' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101Ordering01/'Pipe #1 input at line 10@11'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #1 input at line 10@11'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] string V_0, + [1] string 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\\QueryExpressionStepping\\Linq101Ordering01.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101Ordering01/'Pipe #1 input at line 10@11'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #1 input at line 10@11'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #1 input at line 10@11'::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101Ordering01/'Pipe #1 input at line 10@11'::current + IL_0006: ret + } // end of method 'Pipe #1 input at line 10@11'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Ordering01/'Pipe #1 input at line 10@11'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method 'Pipe #1 input at line 10@11'::GetFreshEnumerator + + } // end of class 'Pipe #1 input at line 10@11' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 10@12-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Ordering01/'Pipe #1 input at line 10@12-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 10@12-1'::.ctor + + .method public strict virtual instance string + Invoke(string w) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 12,12 : 16,17 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #1 input at line 10@12-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Ordering01/'Pipe #1 input at line 10@12-1'::.ctor() + IL_0005: stsfld class Linq101Ordering01/'Pipe #1 input at line 10@12-1' Linq101Ordering01/'Pipe #1 input at line 10@12-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 10@12-1'::.cctor + + } // end of class 'Pipe #1 input at line 10@12-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #2 input at line 17@18' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101Ordering01/'Pipe #2 input at line 17@18'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #2 input at line 17@18'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] string V_0, + [1] string w) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101Ordering01/'Pipe #2 input at line 17@18'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #2 input at line 17@18'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #2 input at line 17@18'::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101Ordering01/'Pipe #2 input at line 17@18'::current + IL_0006: ret + } // end of method 'Pipe #2 input at line 17@18'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Ordering01/'Pipe #2 input at line 17@18'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method 'Pipe #2 input at line 17@18'::GetFreshEnumerator + + } // end of class 'Pipe #2 input at line 17@18' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 17@19-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Ordering01/'Pipe #2 input at line 17@19-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 17@19-1'::.ctor + + .method public strict virtual instance int32 + Invoke(string w) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 19,19 : 17,25 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0006: ret + } // end of method 'Pipe #2 input at line 17@19-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Ordering01/'Pipe #2 input at line 17@19-1'::.ctor() + IL_0005: stsfld class Linq101Ordering01/'Pipe #2 input at line 17@19-1' Linq101Ordering01/'Pipe #2 input at line 17@19-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 17@19-1'::.cctor + + } // end of class 'Pipe #2 input at line 17@19-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 25@26' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Ordering01/'Pipe #3 input at line 25@26'::builder@ + IL_000d: ret + } // end of method 'Pipe #3 input at line 25@26'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 27,27 : 9,29 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Ordering01/'Pipe #3 input at line 25@26'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #3 input at line 25@26'::Invoke + + } // end of class 'Pipe #3 input at line 25@26' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 25@27-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Ordering01/'Pipe #3 input at line 25@27-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 25@27-1'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 27,27 : 16,29 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_ProductName() + IL_0008: ret + } // end of method 'Pipe #3 input at line 25@27-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Ordering01/'Pipe #3 input at line 25@27-1'::.ctor() + IL_0005: stsfld class Linq101Ordering01/'Pipe #3 input at line 25@27-1' Linq101Ordering01/'Pipe #3 input at line 25@27-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 25@27-1'::.cctor + + } // end of class 'Pipe #3 input at line 25@27-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 25@28-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Ordering01/'Pipe #3 input at line 25@28-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 25@28-2'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 28,28 : 16,17 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #3 input at line 25@28-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Ordering01/'Pipe #3 input at line 25@28-2'::.ctor() + IL_0005: stsfld class Linq101Ordering01/'Pipe #3 input at line 25@28-2' Linq101Ordering01/'Pipe #3 input at line 25@28-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 25@28-2'::.cctor + + } // end of class 'Pipe #3 input at line 25@28-2' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #4 input at line 43@44' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 [Utils]Utils/Product current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [Utils]Utils/Product current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld class [Utils]Utils/Product Linq101Ordering01/'Pipe #4 input at line 43@44'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #4 input at line 43@44'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [Utils]Utils/Product Linq101Ordering01/'Pipe #4 input at line 43@44'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #4 input at line 43@44'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #4 input at line 43@44'::get_CheckClose + + .method public strict virtual instance class [Utils]Utils/Product + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [Utils]Utils/Product Linq101Ordering01/'Pipe #4 input at line 43@44'::current + IL_0006: ret + } // end of method 'Pipe #4 input at line 43@44'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: 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_0008: ret + } // end of method 'Pipe #4 input at line 43@44'::GetFreshEnumerator + + } // end of class 'Pipe #4 input at line 43@44' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 43@45-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Ordering01/'Pipe #4 input at line 43@45-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 43@45-1'::.ctor + + .method public strict virtual instance int32 + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 45,45 : 26,40 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance int32 [Utils]Utils/Product::get_UnitsInStock() + IL_0008: ret + } // end of method 'Pipe #4 input at line 43@45-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Ordering01/'Pipe #4 input at line 43@45-1'::.ctor() + IL_0005: stsfld class Linq101Ordering01/'Pipe #4 input at line 43@45-1' Linq101Ordering01/'Pipe #4 input at line 43@45-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 43@45-1'::.cctor + + } // end of class 'Pipe #4 input at line 43@45-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #5 input at line 51@52' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101Ordering01/'Pipe #5 input at line 51@52'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #5 input at line 51@52'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] string V_0, + [1] string d) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101Ordering01/'Pipe #5 input at line 51@52'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #5 input at line 51@52'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #5 input at line 51@52'::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101Ordering01/'Pipe #5 input at line 51@52'::current + IL_0006: ret + } // end of method 'Pipe #5 input at line 51@52'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Ordering01/'Pipe #5 input at line 51@52'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method 'Pipe #5 input at line 51@52'::GetFreshEnumerator + + } // end of class 'Pipe #5 input at line 51@52' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #5 input at line 51@53-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Ordering01/'Pipe #5 input at line 51@53-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #5 input at line 51@53-1'::.ctor + + .method public strict virtual instance int32 + Invoke(string d) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 53,53 : 16,24 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0006: ret + } // end of method 'Pipe #5 input at line 51@53-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Ordering01/'Pipe #5 input at line 51@53-1'::.ctor() + IL_0005: stsfld class Linq101Ordering01/'Pipe #5 input at line 51@53-1' Linq101Ordering01/'Pipe #5 input at line 51@53-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #5 input at line 51@53-1'::.cctor + + } // end of class 'Pipe #5 input at line 51@53-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #5 input at line 51@54-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Ordering01/'Pipe #5 input at line 51@54-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #5 input at line 51@54-2'::.ctor + + .method public strict virtual instance string + Invoke(string d) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 54,54 : 16,17 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #5 input at line 51@54-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Ordering01/'Pipe #5 input at line 51@54-2'::.ctor() + IL_0005: stsfld class Linq101Ordering01/'Pipe #5 input at line 51@54-2' Linq101Ordering01/'Pipe #5 input at line 51@54-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #5 input at line 51@54-2'::.cctor + + } // end of class 'Pipe #5 input at line 51@54-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 59@60' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Ordering01/'Pipe #6 input at line 59@60'::builder@ + IL_000d: ret + } // end of method 'Pipe #6 input at line 59@60'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 61,61 : 9,26 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Ordering01/'Pipe #6 input at line 59@60'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #6 input at line 59@60'::Invoke + + } // end of class 'Pipe #6 input at line 59@60' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 59@61-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Ordering01/'Pipe #6 input at line 59@61-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #6 input at line 59@61-1'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 61,61 : 16,26 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #6 input at line 59@61-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Ordering01/'Pipe #6 input at line 59@61-1'::.ctor() + IL_0005: stsfld class Linq101Ordering01/'Pipe #6 input at line 59@61-1' Linq101Ordering01/'Pipe #6 input at line 59@61-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #6 input at line 59@61-1'::.cctor + + } // end of class 'Pipe #6 input at line 59@61-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 59@62-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Ordering01/'Pipe #6 input at line 59@62-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #6 input at line 59@62-2'::.ctor + + .method public strict virtual instance valuetype [mscorlib]System.Decimal + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 62,62 : 26,37 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_0008: ret + } // end of method 'Pipe #6 input at line 59@62-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Ordering01/'Pipe #6 input at line 59@62-2'::.ctor() + IL_0005: stsfld class Linq101Ordering01/'Pipe #6 input at line 59@62-2' Linq101Ordering01/'Pipe #6 input at line 59@62-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #6 input at line 59@62-2'::.cctor + + } // end of class 'Pipe #6 input at line 59@62-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 59@63-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Ordering01/'Pipe #6 input at line 59@63-3' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #6 input at line 59@63-3'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 63,63 : 16,17 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #6 input at line 59@63-3'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Ordering01/'Pipe #6 input at line 59@63-3'::.ctor() + IL_0005: stsfld class Linq101Ordering01/'Pipe #6 input at line 59@63-3' Linq101Ordering01/'Pipe #6 input at line 59@63-3'::@_instance + IL_000a: ret + } // end of method 'Pipe #6 input at line 59@63-3'::.cctor + + } // end of class 'Pipe #6 input at line 59@63-3' + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_words() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::words@8 + IL_0005: ret + } // end of method Linq101Ordering01::get_words + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_sortedWords() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedWords@9 + IL_0005: ret + } // end of method Linq101Ordering01::get_sortedWords + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_sortedWords2() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedWords2@16 + IL_0005: ret + } // end of method Linq101Ordering01::get_sortedWords2 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_products() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::products@23 + IL_0005: ret + } // end of method Linq101Ordering01::get_products + + .method public specialname static class [Utils]Utils/Product[] + get_sortedProducts() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts@24 + IL_0005: ret + } // end of method Linq101Ordering01::get_sortedProducts + + .method public specialname static class [Utils]Utils/Product[] + get_sortedProducts2() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts2@42 + IL_0005: ret + } // end of method Linq101Ordering01::get_sortedProducts2 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_digits() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::digits@49 + IL_0005: ret + } // end of method Linq101Ordering01::get_digits + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_sortedDigits() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedDigits@50 + IL_0005: ret + } // end of method Linq101Ordering01::get_sortedDigits + + .method public specialname static class [Utils]Utils/Product[] + get_sortedProducts3() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts3@58 + IL_0005: ret + } // end of method Linq101Ordering01::get_sortedProducts3 + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + words() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_words() + } // end of property Linq101Ordering01::words + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + sortedWords() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_sortedWords() + } // end of property Linq101Ordering01::sortedWords + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + sortedWords2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_sortedWords2() + } // end of property Linq101Ordering01::sortedWords2 + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + products() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() + } // end of property Linq101Ordering01::products + .property class [Utils]Utils/Product[] sortedProducts() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [Utils]Utils/Product[] Linq101Ordering01::get_sortedProducts() + } // end of property Linq101Ordering01::sortedProducts + .property class [Utils]Utils/Product[] sortedProducts2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [Utils]Utils/Product[] Linq101Ordering01::get_sortedProducts2() + } // end of property Linq101Ordering01::sortedProducts2 + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + digits() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_digits() + } // end of property Linq101Ordering01::digits + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + sortedDigits() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_sortedDigits() + } // end of property Linq101Ordering01::sortedDigits + .property class [Utils]Utils/Product[] sortedProducts3() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [Utils]Utils/Product[] Linq101Ordering01::get_sortedProducts3() + } // end of property Linq101Ordering01::sortedProducts3 +} // end of class Linq101Ordering01 + +.class private abstract auto ansi sealed ''.$Linq101Ordering01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words@8 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 sortedWords@9 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 sortedWords2@16 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@23 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [Utils]Utils/Product[] sortedProducts@24 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [Utils]Utils/Product[] sortedProducts2@42 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 digits@49 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 sortedDigits@50 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [Utils]Utils/Product[] sortedProducts3@58 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // 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, + [2] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 sortedWords2, + [3] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, + [4] class [Utils]Utils/Product[] sortedProducts, + [5] class [Utils]Utils/Product[] sortedProducts2, + [6] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 digits, + [7] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 sortedDigits, + [8] class [Utils]Utils/Product[] sortedProducts3, + [9] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 10', + [10] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_10, + [11] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #2 input at line 17', + [12] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_12, + [13] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #3 input at line 25', + [14] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_14, + [15] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #4 input at line 43', + [16] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_16, + [17] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #5 input at line 51', + [18] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_18, + [19] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #6 input at line 59', + [20] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_20) + .line 8,8 : 1,45 '' + IL_0000: ldstr "cherry" + IL_0005: ldstr "apple" + IL_000a: ldstr "blueberry" + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + 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: 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_001e: 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_0023: dup + IL_0024: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::words@8 + IL_0029: stloc.0 + .line 10,10 : 5,10 '' + 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_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_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_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_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: newobj instance void Linq101Ordering01/'Pipe #2 input at line 17@18'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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: 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_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_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_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_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_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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.fs new file mode 100644 index 00000000000..2c7185c5a74 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.fs @@ -0,0 +1,54 @@ +// #Conformance #DataExpressions #Query +// Partitioning LINQ101 samples converted to query +open System +open System.Collections.Generic +open System.Linq + +let numbers = [ 5; 4; 1; 3; 9; 8; 6; 7; 2; 0 ] + +// Take - simple +let first3Numbers = + query { + for n in numbers do + take 3 + } |> Seq.toList + +// Take - nested +let customers = getCustomerList() +let WAOrders = + query { + for c in customers do + for o in c.Orders do + where (c.Region = "WA") + select (c.CustomerID, o.OrderID, o.OrderDate) + } |> Seq.toArray + +// Skip - simple +let allButFirst4Numbers = + query { + for n in numbers do + skip 4 + } |> Seq.toList + +// Skip - Nested +let WAOrders2 = + query { + for c in customers do + for o in c.Orders do + where (c.Region = "WA") + select (c.CustomerID, o.OrderID, o.OrderDate) + } |> Seq.skip 2 |> Seq.toList + +// TakeWhile - simple +let firstNumbersLessThan6 = + query { + for n in numbers do + takeWhile (n < 6) + } |> Seq.toList + +// SkipWhile - simple +let allButFirst3Numbers = + query { + for n in numbers do + skipWhile (n % 3 <> 0) + } |> Seq.toList \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl new file mode 100644 index 00000000000..dc9761089b4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl @@ -0,0 +1,2119 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern Utils +{ + .ver 0:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly Linq101Partitioning01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Linq101Partitioning01 +{ + // Offset: 0x00000000 Length: 0x000003D2 +} +.mresource public FSharpOptimizationData.Linq101Partitioning01 +{ + // Offset: 0x000003D8 Length: 0x00000138 +} +.module Linq101Partitioning01.exe +// MVID: {61FD32BA-B280-A6A2-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06E50000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Linq101Partitioning01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #1 input at line 11@12' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #1 input at line 11@12'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .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\\QueryExpressionStepping\\Linq101Partitioning01.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #1 input at line 11@12'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #1 input at line 11@12'::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::current + IL_0006: ret + } // end of method 'Pipe #1 input at line 11@12'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Partitioning01/'Pipe #1 input at line 11@12'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method 'Pipe #1 input at line 11@12'::GetFreshEnumerator + + } // end of class 'Pipe #1 input at line 11@12' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 19@21-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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 ) + .field public class [Utils]Utils/Customer c + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder builder@, + class [Utils]Utils/Customer c) 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,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #2 input at line 19@21-1'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [Utils]Utils/Customer Linq101Partitioning01/'Pipe #2 input at line 19@21-1'::c + IL_0014: ret + } // end of method 'Pipe #2 input at line 19@21-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [Utils]Utils/Order _arg2) cil managed + { + // Code size 28 (0x1c) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 22,22 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #2 input at line 19@21-1'::builder@ + IL_0008: ldarg.0 + IL_0009: ldfld class [Utils]Utils/Customer Linq101Partitioning01/'Pipe #2 input at line 19@21-1'::c + IL_000e: ldloc.0 + IL_000f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0014: tail. + IL_0016: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_001b: ret + } // end of method 'Pipe #2 input at line 19@21-1'::Invoke + + } // end of class 'Pipe #2 input at line 19@21-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 19@20' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Collections.IEnumerable>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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 [mscorlib]System.Collections.IEnumerable>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #2 input at line 19@20'::builder@ + IL_000d: ret + } // end of method 'Pipe #2 input at line 19@20'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable> + Invoke(class [Utils]Utils/Customer _arg1) cil managed + { + // Code size 45 (0x2d) + .maxstack 8 + .locals init ([0] class [Utils]Utils/Customer c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .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 + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #2 input at line 19@20'::builder@ + IL_000e: ldloc.0 + IL_000f: callvirt instance class [Utils]Utils/Order[] [Utils]Utils/Customer::get_Orders() + IL_0014: 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_0019: ldarg.0 + IL_001a: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #2 input at line 19@20'::builder@ + IL_001f: ldloc.0 + IL_0020: newobj instance void Linq101Partitioning01/'Pipe #2 input at line 19@21-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder, + class [Utils]Utils/Customer) + IL_0025: tail. + IL_0027: 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_002c: ret + } // end of method 'Pipe #2 input at line 19@20'::Invoke + + } // end of class 'Pipe #2 input at line 19@20' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 19@22-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool> + { + .field static assembly initonly class Linq101Partitioning01/'Pipe #2 input at line 19@22-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 19@22-2'::.ctor + + .method public strict virtual instance bool + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 31 (0x1f) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 22,22 : 16,31 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance string [Utils]Utils/Customer::get_Region() + IL_0014: ldstr "WA" + IL_0019: call bool [netstandard]System.String::Equals(string, + string) + IL_001e: ret + } // end of method 'Pipe #2 input at line 19@22-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Partitioning01/'Pipe #2 input at line 19@22-2'::.ctor() + IL_0005: stsfld class Linq101Partitioning01/'Pipe #2 input at line 19@22-2' Linq101Partitioning01/'Pipe #2 input at line 19@22-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 19@22-2'::.cctor + + } // end of class 'Pipe #2 input at line 19@22-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 19@23-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3> + { + .field static assembly initonly class Linq101Partitioning01/'Pipe #2 input at line 19@23-3' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 19@23-3'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`3 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 38 (0x26) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 23,23 : 17,53 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance string [Utils]Utils/Customer::get_CustomerID() + IL_0014: ldloc.1 + IL_0015: callvirt instance int32 [Utils]Utils/Order::get_OrderID() + IL_001a: ldloc.1 + IL_001b: callvirt instance valuetype [mscorlib]System.DateTime [Utils]Utils/Order::get_OrderDate() + IL_0020: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_0025: ret + } // end of method 'Pipe #2 input at line 19@23-3'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Partitioning01/'Pipe #2 input at line 19@23-3'::.ctor() + IL_0005: stsfld class Linq101Partitioning01/'Pipe #2 input at line 19@23-3' Linq101Partitioning01/'Pipe #2 input at line 19@23-3'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 19@23-3'::.cctor + + } // end of class 'Pipe #2 input at line 19@23-3' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #3 input at line 28@29' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #3 input at line 28@29'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #3 input at line 28@29'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #3 input at line 28@29'::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::current + IL_0006: ret + } // end of method 'Pipe #3 input at line 28@29'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Partitioning01/'Pipe #3 input at line 28@29'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method 'Pipe #3 input at line 28@29'::GetFreshEnumerator + + } // end of class 'Pipe #3 input at line 28@29' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 35@37-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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 ) + .field public class [Utils]Utils/Customer c + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder builder@, + class [Utils]Utils/Customer c) 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,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #4 input at line 35@37-1'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [Utils]Utils/Customer Linq101Partitioning01/'Pipe #4 input at line 35@37-1'::c + IL_0014: ret + } // end of method 'Pipe #4 input at line 35@37-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [Utils]Utils/Order _arg2) cil managed + { + // Code size 28 (0x1c) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 38,38 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #4 input at line 35@37-1'::builder@ + IL_0008: ldarg.0 + IL_0009: ldfld class [Utils]Utils/Customer Linq101Partitioning01/'Pipe #4 input at line 35@37-1'::c + IL_000e: ldloc.0 + IL_000f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0014: tail. + IL_0016: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_001b: ret + } // end of method 'Pipe #4 input at line 35@37-1'::Invoke + + } // end of class 'Pipe #4 input at line 35@37-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 35@36' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Collections.IEnumerable>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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 [mscorlib]System.Collections.IEnumerable>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #4 input at line 35@36'::builder@ + IL_000d: ret + } // end of method 'Pipe #4 input at line 35@36'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable> + Invoke(class [Utils]Utils/Customer _arg1) cil managed + { + // Code size 45 (0x2d) + .maxstack 8 + .locals init ([0] class [Utils]Utils/Customer c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .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 + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #4 input at line 35@36'::builder@ + IL_000e: ldloc.0 + IL_000f: callvirt instance class [Utils]Utils/Order[] [Utils]Utils/Customer::get_Orders() + IL_0014: 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_0019: ldarg.0 + IL_001a: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #4 input at line 35@36'::builder@ + IL_001f: ldloc.0 + IL_0020: newobj instance void Linq101Partitioning01/'Pipe #4 input at line 35@37-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder, + class [Utils]Utils/Customer) + IL_0025: tail. + IL_0027: 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_002c: ret + } // end of method 'Pipe #4 input at line 35@36'::Invoke + + } // end of class 'Pipe #4 input at line 35@36' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 35@38-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool> + { + .field static assembly initonly class Linq101Partitioning01/'Pipe #4 input at line 35@38-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool>::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 35@38-2'::.ctor + + .method public strict virtual instance bool + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 31 (0x1f) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 38,38 : 16,31 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance string [Utils]Utils/Customer::get_Region() + IL_0014: ldstr "WA" + IL_0019: call bool [netstandard]System.String::Equals(string, + string) + IL_001e: ret + } // end of method 'Pipe #4 input at line 35@38-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Partitioning01/'Pipe #4 input at line 35@38-2'::.ctor() + IL_0005: stsfld class Linq101Partitioning01/'Pipe #4 input at line 35@38-2' Linq101Partitioning01/'Pipe #4 input at line 35@38-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 35@38-2'::.cctor + + } // end of class 'Pipe #4 input at line 35@38-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 35@39-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3> + { + .field static assembly initonly class Linq101Partitioning01/'Pipe #4 input at line 35@39-3' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3>::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 35@39-3'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`3 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 38 (0x26) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 39,39 : 17,53 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance string [Utils]Utils/Customer::get_CustomerID() + IL_0014: ldloc.1 + IL_0015: callvirt instance int32 [Utils]Utils/Order::get_OrderID() + IL_001a: ldloc.1 + IL_001b: callvirt instance valuetype [mscorlib]System.DateTime [Utils]Utils/Order::get_OrderDate() + IL_0020: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_0025: ret + } // end of method 'Pipe #4 input at line 35@39-3'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Partitioning01/'Pipe #4 input at line 35@39-3'::.ctor() + IL_0005: stsfld class Linq101Partitioning01/'Pipe #4 input at line 35@39-3' Linq101Partitioning01/'Pipe #4 input at line 35@39-3'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 35@39-3'::.cctor + + } // end of class 'Pipe #4 input at line 35@39-3' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #5 input at line 44@45' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #5 input at line 44@45'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #5 input at line 44@45'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #5 input at line 44@45'::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::current + IL_0006: ret + } // end of method 'Pipe #5 input at line 44@45'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Partitioning01/'Pipe #5 input at line 44@45'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method 'Pipe #5 input at line 44@45'::GetFreshEnumerator + + } // end of class 'Pipe #5 input at line 44@45' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #5 input at line 44@46-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Partitioning01/'Pipe #5 input at line 44@46-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #5 input at line 44@46-1'::.ctor + + .method public strict virtual instance bool + Invoke(int32 n) cil managed + { + // Code size 5 (0x5) + .maxstack 8 + .line 46,46 : 20,25 '' + IL_0000: ldarg.1 + IL_0001: ldc.i4.6 + IL_0002: clt + IL_0004: ret + } // end of method 'Pipe #5 input at line 44@46-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Partitioning01/'Pipe #5 input at line 44@46-1'::.ctor() + IL_0005: stsfld class Linq101Partitioning01/'Pipe #5 input at line 44@46-1' Linq101Partitioning01/'Pipe #5 input at line 44@46-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #5 input at line 44@46-1'::.cctor + + } // end of class 'Pipe #5 input at line 44@46-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #6 input at line 51@52' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #6 input at line 51@52'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #6 input at line 51@52'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #6 input at line 51@52'::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::current + IL_0006: ret + } // end of method 'Pipe #6 input at line 51@52'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Partitioning01/'Pipe #6 input at line 51@52'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method 'Pipe #6 input at line 51@52'::GetFreshEnumerator + + } // end of class 'Pipe #6 input at line 51@52' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 51@53-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Partitioning01/'Pipe #6 input at line 51@53-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #6 input at line 51@53-1'::.ctor + + .method public strict virtual instance bool + Invoke(int32 n) cil managed + { + // Code size 10 (0xa) + .maxstack 8 + .line 53,53 : 20,30 '' + IL_0000: ldarg.1 + IL_0001: ldc.i4.3 + IL_0002: rem + IL_0003: ldc.i4.0 + IL_0004: ceq + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } // end of method 'Pipe #6 input at line 51@53-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Partitioning01/'Pipe #6 input at line 51@53-1'::.ctor() + IL_0005: stsfld class Linq101Partitioning01/'Pipe #6 input at line 51@53-1' Linq101Partitioning01/'Pipe #6 input at line 51@53-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #6 input at line 51@53-1'::.cctor + + } // end of class 'Pipe #6 input at line 51@53-1' + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::numbers@7 + IL_0005: ret + } // end of method Linq101Partitioning01::get_numbers + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_first3Numbers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::first3Numbers@10 + IL_0005: ret + } // end of method Linq101Partitioning01::get_first3Numbers + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_customers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::customers@17 + IL_0005: ret + } // end of method Linq101Partitioning01::get_customers + + .method public specialname static class [mscorlib]System.Tuple`3[] + get_WAOrders() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Partitioning01::WAOrders@18 + IL_0005: ret + } // end of method Linq101Partitioning01::get_WAOrders + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_allButFirst4Numbers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::allButFirst4Numbers@27 + IL_0005: ret + } // end of method Linq101Partitioning01::get_allButFirst4Numbers + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + get_WAOrders2() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$Linq101Partitioning01::WAOrders2@34 + IL_0005: ret + } // end of method Linq101Partitioning01::get_WAOrders2 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_firstNumbersLessThan6() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::firstNumbersLessThan6@43 + IL_0005: ret + } // end of method Linq101Partitioning01::get_firstNumbersLessThan6 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_allButFirst3Numbers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::allButFirst3Numbers@50 + IL_0005: ret + } // end of method Linq101Partitioning01::get_allButFirst3Numbers + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() + } // end of property Linq101Partitioning01::numbers + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + first3Numbers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_first3Numbers() + } // end of property Linq101Partitioning01::first3Numbers + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + customers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() + } // end of property Linq101Partitioning01::customers + .property class [mscorlib]System.Tuple`3[] + WAOrders() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`3[] Linq101Partitioning01::get_WAOrders() + } // end of property Linq101Partitioning01::WAOrders + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + allButFirst4Numbers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_allButFirst4Numbers() + } // end of property Linq101Partitioning01::allButFirst4Numbers + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + WAOrders2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> Linq101Partitioning01::get_WAOrders2() + } // end of property Linq101Partitioning01::WAOrders2 + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + firstNumbersLessThan6() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_firstNumbersLessThan6() + } // end of property Linq101Partitioning01::firstNumbersLessThan6 + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + allButFirst3Numbers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_allButFirst3Numbers() + } // end of property Linq101Partitioning01::allButFirst3Numbers +} // end of class Linq101Partitioning01 + +.class private abstract auto ansi sealed ''.$Linq101Partitioning01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers@7 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 first3Numbers@10 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers@17 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`3[] WAOrders@18 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 allButFirst4Numbers@27 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> WAOrders2@34 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 firstNumbersLessThan6@43 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 allButFirst3Numbers@50 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // 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, + [2] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers, + [3] class [mscorlib]System.Tuple`3[] WAOrders, + [4] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 allButFirst4Numbers, + [5] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> WAOrders2, + [6] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 firstNumbersLessThan6, + [7] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 allButFirst3Numbers, + [8] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 11', + [9] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_9, + [10] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #2 input at line 19', + [11] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_11, + [12] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #3 input at line 28', + [13] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_13, + [14] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #4 input at line 35', + [15] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_15, + [16] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #4 stage #1 at line 40', + [17] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #5 input at line 44', + [18] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_18, + [19] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #6 input at line 51', + [20] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_20) + .line 7,7 : 1,47 '' + IL_0000: ldc.i4.5 + IL_0001: ldc.i4.4 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.3 + IL_0004: ldc.i4.s 9 + IL_0006: ldc.i4.8 + IL_0007: ldc.i4.6 + IL_0008: ldc.i4.7 + IL_0009: ldc.i4.2 + IL_000a: ldc.i4.0 + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0010: 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_0015: 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_001a: 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_001f: 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_0024: 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_0029: 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_002e: 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_0033: 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_0038: 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_003d: 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_0042: dup + IL_0043: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::numbers@7 + IL_0048: stloc.0 + .line 11,11 : 5,10 '' + 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: newobj instance void Linq101Partitioning01/'Pipe #1 input at line 11@12'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + 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_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_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_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_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 + .line 20,20 : 9,12 '' + IL_0091: ldloc.s V_11 + IL_0093: ldloc.s V_11 + 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_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_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_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_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_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_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_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_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_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 + 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_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_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_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_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_014e: stloc.s 'Pipe #4 stage #1 at line 40' + .line 40,40 : 24,34 '' + 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_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_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_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_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_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_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_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_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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs new file mode 100644 index 00000000000..0c71cf21059 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs @@ -0,0 +1,43 @@ +// #Conformance #DataExpressions #Query +// Quantifier LINQ101 samples converted to query +open System +open System.Collections.Generic +open System.Linq + +// Any - Simple +let words = ["believe"; "relief"; "receipt"; "field"] + +let iAfterE = + query { + for w in words do + exists (w.Contains("ei")) + } + +// Any - Grouped +let products = getProductList() + +let productGroups = + query { + for p in products do + groupValBy p p.Category into g + where (g.Any(fun x -> x.UnitsInStock = 0)) + select (g.Key, g) + } |> Seq.toArray + +// All - simple +let numbers = [1;11;3;19;41;65;19] + +let onlyOdd = + query { + for n in numbers do + all (n % 2 = 1) + } + +// All - Grouped +let productGroups2 = + query { + for p in products do + groupValBy p p.Category into g + where (g.All(fun x -> x.UnitsInStock > 0)) + select (g.Key, g) + } |> Seq.toArray diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl new file mode 100644 index 00000000000..cee73d81f73 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl @@ -0,0 +1,1576 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern Utils +{ + .ver 0:0:0:0 +} +.assembly extern System.Core +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly Linq101Quantifiers01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Linq101Quantifiers01 +{ + // Offset: 0x00000000 Length: 0x00000393 +} +.mresource public FSharpOptimizationData.Linq101Quantifiers01 +{ + // Offset: 0x00000398 Length: 0x000000FF +} +.module Linq101Quantifiers01.exe +// MVID: {61FD32BA-76DD-E373-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07130000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Linq101Quantifiers01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname iAfterE@12 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101Quantifiers01/iAfterE@12::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method iAfterE@12::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] string V_0, + [1] string 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\\QueryExpressionStepping\\Linq101Quantifiers01.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101Quantifiers01/iAfterE@12::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method iAfterE@12::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method iAfterE@12::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101Quantifiers01/iAfterE@12::current + IL_0006: ret + } // end of method iAfterE@12::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Quantifiers01/iAfterE@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method iAfterE@12::GetFreshEnumerator + + } // end of class iAfterE@12 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'iAfterE@13-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Quantifiers01/'iAfterE@13-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'iAfterE@13-1'::.ctor + + .method public strict virtual instance bool + Invoke(string w) cil managed + { + // Code size 12 (0xc) + .maxstack 8 + .line 13,13 : 17,33 '' + IL_0000: ldarg.1 + IL_0001: ldstr "ei" + IL_0006: callvirt instance bool [mscorlib]System.String::Contains(string) + IL_000b: ret + } // end of method 'iAfterE@13-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Quantifiers01/'iAfterE@13-1'::.ctor() + IL_0005: stsfld class Linq101Quantifiers01/'iAfterE@13-1' Linq101Quantifiers01/'iAfterE@13-1'::@_instance + IL_000a: ret + } // end of method 'iAfterE@13-1'::.cctor + + } // end of class 'iAfterE@13-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 20@21' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Quantifiers01/'Pipe #1 input at line 20@21'::builder@ + IL_000d: ret + } // end of method 'Pipe #1 input at line 20@21'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 22,22 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Quantifiers01/'Pipe #1 input at line 20@21'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #1 input at line 20@21'::Invoke + + } // end of class 'Pipe #1 input at line 20@21' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 20@22-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Quantifiers01/'Pipe #1 input at line 20@22-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 20@22-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 22,22 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #1 input at line 20@22-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@22-1'::.ctor() + IL_0005: stsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-1' Linq101Quantifiers01/'Pipe #1 input at line 20@22-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 20@22-1'::.cctor + + } // end of class 'Pipe #1 input at line 20@22-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 20@22-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Quantifiers01/'Pipe #1 input at line 20@22-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 20@22-2'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 22,22 : 22,32 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #1 input at line 20@22-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@22-2'::.ctor() + IL_0005: stsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-2' Linq101Quantifiers01/'Pipe #1 input at line 20@22-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 20@22-2'::.cctor + + } // end of class 'Pipe #1 input at line 20@22-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 20@22-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Quantifiers01/'Pipe #1 input at line 20@22-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #1 input at line 20@22-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g) + .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 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_0010: ret + } // end of method 'Pipe #1 input at line 20@22-3'::Invoke + + } // end of class 'Pipe #1 input at line 20@22-3' + + .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #1 input at line 20@23-5' + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .method assembly static bool Invoke(class [Utils]Utils/Product x) cil managed + { + // Code size 10 (0xa) + .maxstack 8 + .line 23,23 : 31,49 '' + IL_0000: ldarg.0 + IL_0001: callvirt instance int32 [Utils]Utils/Product::get_UnitsInStock() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } // end of method 'Pipe #1 input at line 20@23-5'::Invoke + + } // end of class 'Pipe #1 input at line 20@23-5' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 20@23-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool> + { + .field static assembly initonly class Linq101Quantifiers01/'Pipe #1 input at line 20@23-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool>::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 20@23-4'::.ctor + + .method public strict virtual instance bool + Invoke(class [System.Core]System.Linq.IGrouping`2 g) cil managed + { + // Code size 19 (0x13) + .maxstack 8 + .line 23,23 : 16,50 '' + IL_0000: ldarg.1 + IL_0001: ldnull + IL_0002: ldftn bool Linq101Quantifiers01/'Pipe #1 input at line 20@23-5'::Invoke(class [Utils]Utils/Product) + IL_0008: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_000d: call bool [System.Core]System.Linq.Enumerable::Any(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0012: ret + } // end of method 'Pipe #1 input at line 20@23-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@23-4'::.ctor() + IL_0005: stsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@23-4' Linq101Quantifiers01/'Pipe #1 input at line 20@23-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 20@23-4'::.cctor + + } // end of class 'Pipe #1 input at line 20@23-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 20@24-6' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>> + { + .field static assembly initonly class Linq101Quantifiers01/'Pipe #1 input at line 20@24-6' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>>::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 20@24-6'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2> + Invoke(class [System.Core]System.Linq.IGrouping`2 g) cil managed + { + // Code size 13 (0xd) + .maxstack 8 + .line 24,24 : 17,25 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0006: ldarg.1 + IL_0007: newobj instance void class [mscorlib]System.Tuple`2>::.ctor(!0, + !1) + IL_000c: ret + } // end of method 'Pipe #1 input at line 20@24-6'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@24-6'::.ctor() + IL_0005: stsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@24-6' Linq101Quantifiers01/'Pipe #1 input at line 20@24-6'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 20@24-6'::.cctor + + } // end of class 'Pipe #1 input at line 20@24-6' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname onlyOdd@32 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Quantifiers01/onlyOdd@32::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method onlyOdd@32::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101Quantifiers01/onlyOdd@32::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method onlyOdd@32::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method onlyOdd@32::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Quantifiers01/onlyOdd@32::current + IL_0006: ret + } // end of method onlyOdd@32::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method onlyOdd@32::GetFreshEnumerator + + } // end of class onlyOdd@32 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'onlyOdd@33-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Quantifiers01/'onlyOdd@33-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'onlyOdd@33-1'::.ctor + + .method public strict virtual instance bool + Invoke(int32 n) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 33,33 : 14,23 '' + IL_0000: ldarg.1 + IL_0001: ldc.i4.2 + IL_0002: rem + IL_0003: ldc.i4.1 + IL_0004: ceq + IL_0006: ret + } // end of method 'onlyOdd@33-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Quantifiers01/'onlyOdd@33-1'::.ctor() + IL_0005: stsfld class Linq101Quantifiers01/'onlyOdd@33-1' Linq101Quantifiers01/'onlyOdd@33-1'::@_instance + IL_000a: ret + } // end of method 'onlyOdd@33-1'::.cctor + + } // end of class 'onlyOdd@33-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@39' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Quantifiers01/'Pipe #2 input at line 38@39'::builder@ + IL_000d: ret + } // end of method 'Pipe #2 input at line 38@39'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 40,40 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Quantifiers01/'Pipe #2 input at line 38@39'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #2 input at line 38@39'::Invoke + + } // end of class 'Pipe #2 input at line 38@39' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@40-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Quantifiers01/'Pipe #2 input at line 38@40-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 38@40-1'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 40,40 : 20,21 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #2 input at line 38@40-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@40-1'::.ctor() + IL_0005: stsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-1' Linq101Quantifiers01/'Pipe #2 input at line 38@40-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 38@40-1'::.cctor + + } // end of class 'Pipe #2 input at line 38@40-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@40-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Quantifiers01/'Pipe #2 input at line 38@40-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 38@40-2'::.ctor + + .method public strict virtual instance string + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 40,40 : 22,32 '' + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0008: ret + } // end of method 'Pipe #2 input at line 38@40-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@40-2'::.ctor() + IL_0005: stsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-2' Linq101Quantifiers01/'Pipe #2 input at line 38@40-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 38@40-2'::.cctor + + } // end of class 'Pipe #2 input at line 38@40-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@40-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QuerySource`2,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Quantifiers01/'Pipe #2 input at line 38@40-3'::builder@ + IL_000d: ret + } // end of method 'Pipe #2 input at line 38@40-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g) + .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 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_0010: ret + } // end of method 'Pipe #2 input at line 38@40-3'::Invoke + + } // end of class 'Pipe #2 input at line 38@40-3' + + .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #2 input at line 38@41-5' + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .method assembly static bool Invoke(class [Utils]Utils/Product x) cil managed + { + // Code size 10 (0xa) + .maxstack 8 + .line 41,41 : 31,49 '' + IL_0000: ldarg.0 + IL_0001: callvirt instance int32 [Utils]Utils/Product::get_UnitsInStock() + IL_0006: ldc.i4.0 + IL_0007: cgt + IL_0009: ret + } // end of method 'Pipe #2 input at line 38@41-5'::Invoke + + } // end of class 'Pipe #2 input at line 38@41-5' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@41-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool> + { + .field static assembly initonly class Linq101Quantifiers01/'Pipe #2 input at line 38@41-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 38@41-4'::.ctor + + .method public strict virtual instance bool + Invoke(class [System.Core]System.Linq.IGrouping`2 g) cil managed + { + // Code size 19 (0x13) + .maxstack 8 + .line 41,41 : 16,50 '' + IL_0000: ldarg.1 + IL_0001: ldnull + IL_0002: ldftn bool Linq101Quantifiers01/'Pipe #2 input at line 38@41-5'::Invoke(class [Utils]Utils/Product) + IL_0008: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_000d: call bool [System.Core]System.Linq.Enumerable::All(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0012: ret + } // end of method 'Pipe #2 input at line 38@41-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@41-4'::.ctor() + IL_0005: stsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@41-4' Linq101Quantifiers01/'Pipe #2 input at line 38@41-4'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 38@41-4'::.cctor + + } // end of class 'Pipe #2 input at line 38@41-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 38@42-6' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>> + { + .field static assembly initonly class Linq101Quantifiers01/'Pipe #2 input at line 38@42-6' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 38@42-6'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2> + Invoke(class [System.Core]System.Linq.IGrouping`2 g) cil managed + { + // Code size 13 (0xd) + .maxstack 8 + .line 42,42 : 17,25 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance !0 class [System.Core]System.Linq.IGrouping`2::get_Key() + IL_0006: ldarg.1 + IL_0007: newobj instance void class [mscorlib]System.Tuple`2>::.ctor(!0, + !1) + IL_000c: ret + } // end of method 'Pipe #2 input at line 38@42-6'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@42-6'::.ctor() + IL_0005: stsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@42-6' Linq101Quantifiers01/'Pipe #2 input at line 38@42-6'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 38@42-6'::.cctor + + } // end of class 'Pipe #2 input at line 38@42-6' + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_words() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::words@8 + IL_0005: ret + } // end of method Linq101Quantifiers01::get_words + + .method public specialname static bool + get_iAfterE() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld bool ''.$Linq101Quantifiers01::iAfterE@10 + IL_0005: ret + } // end of method Linq101Quantifiers01::get_iAfterE + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_products() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::products@17 + IL_0005: ret + } // end of method Linq101Quantifiers01::get_products + + .method public specialname static class [mscorlib]System.Tuple`2>[] + get_productGroups() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups@19 + IL_0005: ret + } // end of method Linq101Quantifiers01::get_productGroups + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::numbers@28 + IL_0005: ret + } // end of method Linq101Quantifiers01::get_numbers + + .method public specialname static bool + get_onlyOdd() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld bool ''.$Linq101Quantifiers01::onlyOdd@30 + IL_0005: ret + } // end of method Linq101Quantifiers01::get_onlyOdd + + .method public specialname static class [mscorlib]System.Tuple`2>[] + get_productGroups2() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups2@37 + IL_0005: ret + } // end of method Linq101Quantifiers01::get_productGroups2 + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + words() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_words() + } // end of property Linq101Quantifiers01::words + .property bool iAfterE() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get bool Linq101Quantifiers01::get_iAfterE() + } // end of property Linq101Quantifiers01::iAfterE + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + products() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() + } // end of property Linq101Quantifiers01::products + .property class [mscorlib]System.Tuple`2>[] + productGroups() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2>[] Linq101Quantifiers01::get_productGroups() + } // end of property Linq101Quantifiers01::productGroups + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_numbers() + } // end of property Linq101Quantifiers01::numbers + .property bool onlyOdd() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get bool Linq101Quantifiers01::get_onlyOdd() + } // end of property Linq101Quantifiers01::onlyOdd + .property class [mscorlib]System.Tuple`2>[] + productGroups2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2>[] Linq101Quantifiers01::get_productGroups2() + } // end of property Linq101Quantifiers01::productGroups2 +} // end of class Linq101Quantifiers01 + +.class private abstract auto ansi sealed ''.$Linq101Quantifiers01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words@8 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly bool iAfterE@10 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@17 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2>[] productGroups@19 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers@28 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly bool onlyOdd@30 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2>[] productGroups2@37 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 415 (0x19f) + .maxstack 10 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words, + [1] bool iAfterE, + [2] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, + [3] class [mscorlib]System.Tuple`2>[] productGroups, + [4] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, + [5] bool onlyOdd, + [6] class [mscorlib]System.Tuple`2>[] productGroups2, + [7] class [mscorlib]System.Collections.Generic.IEnumerable`1>> 'Pipe #1 input at line 20', + [8] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_8, + [9] class [mscorlib]System.Collections.Generic.IEnumerable`1>> 'Pipe #2 input at line 38', + [10] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_10) + .line 8,8 : 1,54 '' + IL_0000: ldstr "believe" + IL_0005: ldstr "relief" + IL_000a: ldstr "receipt" + IL_000f: ldstr "field" + IL_0014: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0019: 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_001e: 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_0023: 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_0028: 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_002d: dup + 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: 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_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_0050: dup + IL_0051: stsfld bool ''.$Linq101Quantifiers01::iAfterE@10 + IL_0056: 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 + .line 20,20 : 5,10 '' + 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + 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_0128: dup + IL_0129: stsfld bool ''.$Linq101Quantifiers01::onlyOdd@30 + IL_012e: stloc.s onlyOdd + .line 38,38 : 5,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 + .line 39,39 : 9,12 '' + IL_013f: ldloc.s V_10 + IL_0141: ldloc.s V_10 + 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_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_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_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_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_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_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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Select01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Select01.fs new file mode 100644 index 00000000000..8eaeaf75e16 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Select01.fs @@ -0,0 +1,116 @@ +// #Conformance #DataExpressions #Query +// Select LINQ101 samples converted to query +open System +open System.Collections.Generic +open System.Linq + +let numbers = [ 5; 4; 1; 3; 9; 8; 6; 7; 2; 0 ] + +// Select - Simple 1 +let numsPlusOne = + query { + for n in numbers do + select (n + 1) + } |> Seq.toList + +// Select - Simple 2 +let products = getProductList() + +let productNames = + query { + for p in products do + select (p.ProductName) + } + +// Select - Transformation +let strings = [ "zero"; "one"; "two"; "three"; "four"; "five"; "six"; "seven"; "eight"; "nine" ] +let textNums = + query { + for n in numbers do + select (strings.[n]) + } |> Seq.toList + +// Select - Anonymous Types 1 +let words = ["aPPLE"; "BlUeBeRrY"; "cHeRry" ] + +let upperLowerWords = + query { + for w in words do + select (w.ToUpper(), w.ToLower()) + } |> Seq.toArray + +// Select - Anonymous Types 2 +let digitOddEvens = + query { + for n in numbers do + select (strings.[n], (n % 2) = 0) + } |> Seq.toList + +// Select - Anonymous Types 3 +let productInfos = + query { + for p in products do + select (p.ProductName, p.Category, p.UnitPrice) + } |> Seq.toArray + +// Select - Filtered +let digits = strings +let lowNums = + query { + for n in numbers do + where (n < 5) + select digits.[n] + } |> Seq.toList +if lowNums <> ["four"; "one"; "three"; "two"; "zero"] then printfn "lowNums failed"; raise (new Exception("exit 1")) + +// SelectMany - Compound from 1 +let numbersA = [0; 2; 4; 5; 6; 8; 9] +let numbersB = [1; 3; 5; 7; 8] + +let pairs = + query { + for a in numbersA do + for b in numbersB do + where (a < b) + select (a,b) + } |> Seq.toArray + +// SelectMany - Compound from 2 +let customers = getCustomerList() +let orders = + query { + for c in customers do + for o in c.Orders do + where (o.Total < 500.00M) + select (c.CustomerID, o.OrderID, o.Total) + } |> Seq.toArray + +// SelectMany - compound from 3 +let orders2 = + query { + for c in customers do + for o in c.Orders do + where (o.OrderDate >= DateTime(1998, 1,1)) + select (c.CustomerID, o.OrderID, o.OrderDate) + } |> Seq.toArray + +// SelectMany - from Assignment +let orders3 = + query { + for c in customers do + for o in c.Orders do + where (o.Total >= 2000.0M) + select (c.CustomerID, o.OrderID, o.Total) + } + +// SelectMany - Multiple from +let cutOffDate = DateTime(1997, 1, 1) + +let orders4 = + query { + for c in customers do + where (c.Region = "WA") + for o in c.Orders do + where (o.OrderDate >= cutOffDate) + select (c.CustomerID, o.OrderID) + } \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl new file mode 100644 index 00000000000..d8b2b469cfb --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl @@ -0,0 +1,4294 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern Utils +{ + .ver 0:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly Linq101Select01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Linq101Select01 +{ + // Offset: 0x00000000 Length: 0x00000643 +} +.mresource public FSharpOptimizationData.Linq101Select01 +{ + // Offset: 0x00000648 Length: 0x00000204 +} +.module Linq101Select01.exe +// MVID: {61FD32BA-6057-8F80-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05A30000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Linq101Select01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 11@12-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Linq101Select01/'Pipe #1 input at line 11@12-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 11@12-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1 + Invoke(int32 _arg1) cil managed + { + // Code size 11 (0xb) + .maxstack 5 + .locals init ([0] int32 n) + .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\\QueryExpressionStepping\\Linq101Select01.fs' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 13,13 : 9,23 '' + IL_0002: ldloc.0 + IL_0003: tail. + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_000a: ret + } // end of method 'Pipe #1 input at line 11@12-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #1 input at line 11@12-1'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #1 input at line 11@12-1' Linq101Select01/'Pipe #1 input at line 11@12-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 11@12-1'::.cctor + + } // end of class 'Pipe #1 input at line 11@12-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #1 input at line 11@13' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #1 input at line 11@13'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #1 input at line 11@13'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 158 (0x9e) + .maxstack 7 + .locals init ([0] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0074 + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0071 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_0095 + + .line 100001,100001 : 0,0 '' + 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, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #1 input at line 11@13'::'enum' + IL_003f: ldarg.0 + IL_0040: ldc.i4.1 + IL_0041: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc + 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() + IL_0051: brfalse.s IL_0074 + + IL_0053: ldarg.0 + 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 + 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 + IL_006a: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::current + IL_006f: ldc.i4.1 + IL_0070: ret + + .line 100001,100001 : 0,0 '' + IL_0071: nop + IL_0072: br.s IL_0046 + + IL_0074: ldarg.0 + IL_0075: ldc.i4.3 + IL_0076: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc + 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) + IL_0086: nop + IL_0087: ldarg.0 + IL_0088: ldnull + IL_0089: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #1 input at line 11@13'::'enum' + IL_008e: ldarg.0 + IL_008f: ldc.i4.3 + IL_0090: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc + IL_0095: ldarg.0 + IL_0096: ldc.i4.0 + IL_0097: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::current + IL_009c: ldc.i4.0 + IL_009d: ret + } // end of method 'Pipe #1 input at line 11@13'::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #1 input at line 11@13'::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #1 input at line 11@13'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #1 input at line 11@13'::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::current + IL_0006: ret + } // end of method 'Pipe #1 input at line 11@13'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Select01/'Pipe #1 input at line 11@13'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method 'Pipe #1 input at line 11@13'::GetFreshEnumerator + + } // end of class 'Pipe #1 input at line 11@13' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'productNames@21-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Linq101Select01/'productNames@21-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } // end of method 'productNames@21-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 11 (0xb) + .maxstack 5 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 22,22 : 9,31 '' + IL_0002: ldloc.0 + IL_0003: tail. + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_000a: ret + } // end of method 'productNames@21-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'productNames@21-1'::.ctor() + IL_0005: stsfld class Linq101Select01/'productNames@21-1' Linq101Select01/'productNames@21-1'::@_instance + IL_000a: ret + } // end of method 'productNames@21-1'::.cctor + + } // end of class 'productNames@21-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname productNames@22 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Select01/productNames@22::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101Select01/productNames@22::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method productNames@22::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 161 (0xa1) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/productNames@22::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0077 + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0074 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_0098 + + .line 100001,100001 : 0,0 '' + 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, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_003f: ldarg.0 + IL_0040: ldc.i4.1 + IL_0041: stfld int32 Linq101Select01/productNames@22::pc + 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() + IL_0051: brfalse.s IL_0077 + + IL_0053: ldarg.0 + 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 + 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 + IL_0072: ldc.i4.1 + IL_0073: ret + + .line 100001,100001 : 0,0 '' + IL_0074: nop + IL_0075: br.s IL_0046 + + IL_0077: ldarg.0 + IL_0078: ldc.i4.3 + IL_0079: stfld int32 Linq101Select01/productNames@22::pc + 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) + IL_0089: nop + IL_008a: ldarg.0 + IL_008b: ldnull + IL_008c: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_0091: ldarg.0 + IL_0092: ldc.i4.3 + IL_0093: stfld int32 Linq101Select01/productNames@22::pc + IL_0098: ldarg.0 + IL_0099: ldnull + IL_009a: stfld string Linq101Select01/productNames@22::current + IL_009f: ldc.i4.0 + IL_00a0: ret + } // end of method productNames@22::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/productNames@22::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Select01/productNames@22::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Select01/productNames@22::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Select01/productNames@22::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101Select01/productNames@22::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method productNames@22::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/productNames@22::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method productNames@22::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101Select01/productNames@22::current + IL_0006: ret + } // end of method productNames@22::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Select01/productNames@22::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method productNames@22::GetFreshEnumerator + + } // end of class productNames@22 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 28@29-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Linq101Select01/'Pipe #2 input at line 28@29-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 28@29-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1 + Invoke(int32 _arg1) cil managed + { + // Code size 11 (0xb) + .maxstack 5 + .locals init ([0] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 30,30 : 9,29 '' + IL_0002: ldloc.0 + IL_0003: tail. + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_000a: ret + } // end of method 'Pipe #2 input at line 28@29-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #2 input at line 28@29-1'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #2 input at line 28@29-1' Linq101Select01/'Pipe #2 input at line 28@29-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 28@29-1'::.cctor + + } // end of class 'Pipe #2 input at line 28@29-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #2 input at line 28@30' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #2 input at line 28@30'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101Select01/'Pipe #2 input at line 28@30'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #2 input at line 28@30'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 166 (0xa6) + .maxstack 7 + .locals init ([0] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_007c + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0079 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_009d + + .line 100001,100001 : 0,0 '' + 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, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #2 input at line 28@30'::'enum' + IL_003f: ldarg.0 + IL_0040: ldc.i4.1 + IL_0041: stfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc + 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() + IL_0051: brfalse.s IL_007c + + IL_0053: ldarg.0 + 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 + 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) + IL_0072: stfld string Linq101Select01/'Pipe #2 input at line 28@30'::current + IL_0077: ldc.i4.1 + IL_0078: ret + + .line 100001,100001 : 0,0 '' + IL_0079: nop + IL_007a: br.s IL_0046 + + IL_007c: ldarg.0 + IL_007d: ldc.i4.3 + IL_007e: stfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc + 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) + IL_008e: nop + IL_008f: ldarg.0 + IL_0090: ldnull + IL_0091: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #2 input at line 28@30'::'enum' + IL_0096: ldarg.0 + IL_0097: ldc.i4.3 + IL_0098: stfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc + IL_009d: ldarg.0 + IL_009e: ldnull + IL_009f: stfld string Linq101Select01/'Pipe #2 input at line 28@30'::current + IL_00a4: ldc.i4.0 + IL_00a5: ret + } // end of method 'Pipe #2 input at line 28@30'::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #2 input at line 28@30'::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101Select01/'Pipe #2 input at line 28@30'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #2 input at line 28@30'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #2 input at line 28@30'::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101Select01/'Pipe #2 input at line 28@30'::current + IL_0006: ret + } // end of method 'Pipe #2 input at line 28@30'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Select01/'Pipe #2 input at line 28@30'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method 'Pipe #2 input at line 28@30'::GetFreshEnumerator + + } // end of class 'Pipe #2 input at line 28@30' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 37@38-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Linq101Select01/'Pipe #3 input at line 37@38-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 37@38-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1 + Invoke(string _arg1) cil managed + { + // Code size 11 (0xb) + .maxstack 5 + .locals init ([0] string w) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 39,39 : 8,41 '' + IL_0002: ldloc.0 + IL_0003: tail. + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_000a: ret + } // end of method 'Pipe #3 input at line 37@38-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #3 input at line 37@38-1'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #3 input at line 37@38-1' Linq101Select01/'Pipe #3 input at line 37@38-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 37@38-1'::.cctor + + } // end of class 'Pipe #3 input at line 37@38-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #3 input at line 37@39' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1> + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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.Tuple`2 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [mscorlib]System.Tuple`2 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #3 input at line 37@39'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld class [mscorlib]System.Tuple`2 Linq101Select01/'Pipe #3 input at line 37@39'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() + IL_001b: ret + } // end of method 'Pipe #3 input at line 37@39'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1>& next) cil managed + { + // Code size 175 (0xaf) + .maxstack 7 + .locals init ([0] string w) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0085 + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0082 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br IL_00a6 + + .line 100001,100001 : 0,0 '' + 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, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0038: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003d: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #3 input at line 37@39'::'enum' + IL_0042: ldarg.0 + IL_0043: ldc.i4.1 + IL_0044: stfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc + 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() + IL_0054: brfalse.s IL_0085 + + IL_0056: ldarg.0 + 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 + 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 + IL_0071: callvirt instance string [mscorlib]System.String::ToLower() + IL_0076: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_007b: stfld class [mscorlib]System.Tuple`2 Linq101Select01/'Pipe #3 input at line 37@39'::current + IL_0080: ldc.i4.1 + IL_0081: ret + + .line 100001,100001 : 0,0 '' + IL_0082: nop + IL_0083: br.s IL_0049 + + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc + 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) + IL_0097: nop + IL_0098: ldarg.0 + IL_0099: ldnull + IL_009a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #3 input at line 37@39'::'enum' + IL_009f: ldarg.0 + IL_00a0: ldc.i4.3 + IL_00a1: stfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc + IL_00a6: ldarg.0 + IL_00a7: ldnull + IL_00a8: stfld class [mscorlib]System.Tuple`2 Linq101Select01/'Pipe #3 input at line 37@39'::current + IL_00ad: ldc.i4.0 + IL_00ae: ret + } // end of method 'Pipe #3 input at line 37@39'::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [mscorlib]System.Tuple`2 Linq101Select01/'Pipe #3 input at line 37@39'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #3 input at line 37@39'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #3 input at line 37@39'::get_CheckClose + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [mscorlib]System.Tuple`2 Linq101Select01/'Pipe #3 input at line 37@39'::current + IL_0006: ret + } // end of method 'Pipe #3 input at line 37@39'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1> + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: 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_0008: ret + } // end of method 'Pipe #3 input at line 37@39'::GetFreshEnumerator + + } // end of class 'Pipe #3 input at line 37@39' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #4 input at line 44@45-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Linq101Select01/'Pipe #4 input at line 44@45-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #4 input at line 44@45-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1 + Invoke(int32 _arg1) cil managed + { + // Code size 11 (0xb) + .maxstack 5 + .locals init ([0] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 46,46 : 9,42 '' + IL_0002: ldloc.0 + IL_0003: tail. + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_000a: ret + } // end of method 'Pipe #4 input at line 44@45-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #4 input at line 44@45-1'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #4 input at line 44@45-1' Linq101Select01/'Pipe #4 input at line 44@45-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #4 input at line 44@45-1'::.cctor + + } // end of class 'Pipe #4 input at line 44@45-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #4 input at line 44@46' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1> + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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.Tuple`2 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [mscorlib]System.Tuple`2 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #4 input at line 44@46'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld class [mscorlib]System.Tuple`2 Linq101Select01/'Pipe #4 input at line 44@46'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() + IL_001b: ret + } // end of method 'Pipe #4 input at line 44@46'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1>& next) cil managed + { + // Code size 180 (0xb4) + .maxstack 8 + .locals init ([0] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_008a + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0087 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br IL_00ab + + .line 100001,100001 : 0,0 '' + 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, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0038: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003d: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #4 input at line 44@46'::'enum' + IL_0042: ldarg.0 + IL_0043: ldc.i4.1 + IL_0044: stfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc + 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() + IL_0054: brfalse.s IL_008a + + IL_0056: ldarg.0 + 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 + 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) + IL_0075: ldloc.0 + IL_0076: ldc.i4.2 + IL_0077: rem + IL_0078: ldc.i4.0 + IL_0079: ceq + IL_007b: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0080: stfld class [mscorlib]System.Tuple`2 Linq101Select01/'Pipe #4 input at line 44@46'::current + IL_0085: ldc.i4.1 + IL_0086: ret + + .line 100001,100001 : 0,0 '' + IL_0087: nop + IL_0088: br.s IL_0049 + + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc + 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) + IL_009c: nop + IL_009d: ldarg.0 + IL_009e: ldnull + IL_009f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #4 input at line 44@46'::'enum' + IL_00a4: ldarg.0 + IL_00a5: ldc.i4.3 + IL_00a6: stfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc + IL_00ab: ldarg.0 + IL_00ac: ldnull + IL_00ad: stfld class [mscorlib]System.Tuple`2 Linq101Select01/'Pipe #4 input at line 44@46'::current + IL_00b2: ldc.i4.0 + IL_00b3: ret + } // end of method 'Pipe #4 input at line 44@46'::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [mscorlib]System.Tuple`2 Linq101Select01/'Pipe #4 input at line 44@46'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #4 input at line 44@46'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #4 input at line 44@46'::get_CheckClose + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [mscorlib]System.Tuple`2 Linq101Select01/'Pipe #4 input at line 44@46'::current + IL_0006: ret + } // end of method 'Pipe #4 input at line 44@46'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1> + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: 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_0008: ret + } // end of method 'Pipe #4 input at line 44@46'::GetFreshEnumerator + + } // end of class 'Pipe #4 input at line 44@46' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #5 input at line 51@52-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Linq101Select01/'Pipe #5 input at line 51@52-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #5 input at line 51@52-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 11 (0xb) + .maxstack 5 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 53,53 : 9,56 '' + IL_0002: ldloc.0 + IL_0003: tail. + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_000a: ret + } // end of method 'Pipe #5 input at line 51@52-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #5 input at line 51@52-1'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #5 input at line 51@52-1' Linq101Select01/'Pipe #5 input at line 51@52-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #5 input at line 51@52-1'::.cctor + + } // end of class 'Pipe #5 input at line 51@52-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #5 input at line 51@53' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1> + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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.Tuple`3 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + class [mscorlib]System.Tuple`3 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #5 input at line 51@53'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld class [mscorlib]System.Tuple`3 Linq101Select01/'Pipe #5 input at line 51@53'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() + IL_001b: ret + } // end of method 'Pipe #5 input at line 51@53'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1>& next) cil managed + { + // Code size 181 (0xb5) + .maxstack 8 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_008b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0088 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br IL_00ac + + .line 100001,100001 : 0,0 '' + 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, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0038: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003d: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #5 input at line 51@53'::'enum' + IL_0042: ldarg.0 + IL_0043: ldc.i4.1 + IL_0044: stfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc + 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() + IL_0054: brfalse.s IL_008b + + IL_0056: ldarg.0 + 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 + 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 + IL_0071: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0076: ldloc.0 + IL_0077: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_007c: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_0081: stfld class [mscorlib]System.Tuple`3 Linq101Select01/'Pipe #5 input at line 51@53'::current + IL_0086: ldc.i4.1 + IL_0087: ret + + .line 100001,100001 : 0,0 '' + IL_0088: nop + IL_0089: br.s IL_0049 + + IL_008b: ldarg.0 + IL_008c: ldc.i4.3 + IL_008d: stfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc + 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) + IL_009d: nop + IL_009e: ldarg.0 + IL_009f: ldnull + IL_00a0: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #5 input at line 51@53'::'enum' + IL_00a5: ldarg.0 + IL_00a6: ldc.i4.3 + IL_00a7: stfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc + IL_00ac: ldarg.0 + IL_00ad: ldnull + IL_00ae: stfld class [mscorlib]System.Tuple`3 Linq101Select01/'Pipe #5 input at line 51@53'::current + IL_00b3: ldc.i4.0 + IL_00b4: ret + } // end of method 'Pipe #5 input at line 51@53'::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld class [mscorlib]System.Tuple`3 Linq101Select01/'Pipe #5 input at line 51@53'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #5 input at line 51@53'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #5 input at line 51@53'::get_CheckClose + + .method public strict virtual instance class [mscorlib]System.Tuple`3 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [mscorlib]System.Tuple`3 Linq101Select01/'Pipe #5 input at line 51@53'::current + IL_0006: ret + } // end of method 'Pipe #5 input at line 51@53'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1> + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: 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_0008: ret + } // end of method 'Pipe #5 input at line 51@53'::GetFreshEnumerator + + } // end of class 'Pipe #5 input at line 51@53' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 59@60' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Select01/'Pipe #6 input at line 59@60'::builder@ + IL_000d: ret + } // end of method 'Pipe #6 input at line 59@60'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(int32 _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] int32 n) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 61,61 : 9,22 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #6 input at line 59@60'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #6 input at line 59@60'::Invoke + + } // end of class 'Pipe #6 input at line 59@60' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 59@61-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Select01/'Pipe #6 input at line 59@61-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #6 input at line 59@61-1'::.ctor + + .method public strict virtual instance bool + Invoke(int32 n) cil managed + { + // Code size 5 (0x5) + .maxstack 8 + .line 61,61 : 16,21 '' + IL_0000: ldarg.1 + IL_0001: ldc.i4.5 + IL_0002: clt + IL_0004: ret + } // end of method 'Pipe #6 input at line 59@61-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #6 input at line 59@61-1'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #6 input at line 59@61-1' Linq101Select01/'Pipe #6 input at line 59@61-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #6 input at line 59@61-1'::.cctor + + } // end of class 'Pipe #6 input at line 59@61-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #6 input at line 59@62-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Select01/'Pipe #6 input at line 59@62-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #6 input at line 59@62-2'::.ctor + + .method public strict virtual instance string + Invoke(int32 n) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + .line 62,62 : 16,26 '' + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_digits() + IL_0005: ldarg.1 + IL_0006: tail. + IL_0008: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Item(int32) + IL_000d: ret + } // end of method 'Pipe #6 input at line 59@62-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #6 input at line 59@62-2'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #6 input at line 59@62-2' Linq101Select01/'Pipe #6 input at line 59@62-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #6 input at line 59@62-2'::.cctor + + } // end of class 'Pipe #6 input at line 59@62-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #7 input at line 71@73-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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 ) + .field public int32 a + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder builder@, + int32 a) 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,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #7 input at line 71@73-1'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 Linq101Select01/'Pipe #7 input at line 71@73-1'::a + IL_0014: ret + } // end of method 'Pipe #7 input at line 71@73-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(int32 _arg2) cil managed + { + // Code size 28 (0x1c) + .maxstack 7 + .locals init ([0] int32 b) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 74,74 : 9,22 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #7 input at line 71@73-1'::builder@ + IL_0008: ldarg.0 + IL_0009: ldfld int32 Linq101Select01/'Pipe #7 input at line 71@73-1'::a + IL_000e: ldloc.0 + IL_000f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0014: tail. + IL_0016: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_001b: ret + } // end of method 'Pipe #7 input at line 71@73-1'::Invoke + + } // end of class 'Pipe #7 input at line 71@73-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #7 input at line 71@72' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Collections.IEnumerable>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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 [mscorlib]System.Collections.IEnumerable>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #7 input at line 71@72'::builder@ + IL_000d: ret + } // end of method 'Pipe #7 input at line 71@72'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable> + Invoke(int32 _arg1) cil managed + { + // Code size 44 (0x2c) + .maxstack 8 + .locals init ([0] int32 a) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .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 + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #7 input at line 71@72'::builder@ + IL_000e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbersB() + IL_0013: 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_0018: ldarg.0 + IL_0019: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #7 input at line 71@72'::builder@ + IL_001e: ldloc.0 + IL_001f: newobj instance void Linq101Select01/'Pipe #7 input at line 71@73-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder, + int32) + IL_0024: tail. + IL_0026: 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_002b: ret + } // end of method 'Pipe #7 input at line 71@72'::Invoke + + } // end of class 'Pipe #7 input at line 71@72' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #7 input at line 71@74-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool> + { + .field static assembly initonly class Linq101Select01/'Pipe #7 input at line 71@74-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool>::.ctor() + IL_0006: ret + } // end of method 'Pipe #7 input at line 71@74-2'::.ctor + + .method public strict virtual instance bool + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 19 (0x13) + .maxstack 6 + .locals init ([0] int32 a, + [1] int32 b) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 74,74 : 16,21 '' + IL_000e: ldloc.0 + IL_000f: ldloc.1 + IL_0010: clt + IL_0012: ret + } // end of method 'Pipe #7 input at line 71@74-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #7 input at line 71@74-2'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #7 input at line 71@74-2' Linq101Select01/'Pipe #7 input at line 71@74-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #7 input at line 71@74-2'::.cctor + + } // end of class 'Pipe #7 input at line 71@74-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #7 input at line 71@75-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Select01/'Pipe #7 input at line 71@75-3' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #7 input at line 71@75-3'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 22 (0x16) + .maxstack 6 + .locals init ([0] int32 a, + [1] int32 b) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 75,75 : 17,20 '' + IL_000e: ldloc.0 + IL_000f: ldloc.1 + IL_0010: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0015: ret + } // end of method 'Pipe #7 input at line 71@75-3'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #7 input at line 71@75-3'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #7 input at line 71@75-3' Linq101Select01/'Pipe #7 input at line 71@75-3'::@_instance + IL_000a: ret + } // end of method 'Pipe #7 input at line 71@75-3'::.cctor + + } // end of class 'Pipe #7 input at line 71@75-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #8 input at line 81@83-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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 ) + .field public class [Utils]Utils/Customer c + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder builder@, + class [Utils]Utils/Customer c) 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,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #8 input at line 81@83-1'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [Utils]Utils/Customer Linq101Select01/'Pipe #8 input at line 81@83-1'::c + IL_0014: ret + } // end of method 'Pipe #8 input at line 81@83-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [Utils]Utils/Order _arg2) cil managed + { + // Code size 28 (0x1c) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 84,84 : 9,34 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #8 input at line 81@83-1'::builder@ + IL_0008: ldarg.0 + IL_0009: ldfld class [Utils]Utils/Customer Linq101Select01/'Pipe #8 input at line 81@83-1'::c + IL_000e: ldloc.0 + IL_000f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0014: tail. + IL_0016: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_001b: ret + } // end of method 'Pipe #8 input at line 81@83-1'::Invoke + + } // end of class 'Pipe #8 input at line 81@83-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #8 input at line 81@82' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Collections.IEnumerable>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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 [mscorlib]System.Collections.IEnumerable>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #8 input at line 81@82'::builder@ + IL_000d: ret + } // end of method 'Pipe #8 input at line 81@82'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable> + Invoke(class [Utils]Utils/Customer _arg1) cil managed + { + // Code size 45 (0x2d) + .maxstack 8 + .locals init ([0] class [Utils]Utils/Customer c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .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 + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #8 input at line 81@82'::builder@ + IL_000e: ldloc.0 + IL_000f: callvirt instance class [Utils]Utils/Order[] [Utils]Utils/Customer::get_Orders() + IL_0014: 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_0019: ldarg.0 + IL_001a: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #8 input at line 81@82'::builder@ + IL_001f: ldloc.0 + IL_0020: newobj instance void Linq101Select01/'Pipe #8 input at line 81@83-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder, + class [Utils]Utils/Customer) + IL_0025: tail. + IL_0027: 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_002c: ret + } // end of method 'Pipe #8 input at line 81@82'::Invoke + + } // end of class 'Pipe #8 input at line 81@82' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #8 input at line 81@84-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool> + { + .field static assembly initonly class Linq101Select01/'Pipe #8 input at line 81@84-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool>::.ctor() + IL_0006: ret + } // end of method 'Pipe #8 input at line 81@84-2'::.ctor + + .method public strict virtual instance bool + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 40 (0x28) + .maxstack 10 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 84,84 : 16,33 '' + IL_000e: ldloc.1 + IL_000f: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Order::get_Total() + IL_0014: ldc.i4 0xc350 + IL_0019: ldc.i4.0 + IL_001a: ldc.i4.0 + IL_001b: ldc.i4.0 + IL_001c: ldc.i4.2 + IL_001d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0022: call bool [netstandard]System.Decimal::op_LessThan(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_0027: ret + } // end of method 'Pipe #8 input at line 81@84-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #8 input at line 81@84-2'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #8 input at line 81@84-2' Linq101Select01/'Pipe #8 input at line 81@84-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #8 input at line 81@84-2'::.cctor + + } // end of class 'Pipe #8 input at line 81@84-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #8 input at line 81@85-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3> + { + .field static assembly initonly class Linq101Select01/'Pipe #8 input at line 81@85-3' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3>::.ctor() + IL_0006: ret + } // end of method 'Pipe #8 input at line 81@85-3'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`3 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 38 (0x26) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 85,85 : 17,49 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance string [Utils]Utils/Customer::get_CustomerID() + IL_0014: ldloc.1 + IL_0015: callvirt instance int32 [Utils]Utils/Order::get_OrderID() + IL_001a: ldloc.1 + IL_001b: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Order::get_Total() + IL_0020: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_0025: ret + } // end of method 'Pipe #8 input at line 81@85-3'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #8 input at line 81@85-3'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #8 input at line 81@85-3' Linq101Select01/'Pipe #8 input at line 81@85-3'::@_instance + IL_000a: ret + } // end of method 'Pipe #8 input at line 81@85-3'::.cctor + + } // end of class 'Pipe #8 input at line 81@85-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #9 input at line 90@92-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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 ) + .field public class [Utils]Utils/Customer c + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder builder@, + class [Utils]Utils/Customer c) 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,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #9 input at line 90@92-1'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [Utils]Utils/Customer Linq101Select01/'Pipe #9 input at line 90@92-1'::c + IL_0014: ret + } // end of method 'Pipe #9 input at line 90@92-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [Utils]Utils/Order _arg2) cil managed + { + // Code size 28 (0x1c) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 93,93 : 9,51 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #9 input at line 90@92-1'::builder@ + IL_0008: ldarg.0 + IL_0009: ldfld class [Utils]Utils/Customer Linq101Select01/'Pipe #9 input at line 90@92-1'::c + IL_000e: ldloc.0 + IL_000f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0014: tail. + IL_0016: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_001b: ret + } // end of method 'Pipe #9 input at line 90@92-1'::Invoke + + } // end of class 'Pipe #9 input at line 90@92-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #9 input at line 90@91' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Collections.IEnumerable>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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 [mscorlib]System.Collections.IEnumerable>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #9 input at line 90@91'::builder@ + IL_000d: ret + } // end of method 'Pipe #9 input at line 90@91'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable> + Invoke(class [Utils]Utils/Customer _arg1) cil managed + { + // Code size 45 (0x2d) + .maxstack 8 + .locals init ([0] class [Utils]Utils/Customer c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .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 + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #9 input at line 90@91'::builder@ + IL_000e: ldloc.0 + IL_000f: callvirt instance class [Utils]Utils/Order[] [Utils]Utils/Customer::get_Orders() + IL_0014: 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_0019: ldarg.0 + IL_001a: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #9 input at line 90@91'::builder@ + IL_001f: ldloc.0 + IL_0020: newobj instance void Linq101Select01/'Pipe #9 input at line 90@92-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder, + class [Utils]Utils/Customer) + IL_0025: tail. + IL_0027: 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_002c: ret + } // end of method 'Pipe #9 input at line 90@91'::Invoke + + } // end of class 'Pipe #9 input at line 90@91' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #9 input at line 90@93-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool> + { + .field static assembly initonly class Linq101Select01/'Pipe #9 input at line 90@93-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool>::.ctor() + IL_0006: ret + } // end of method 'Pipe #9 input at line 90@93-2'::.ctor + + .method public strict virtual instance bool + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 48 (0x30) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o, + [2] valuetype [mscorlib]System.DateTime V_2, + [3] valuetype [mscorlib]System.DateTime V_3) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 93,93 : 16,50 '' + IL_000e: ldloc.1 + IL_000f: callvirt instance valuetype [mscorlib]System.DateTime [Utils]Utils/Order::get_OrderDate() + IL_0014: stloc.2 + IL_0015: ldc.i4 0x7ce + IL_001a: ldc.i4.1 + IL_001b: ldc.i4.1 + IL_001c: newobj instance void [mscorlib]System.DateTime::.ctor(int32, + int32, + int32) + IL_0021: stloc.3 + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: call int32 [netstandard]System.DateTime::Compare(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) + IL_0029: ldc.i4.0 + IL_002a: clt + IL_002c: ldc.i4.0 + IL_002d: ceq + IL_002f: ret + } // end of method 'Pipe #9 input at line 90@93-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #9 input at line 90@93-2'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #9 input at line 90@93-2' Linq101Select01/'Pipe #9 input at line 90@93-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #9 input at line 90@93-2'::.cctor + + } // end of class 'Pipe #9 input at line 90@93-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #9 input at line 90@94-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3> + { + .field static assembly initonly class Linq101Select01/'Pipe #9 input at line 90@94-3' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3>::.ctor() + IL_0006: ret + } // end of method 'Pipe #9 input at line 90@94-3'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`3 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 38 (0x26) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 94,94 : 17,53 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance string [Utils]Utils/Customer::get_CustomerID() + IL_0014: ldloc.1 + IL_0015: callvirt instance int32 [Utils]Utils/Order::get_OrderID() + IL_001a: ldloc.1 + IL_001b: callvirt instance valuetype [mscorlib]System.DateTime [Utils]Utils/Order::get_OrderDate() + IL_0020: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_0025: ret + } // end of method 'Pipe #9 input at line 90@94-3'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'Pipe #9 input at line 90@94-3'::.ctor() + IL_0005: stsfld class Linq101Select01/'Pipe #9 input at line 90@94-3' Linq101Select01/'Pipe #9 input at line 90@94-3'::@_instance + IL_000a: ret + } // end of method 'Pipe #9 input at line 90@94-3'::.cctor + + } // end of class 'Pipe #9 input at line 90@94-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'orders3@101-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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 ) + .field public class [Utils]Utils/Customer c + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder builder@, + class [Utils]Utils/Customer c) 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,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'orders3@101-1'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [Utils]Utils/Customer Linq101Select01/'orders3@101-1'::c + IL_0014: ret + } // end of method 'orders3@101-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [Utils]Utils/Order _arg2) cil managed + { + // Code size 28 (0x1c) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 102,102 : 9,35 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'orders3@101-1'::builder@ + IL_0008: ldarg.0 + IL_0009: ldfld class [Utils]Utils/Customer Linq101Select01/'orders3@101-1'::c + IL_000e: ldloc.0 + IL_000f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0014: tail. + IL_0016: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_001b: ret + } // end of method 'orders3@101-1'::Invoke + + } // end of class 'orders3@101-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit orders3@100 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Collections.IEnumerable>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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 [mscorlib]System.Collections.IEnumerable>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/orders3@100::builder@ + IL_000d: ret + } // end of method orders3@100::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable> + Invoke(class [Utils]Utils/Customer _arg1) cil managed + { + // Code size 45 (0x2d) + .maxstack 8 + .locals init ([0] class [Utils]Utils/Customer c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .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 + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/orders3@100::builder@ + IL_000e: ldloc.0 + IL_000f: callvirt instance class [Utils]Utils/Order[] [Utils]Utils/Customer::get_Orders() + IL_0014: 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_0019: ldarg.0 + IL_001a: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/orders3@100::builder@ + IL_001f: ldloc.0 + IL_0020: newobj instance void Linq101Select01/'orders3@101-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder, + class [Utils]Utils/Customer) + IL_0025: tail. + IL_0027: 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_002c: ret + } // end of method orders3@100::Invoke + + } // end of class orders3@100 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'orders3@102-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool> + { + .field static assembly initonly class Linq101Select01/'orders3@102-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool>::.ctor() + IL_0006: ret + } // end of method 'orders3@102-2'::.ctor + + .method public strict virtual instance bool + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 40 (0x28) + .maxstack 10 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 102,102 : 16,34 '' + IL_000e: ldloc.1 + IL_000f: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Order::get_Total() + IL_0014: ldc.i4 0x4e20 + IL_0019: ldc.i4.0 + IL_001a: ldc.i4.0 + IL_001b: ldc.i4.0 + IL_001c: ldc.i4.1 + IL_001d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0022: call bool [netstandard]System.Decimal::op_GreaterThanOrEqual(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_0027: ret + } // end of method 'orders3@102-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'orders3@102-2'::.ctor() + IL_0005: stsfld class Linq101Select01/'orders3@102-2' Linq101Select01/'orders3@102-2'::@_instance + IL_000a: ret + } // end of method 'orders3@102-2'::.cctor + + } // end of class 'orders3@102-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'orders3@103-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3> + { + .field static assembly initonly class Linq101Select01/'orders3@103-3' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`3>::.ctor() + IL_0006: ret + } // end of method 'orders3@103-3'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`3 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 38 (0x26) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 103,103 : 17,49 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance string [Utils]Utils/Customer::get_CustomerID() + IL_0014: ldloc.1 + IL_0015: callvirt instance int32 [Utils]Utils/Order::get_OrderID() + IL_001a: ldloc.1 + IL_001b: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Order::get_Total() + IL_0020: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_0025: ret + } // end of method 'orders3@103-3'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'orders3@103-3'::.ctor() + IL_0005: stsfld class Linq101Select01/'orders3@103-3' Linq101Select01/'orders3@103-3'::@_instance + IL_000a: ret + } // end of method 'orders3@103-3'::.cctor + + } // end of class 'orders3@103-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit orders4@111 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Select01/orders4@111::builder@ + IL_000d: ret + } // end of method orders4@111::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Customer _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Customer c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 112,112 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/orders4@111::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method orders4@111::Invoke + + } // end of class orders4@111 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'orders4@112-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Select01/'orders4@112-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'orders4@112-1'::.ctor + + .method public strict virtual instance bool + Invoke(class [Utils]Utils/Customer c) cil managed + { + // Code size 17 (0x11) + .maxstack 8 + .line 112,112 : 16,31 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance string [Utils]Utils/Customer::get_Region() + IL_0006: ldstr "WA" + IL_000b: call bool [netstandard]System.String::Equals(string, + string) + IL_0010: ret + } // end of method 'orders4@112-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'orders4@112-1'::.ctor() + IL_0005: stsfld class Linq101Select01/'orders4@112-1' Linq101Select01/'orders4@112-1'::@_instance + IL_000a: ret + } // end of method 'orders4@112-1'::.cctor + + } // end of class 'orders4@112-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'orders4@113-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,object>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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 ) + .field public class [Utils]Utils/Customer c + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder builder@, + class [Utils]Utils/Customer c) 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,object>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'orders4@113-3'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [Utils]Utils/Customer Linq101Select01/'orders4@113-3'::c + IL_0014: ret + } // end of method 'orders4@113-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> + Invoke(class [Utils]Utils/Order _arg3) cil managed + { + // Code size 28 (0x1c) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 114,114 : 9,42 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'orders4@113-3'::builder@ + IL_0008: ldarg.0 + IL_0009: ldfld class [Utils]Utils/Customer Linq101Select01/'orders4@113-3'::c + IL_000e: ldloc.0 + IL_000f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0014: tail. + IL_0016: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_001b: ret + } // end of method 'orders4@113-3'::Invoke + + } // end of class 'orders4@113-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'orders4@111-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Collections.IEnumerable>> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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 [mscorlib]System.Collections.IEnumerable>>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'orders4@111-2'::builder@ + IL_000d: ret + } // end of method 'orders4@111-2'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable> + Invoke(class [Utils]Utils/Customer _arg2) cil managed + { + // Code size 45 (0x2d) + .maxstack 8 + .locals init ([0] class [Utils]Utils/Customer c) + .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 + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'orders4@111-2'::builder@ + IL_000e: ldloc.0 + IL_000f: callvirt instance class [Utils]Utils/Order[] [Utils]Utils/Customer::get_Orders() + IL_0014: 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_0019: ldarg.0 + IL_001a: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'orders4@111-2'::builder@ + IL_001f: ldloc.0 + IL_0020: newobj instance void Linq101Select01/'orders4@113-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder, + class [Utils]Utils/Customer) + IL_0025: tail. + IL_0027: 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_002c: ret + } // end of method 'orders4@111-2'::Invoke + + } // end of class 'orders4@111-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'orders4@114-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool> + { + .field static assembly initonly class Linq101Select01/'orders4@114-4' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,bool>::.ctor() + IL_0006: ret + } // end of method 'orders4@114-4'::.ctor + + .method public strict virtual instance bool + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 41 (0x29) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o, + [2] valuetype [mscorlib]System.DateTime V_2, + [3] valuetype [mscorlib]System.DateTime V_3) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 114,114 : 16,41 '' + IL_000e: ldloc.1 + IL_000f: callvirt instance valuetype [mscorlib]System.DateTime [Utils]Utils/Order::get_OrderDate() + IL_0014: stloc.2 + IL_0015: call valuetype [mscorlib]System.DateTime Linq101Select01::get_cutOffDate() + IL_001a: stloc.3 + IL_001b: ldloc.2 + IL_001c: ldloc.3 + IL_001d: call int32 [netstandard]System.DateTime::Compare(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) + IL_0022: ldc.i4.0 + IL_0023: clt + IL_0025: ldc.i4.0 + IL_0026: ceq + IL_0028: ret + } // end of method 'orders4@114-4'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'orders4@114-4'::.ctor() + IL_0005: stsfld class Linq101Select01/'orders4@114-4' Linq101Select01/'orders4@114-4'::@_instance + IL_000a: ret + } // end of method 'orders4@114-4'::.cctor + + } // end of class 'orders4@114-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'orders4@115-5' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2> + { + .field static assembly initonly class Linq101Select01/'orders4@115-5' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [mscorlib]System.Tuple`2>::.ctor() + IL_0006: ret + } // end of method 'orders4@115-5'::.ctor + + .method public strict virtual instance class [mscorlib]System.Tuple`2 + Invoke(class [mscorlib]System.Tuple`2 tupledArg) cil managed + { + // Code size 32 (0x20) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Customer c, + [1] class [Utils]Utils/Order o) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_000d: stloc.1 + .line 115,115 : 17,40 '' + IL_000e: ldloc.0 + IL_000f: callvirt instance string [Utils]Utils/Customer::get_CustomerID() + IL_0014: ldloc.1 + IL_0015: callvirt instance int32 [Utils]Utils/Order::get_OrderID() + IL_001a: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_001f: ret + } // end of method 'orders4@115-5'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Select01/'orders4@115-5'::.ctor() + IL_0005: stsfld class Linq101Select01/'orders4@115-5' Linq101Select01/'orders4@115-5'::@_instance + IL_000a: ret + } // end of method 'orders4@115-5'::.cctor + + } // end of class 'orders4@115-5' + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbers@7 + IL_0005: ret + } // end of method Linq101Select01::get_numbers + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numsPlusOne() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numsPlusOne@10 + IL_0005: ret + } // end of method Linq101Select01::get_numsPlusOne + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_products() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::products@17 + IL_0005: ret + } // end of method Linq101Select01::get_products + + .method public specialname static class [mscorlib]System.Collections.Generic.IEnumerable`1 + get_productNames() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Select01::productNames@19 + IL_0005: ret + } // end of method Linq101Select01::get_productNames + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_strings() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::strings@26 + IL_0005: ret + } // end of method Linq101Select01::get_strings + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_textNums() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::textNums@27 + IL_0005: ret + } // end of method Linq101Select01::get_textNums + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_words() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::words@34 + IL_0005: ret + } // end of method Linq101Select01::get_words + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_upperLowerWords() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::upperLowerWords@36 + IL_0005: ret + } // end of method Linq101Select01::get_upperLowerWords + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + get_digitOddEvens() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$Linq101Select01::digitOddEvens@43 + IL_0005: ret + } // end of method Linq101Select01::get_digitOddEvens + + .method public specialname static class [mscorlib]System.Tuple`3[] + get_productInfos() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::productInfos@50 + IL_0005: ret + } // end of method Linq101Select01::get_productInfos + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_digits() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::digits@57 + IL_0005: ret + } // end of method Linq101Select01::get_digits + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_lowNums() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::lowNums@58 + IL_0005: ret + } // end of method Linq101Select01::get_lowNums + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbersA() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersA@67 + IL_0005: ret + } // end of method Linq101Select01::get_numbersA + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbersB() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersB@68 + IL_0005: ret + } // end of method Linq101Select01::get_numbersB + + .method public specialname static class [mscorlib]System.Tuple`2[] + get_pairs() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::pairs@70 + IL_0005: ret + } // end of method Linq101Select01::get_pairs + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_customers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::customers@79 + IL_0005: ret + } // end of method Linq101Select01::get_customers + + .method public specialname static class [mscorlib]System.Tuple`3[] + get_orders() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders@80 + IL_0005: ret + } // end of method Linq101Select01::get_orders + + .method public specialname static class [mscorlib]System.Tuple`3[] + get_orders2() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders2@89 + IL_0005: ret + } // end of method Linq101Select01::get_orders2 + + .method public specialname static class [mscorlib]System.Collections.Generic.IEnumerable`1> + get_orders3() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders3@98 + IL_0005: ret + } // end of method Linq101Select01::get_orders3 + + .method public specialname static valuetype [mscorlib]System.DateTime + get_cutOffDate() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld valuetype [mscorlib]System.DateTime ''.$Linq101Select01::cutOffDate@107 + IL_0005: ret + } // end of method Linq101Select01::get_cutOffDate + + .method public specialname static class [mscorlib]System.Collections.Generic.IEnumerable`1> + get_orders4() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders4@109 + IL_0005: ret + } // end of method Linq101Select01::get_orders4 + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() + } // end of property Linq101Select01::numbers + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numsPlusOne() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numsPlusOne() + } // end of property Linq101Select01::numsPlusOne + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + products() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_products() + } // end of property Linq101Select01::products + .property class [mscorlib]System.Collections.Generic.IEnumerable`1 + productNames() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101Select01::get_productNames() + } // end of property Linq101Select01::productNames + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + strings() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() + } // end of property Linq101Select01::strings + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + textNums() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_textNums() + } // end of property Linq101Select01::textNums + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + words() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_words() + } // end of property Linq101Select01::words + .property class [mscorlib]System.Tuple`2[] + upperLowerWords() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Select01::get_upperLowerWords() + } // end of property Linq101Select01::upperLowerWords + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + digitOddEvens() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> Linq101Select01::get_digitOddEvens() + } // end of property Linq101Select01::digitOddEvens + .property class [mscorlib]System.Tuple`3[] + productInfos() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`3[] Linq101Select01::get_productInfos() + } // end of property Linq101Select01::productInfos + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + digits() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_digits() + } // end of property Linq101Select01::digits + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + lowNums() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_lowNums() + } // end of property Linq101Select01::lowNums + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbersA() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbersA() + } // end of property Linq101Select01::numbersA + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbersB() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbersB() + } // end of property Linq101Select01::numbersB + .property class [mscorlib]System.Tuple`2[] + pairs() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`2[] Linq101Select01::get_pairs() + } // end of property Linq101Select01::pairs + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + customers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + } // end of property Linq101Select01::customers + .property class [mscorlib]System.Tuple`3[] + orders() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`3[] Linq101Select01::get_orders() + } // end of property Linq101Select01::orders + .property class [mscorlib]System.Tuple`3[] + orders2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Tuple`3[] Linq101Select01::get_orders2() + } // end of property Linq101Select01::orders2 + .property class [mscorlib]System.Collections.Generic.IEnumerable`1> + orders3() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.IEnumerable`1> Linq101Select01::get_orders3() + } // end of property Linq101Select01::orders3 + .property valuetype [mscorlib]System.DateTime + cutOffDate() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get valuetype [mscorlib]System.DateTime Linq101Select01::get_cutOffDate() + } // end of property Linq101Select01::cutOffDate + .property class [mscorlib]System.Collections.Generic.IEnumerable`1> + orders4() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.IEnumerable`1> Linq101Select01::get_orders4() + } // end of property Linq101Select01::orders4 +} // end of class Linq101Select01 + +.class private abstract auto ansi sealed ''.$Linq101Select01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers@7 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numsPlusOne@10 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@17 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 productNames@19 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 strings@26 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 textNums@27 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words@34 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] upperLowerWords@36 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> digitOddEvens@43 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`3[] productInfos@50 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 digits@57 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 lowNums@58 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbersA@67 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbersB@68 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`2[] pairs@70 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers@79 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`3[] orders@80 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Tuple`3[] orders2@89 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1> orders3@98 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly valuetype [mscorlib]System.DateTime cutOffDate@107 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1> orders4@109 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // 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, + [2] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, + [3] class [mscorlib]System.Collections.Generic.IEnumerable`1 productNames, + [4] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 strings, + [5] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 textNums, + [6] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words, + [7] class [mscorlib]System.Tuple`2[] upperLowerWords, + [8] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> digitOddEvens, + [9] class [mscorlib]System.Tuple`3[] productInfos, + [10] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 digits, + [11] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 lowNums, + [12] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbersA, + [13] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbersB, + [14] class [mscorlib]System.Tuple`2[] pairs, + [15] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers, + [16] class [mscorlib]System.Tuple`3[] orders, + [17] class [mscorlib]System.Tuple`3[] orders2, + [18] class [mscorlib]System.Collections.Generic.IEnumerable`1> orders3, + [19] valuetype [mscorlib]System.DateTime cutOffDate, + [20] class [mscorlib]System.Collections.Generic.IEnumerable`1> orders4, + [21] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 11', + [22] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_22, + [23] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_23, + [24] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #2 input at line 28', + [25] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_25, + [26] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #3 input at line 37', + [27] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_27, + [28] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #4 input at line 44', + [29] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_29, + [30] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #5 input at line 51', + [31] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_31, + [32] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #6 input at line 59', + [33] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_33, + [34] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_34, + [35] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_35, + [36] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #7 input at line 71', + [37] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_37, + [38] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #8 input at line 81', + [39] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_39, + [40] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #9 input at line 90', + [41] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_41, + [42] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_42, + [43] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_43) + .line 7,7 : 1,47 '' + IL_0000: ldc.i4.5 + IL_0001: ldc.i4.4 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.3 + IL_0004: ldc.i4.s 9 + IL_0006: ldc.i4.8 + IL_0007: ldc.i4.6 + IL_0008: ldc.i4.7 + IL_0009: ldc.i4.2 + IL_000a: ldc.i4.0 + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0010: 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_0015: 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_001a: 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_001f: 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_0024: 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_0029: 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_002e: 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_0033: 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_0038: 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_003d: 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_0042: dup + IL_0043: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbers@7 + IL_0048: stloc.0 + .line 11,11 : 5,10 '' + 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: newobj instance void Linq101Select01/'Pipe #1 input at line 11@13'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0058: stloc.s 'Pipe #1 input at line 11' + .line 14,14 : 10,20 '' + 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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: newobj instance void Linq101Select01/'Pipe #2 input at line 28@30'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_010a: stloc.s 'Pipe #2 input at line 28' + .line 31,31 : 10,20 '' + 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_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_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_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_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_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_0155: stloc.s 'Pipe #3 input at line 37' + .line 40,40 : 9,20 '' + 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_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_0175: stloc.s 'Pipe #4 input at line 44' + .line 47,47 : 10,20 '' + 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_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_0195: stloc.s 'Pipe #5 input at line 51' + .line 54,54 : 10,21 '' + 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_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_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_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_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_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_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_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_0202: nop + .line 100001,100001 : 0,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_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_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_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_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_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_0251: ldc.i4.0 + IL_0252: ceq + IL_0254: brfalse.s IL_0270 + + .line 64,64 : 60,84 '' + 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_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_026d: nop + IL_026e: br.s IL_0271 + + .line 100001,100001 : 0,0 '' + IL_0270: nop + .line 67,67 : 1,37 '' + 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_0420: dup + IL_0421: stsfld valuetype [mscorlib]System.DateTime ''.$Linq101Select01::cutOffDate@107 + IL_0426: stloc.s cutOffDate + .line 110,110 : 5,10 '' + 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_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_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_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_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_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_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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.fs new file mode 100644 index 00000000000..9e72df16616 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.fs @@ -0,0 +1,40 @@ +// #Conformance #DataExpressions #Query +// Set Opeartors LINQ101 samples converted to query + +open System +open System.Collections.Generic +open System.Linq + +// Distinct - 1 +let factorsOf300 = [2;2;3;5;5] + +let uniqueFactors = + query { + for n in factorsOf300 do + distinct + } |> Seq.toList + +// Distinct - 2 +let products = getProductList() + +let categoryNames = + query { + for p in products do + select p.Category + distinct + } |> Seq.toList + +// Union - 2 +let customers = getCustomerList() + +let productFirstChars = + query { + for p in products do + select p.ProductName.[0] + } + +let customerFirstChars = + query { + for c in customers do + select c.CompanyName.[0] + } \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl new file mode 100644 index 00000000000..4976371674b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl @@ -0,0 +1,1632 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern Utils +{ + .ver 0:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly Linq101SetOperators01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Linq101SetOperators01 +{ + // Offset: 0x00000000 Length: 0x0000038C +} +.mresource public FSharpOptimizationData.Linq101SetOperators01 +{ + // Offset: 0x00000390 Length: 0x0000011E +} +.module Linq101SetOperators01.exe +// MVID: {61FD32BA-4EE5-349F-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05B90000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Linq101SetOperators01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #1 input at line 12@13' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #1 input at line 12@13'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 149 (0x95) + .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) + .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\\QueryExpressionStepping\\Linq101SetOperators01.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0068 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .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_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 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + 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: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #1 input at line 12@13'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #1 input at line 12@13'::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::current + IL_0006: ret + } // end of method 'Pipe #1 input at line 12@13'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101SetOperators01/'Pipe #1 input at line 12@13'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0008: ret + } // end of method 'Pipe #1 input at line 12@13'::GetFreshEnumerator + + } // end of class 'Pipe #1 input at line 12@13' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 21@22-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Linq101SetOperators01/'Pipe #2 input at line 21@22-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 21@22-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 11 (0xb) + .maxstack 5 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 23,23 : 9,26 '' + IL_0002: ldloc.0 + IL_0003: tail. + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_000a: ret + } // end of method 'Pipe #2 input at line 21@22-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101SetOperators01/'Pipe #2 input at line 21@22-1'::.ctor() + IL_0005: stsfld class Linq101SetOperators01/'Pipe #2 input at line 21@22-1' Linq101SetOperators01/'Pipe #2 input at line 21@22-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 21@22-1'::.cctor + + } // end of class 'Pipe #2 input at line 21@22-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #2 input at line 21@23' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #2 input at line 21@23'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101SetOperators01/'Pipe #2 input at line 21@23'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #2 input at line 21@23'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 161 (0xa1) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0077 + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0074 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_0098 + + .line 100001,100001 : 0,0 '' + 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, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #2 input at line 21@23'::'enum' + IL_003f: ldarg.0 + IL_0040: ldc.i4.1 + IL_0041: stfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc + 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() + IL_0051: brfalse.s IL_0077 + + IL_0053: ldarg.0 + 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 + 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 + IL_0072: ldc.i4.1 + IL_0073: ret + + .line 100001,100001 : 0,0 '' + IL_0074: nop + IL_0075: br.s IL_0046 + + IL_0077: ldarg.0 + IL_0078: ldc.i4.3 + IL_0079: stfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc + 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) + IL_0089: nop + IL_008a: ldarg.0 + IL_008b: ldnull + IL_008c: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #2 input at line 21@23'::'enum' + IL_0091: ldarg.0 + IL_0092: ldc.i4.3 + IL_0093: stfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc + IL_0098: ldarg.0 + IL_0099: ldnull + IL_009a: stfld string Linq101SetOperators01/'Pipe #2 input at line 21@23'::current + IL_009f: ldc.i4.0 + IL_00a0: ret + } // end of method 'Pipe #2 input at line 21@23'::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #2 input at line 21@23'::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101SetOperators01/'Pipe #2 input at line 21@23'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #2 input at line 21@23'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #2 input at line 21@23'::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101SetOperators01/'Pipe #2 input at line 21@23'::current + IL_0006: ret + } // end of method 'Pipe #2 input at line 21@23'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101SetOperators01/'Pipe #2 input at line 21@23'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method 'Pipe #2 input at line 21@23'::GetFreshEnumerator + + } // end of class 'Pipe #2 input at line 21@23' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'productFirstChars@32-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Linq101SetOperators01/'productFirstChars@32-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } // end of method 'productFirstChars@32-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 11 (0xb) + .maxstack 5 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 33,33 : 9,33 '' + IL_0002: ldloc.0 + IL_0003: tail. + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_000a: ret + } // end of method 'productFirstChars@32-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101SetOperators01/'productFirstChars@32-1'::.ctor() + IL_0005: stsfld class Linq101SetOperators01/'productFirstChars@32-1' Linq101SetOperators01/'productFirstChars@32-1'::@_instance + IL_000a: ret + } // end of method 'productFirstChars@32-1'::.cctor + + } // end of class 'productFirstChars@32-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname productFirstChars@33 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 char current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + char current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld char Linq101SetOperators01/productFirstChars@33::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method productFirstChars@33::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 170 (0xaa) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0080 + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_007d + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br IL_00a1 + + .line 100001,100001 : 0,0 '' + 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, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0038: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003d: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' + IL_0042: ldarg.0 + IL_0043: ldc.i4.1 + IL_0044: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + 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() + IL_0054: brfalse.s IL_0080 + + IL_0056: ldarg.0 + 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 + 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 + IL_0071: callvirt instance char [netstandard]System.String::get_Chars(int32) + IL_0076: stfld char Linq101SetOperators01/productFirstChars@33::current + IL_007b: ldc.i4.1 + IL_007c: ret + + .line 100001,100001 : 0,0 '' + IL_007d: nop + IL_007e: br.s IL_0049 + + IL_0080: ldarg.0 + IL_0081: ldc.i4.3 + IL_0082: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + 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) + IL_0092: nop + IL_0093: ldarg.0 + IL_0094: ldnull + IL_0095: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' + IL_009a: ldarg.0 + IL_009b: ldc.i4.3 + IL_009c: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_00a1: ldarg.0 + IL_00a2: ldc.i4.0 + IL_00a3: stfld char Linq101SetOperators01/productFirstChars@33::current + IL_00a8: ldc.i4.0 + IL_00a9: ret + } // end of method productFirstChars@33::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld char Linq101SetOperators01/productFirstChars@33::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method productFirstChars@33::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method productFirstChars@33::get_CheckClose + + .method public strict virtual instance char + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld char Linq101SetOperators01/productFirstChars@33::current + IL_0006: ret + } // end of method productFirstChars@33::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101SetOperators01/productFirstChars@33::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + char) + IL_0008: ret + } // end of method productFirstChars@33::GetFreshEnumerator + + } // end of class productFirstChars@33 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'customerFirstChars@38-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Linq101SetOperators01/'customerFirstChars@38-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } // end of method 'customerFirstChars@38-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1 + Invoke(class [Utils]Utils/Customer _arg1) cil managed + { + // Code size 11 (0xb) + .maxstack 5 + .locals init ([0] class [Utils]Utils/Customer c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 39,39 : 9,33 '' + IL_0002: ldloc.0 + IL_0003: tail. + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_000a: ret + } // end of method 'customerFirstChars@38-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101SetOperators01/'customerFirstChars@38-1'::.ctor() + IL_0005: stsfld class Linq101SetOperators01/'customerFirstChars@38-1' Linq101SetOperators01/'customerFirstChars@38-1'::@_instance + IL_000a: ret + } // end of method 'customerFirstChars@38-1'::.cctor + + } // end of class 'customerFirstChars@38-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname customerFirstChars@39 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 char current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + char current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld char Linq101SetOperators01/customerFirstChars@39::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method customerFirstChars@39::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 170 (0xaa) + .maxstack 7 + .locals init ([0] class [Utils]Utils/Customer c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0080 + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_007d + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br IL_00a1 + + .line 100001,100001 : 0,0 '' + 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, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0038: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003d: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' + IL_0042: ldarg.0 + IL_0043: ldc.i4.1 + IL_0044: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + 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() + IL_0054: brfalse.s IL_0080 + + IL_0056: ldarg.0 + 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 + 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 + IL_0071: callvirt instance char [netstandard]System.String::get_Chars(int32) + IL_0076: stfld char Linq101SetOperators01/customerFirstChars@39::current + IL_007b: ldc.i4.1 + IL_007c: ret + + .line 100001,100001 : 0,0 '' + IL_007d: nop + IL_007e: br.s IL_0049 + + IL_0080: ldarg.0 + IL_0081: ldc.i4.3 + IL_0082: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + 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) + IL_0092: nop + IL_0093: ldarg.0 + IL_0094: ldnull + IL_0095: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' + IL_009a: ldarg.0 + IL_009b: ldc.i4.3 + IL_009c: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_00a1: ldarg.0 + IL_00a2: ldc.i4.0 + IL_00a3: stfld char Linq101SetOperators01/customerFirstChars@39::current + IL_00a8: ldc.i4.0 + IL_00a9: ret + } // end of method customerFirstChars@39::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld char Linq101SetOperators01/customerFirstChars@39::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method customerFirstChars@39::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method customerFirstChars@39::get_CheckClose + + .method public strict virtual instance char + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld char Linq101SetOperators01/customerFirstChars@39::current + IL_0006: ret + } // end of method customerFirstChars@39::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101SetOperators01/customerFirstChars@39::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + char) + IL_0008: ret + } // end of method customerFirstChars@39::GetFreshEnumerator + + } // end of class customerFirstChars@39 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_factorsOf300() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::factorsOf300@9 + IL_0005: ret + } // end of method Linq101SetOperators01::get_factorsOf300 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_uniqueFactors() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::uniqueFactors@11 + IL_0005: ret + } // end of method Linq101SetOperators01::get_uniqueFactors + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_products() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::products@18 + IL_0005: ret + } // end of method Linq101SetOperators01::get_products + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_categoryNames() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::categoryNames@20 + IL_0005: ret + } // end of method Linq101SetOperators01::get_categoryNames + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_customers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::customers@28 + IL_0005: ret + } // end of method Linq101SetOperators01::get_customers + + .method public specialname static class [mscorlib]System.Collections.Generic.IEnumerable`1 + get_productFirstChars() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::productFirstChars@30 + IL_0005: ret + } // end of method Linq101SetOperators01::get_productFirstChars + + .method public specialname static class [mscorlib]System.Collections.Generic.IEnumerable`1 + get_customerFirstChars() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::customerFirstChars@36 + IL_0005: ret + } // end of method Linq101SetOperators01::get_customerFirstChars + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + factorsOf300() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_factorsOf300() + } // end of property Linq101SetOperators01::factorsOf300 + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + uniqueFactors() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_uniqueFactors() + } // end of property Linq101SetOperators01::uniqueFactors + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + products() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_products() + } // end of property Linq101SetOperators01::products + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + categoryNames() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_categoryNames() + } // end of property Linq101SetOperators01::categoryNames + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + customers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_customers() + } // end of property Linq101SetOperators01::customers + .property class [mscorlib]System.Collections.Generic.IEnumerable`1 + productFirstChars() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101SetOperators01::get_productFirstChars() + } // end of property Linq101SetOperators01::productFirstChars + .property class [mscorlib]System.Collections.Generic.IEnumerable`1 + customerFirstChars() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101SetOperators01::get_customerFirstChars() + } // end of property Linq101SetOperators01::customerFirstChars +} // end of class Linq101SetOperators01 + +.class private abstract auto ansi sealed ''.$Linq101SetOperators01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 factorsOf300@9 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 uniqueFactors@11 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@18 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 categoryNames@20 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers@28 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 productFirstChars@30 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 customerFirstChars@36 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // 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, + [2] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, + [3] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 categoryNames, + [4] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers, + [5] class [mscorlib]System.Collections.Generic.IEnumerable`1 productFirstChars, + [6] class [mscorlib]System.Collections.Generic.IEnumerable`1 customerFirstChars, + [7] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 12', + [8] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_8, + [9] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #2 input at line 21', + [10] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_10, + [11] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_11, + [12] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_12) + .line 9,9 : 1,31 '' + IL_0000: ldc.i4.2 + IL_0001: ldc.i4.2 + IL_0002: ldc.i4.3 + IL_0003: ldc.i4.5 + IL_0004: ldc.i4.5 + IL_0005: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000a: 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_000f: 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_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: 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_001e: 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_0023: dup + IL_0024: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::factorsOf300@9 + IL_0029: stloc.0 + .line 12,12 : 5,10 '' + 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: newobj instance void Linq101SetOperators01/'Pipe #1 input at line 12@13'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + 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_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_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_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: newobj instance void Linq101SetOperators01/'Pipe #2 input at line 21@23'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + 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_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_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_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_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_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_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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Where01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Where01.fs new file mode 100644 index 00000000000..27dfc22e760 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Where01.fs @@ -0,0 +1,55 @@ +// #Conformance #DataExpressions #Query +// Where LINQ101 samples converted to query + +open System +open System.Collections.Generic +open System.Linq + + +let numbers = [ 5; 4; 1; 3; 9; 8; 6; 7; 2; 0 ] + + // Where - Simple 1 +let lowNums = + query { + for n in numbers do + where (n < 5) + select n; + } |> List.ofSeq + +// Where - Simple 2 +let products = getProductList() + +let soldOutProducts = + query { + for p in products do + where (p.UnitsInStock = 0) + select p + } + +// Where - Simple 3 +let expensiveInStockProducts = + query { + for p in products do + where (p.UnitsInStock > 0 && p.UnitPrice > 3.00M) + select p + } + +// Where - Drilldown +let customers = getCustomerList() + +let waCustomers = + query { + for c in customers do + where (c.Region = "WA") + select c + } |> Seq.toArray + +// Where - Indexed +let digits = [ "zero"; "one"; "two"; "three"; "four"; "five"; "six"; "seven"; "eight"; "nine" ] +let shortDigits = + query { + for d in digits do + select d + } + |> Seq.mapi (fun i d -> if d.Length < i then Some(d) else None) + |> Seq.choose id diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl new file mode 100644 index 00000000000..aecbaf18528 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl @@ -0,0 +1,1399 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly extern Utils +{ + .ver 0:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly Linq101Where01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Linq101Where01 +{ + // Offset: 0x00000000 Length: 0x000003CA +} +.mresource public FSharpOptimizationData.Linq101Where01 +{ + // Offset: 0x000003D0 Length: 0x0000012E +} +.module Linq101Where01.exe +// MVID: {61FD32BA-FF23-CD21-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05C80000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Linq101Where01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 13@14' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Where01/'Pipe #1 input at line 13@14'::builder@ + IL_000d: ret + } // end of method 'Pipe #1 input at line 13@14'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(int32 _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] int32 n) + .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\\QueryExpressionStepping\\Linq101Where01.fs' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 15,15 : 9,22 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Where01/'Pipe #1 input at line 13@14'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #1 input at line 13@14'::Invoke + + } // end of class 'Pipe #1 input at line 13@14' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 13@15-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Where01/'Pipe #1 input at line 13@15-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 13@15-1'::.ctor + + .method public strict virtual instance bool + Invoke(int32 n) cil managed + { + // Code size 5 (0x5) + .maxstack 8 + .line 15,15 : 16,21 '' + IL_0000: ldarg.1 + IL_0001: ldc.i4.5 + IL_0002: clt + IL_0004: ret + } // end of method 'Pipe #1 input at line 13@15-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/'Pipe #1 input at line 13@15-1'::.ctor() + IL_0005: stsfld class Linq101Where01/'Pipe #1 input at line 13@15-1' Linq101Where01/'Pipe #1 input at line 13@15-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 13@15-1'::.cctor + + } // end of class 'Pipe #1 input at line 13@15-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #1 input at line 13@16-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Where01/'Pipe #1 input at line 13@16-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #1 input at line 13@16-2'::.ctor + + .method public strict virtual instance int32 + Invoke(int32 n) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 16,16 : 16,17 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #1 input at line 13@16-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/'Pipe #1 input at line 13@16-2'::.ctor() + IL_0005: stsfld class Linq101Where01/'Pipe #1 input at line 13@16-2' Linq101Where01/'Pipe #1 input at line 13@16-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #1 input at line 13@16-2'::.cctor + + } // end of class 'Pipe #1 input at line 13@16-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit soldOutProducts@24 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Where01/soldOutProducts@24::builder@ + IL_000d: ret + } // end of method soldOutProducts@24::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 25,25 : 9,35 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Where01/soldOutProducts@24::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method soldOutProducts@24::Invoke + + } // end of class soldOutProducts@24 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'soldOutProducts@25-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Where01/'soldOutProducts@25-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'soldOutProducts@25-1'::.ctor + + .method public strict virtual instance bool + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 10 (0xa) + .maxstack 8 + .line 25,25 : 16,34 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance int32 [Utils]Utils/Product::get_UnitsInStock() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } // end of method 'soldOutProducts@25-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/'soldOutProducts@25-1'::.ctor() + IL_0005: stsfld class Linq101Where01/'soldOutProducts@25-1' Linq101Where01/'soldOutProducts@25-1'::@_instance + IL_000a: ret + } // end of method 'soldOutProducts@25-1'::.cctor + + } // end of class 'soldOutProducts@25-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'soldOutProducts@26-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Where01/'soldOutProducts@26-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'soldOutProducts@26-2'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 26,26 : 16,17 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'soldOutProducts@26-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/'soldOutProducts@26-2'::.ctor() + IL_0005: stsfld class Linq101Where01/'soldOutProducts@26-2' Linq101Where01/'soldOutProducts@26-2'::@_instance + IL_000a: ret + } // end of method 'soldOutProducts@26-2'::.cctor + + } // end of class 'soldOutProducts@26-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit expensiveInStockProducts@32 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Where01/expensiveInStockProducts@32::builder@ + IL_000d: ret + } // end of method expensiveInStockProducts@32::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Product _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Product p) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 33,33 : 9,58 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Where01/expensiveInStockProducts@32::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method expensiveInStockProducts@32::Invoke + + } // end of class expensiveInStockProducts@32 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'expensiveInStockProducts@33-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Where01/'expensiveInStockProducts@33-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'expensiveInStockProducts@33-1'::.ctor + + .method public strict virtual instance bool + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 37 (0x25) + .maxstack 10 + .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 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.2 + IL_0018: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_001d: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) + IL_0022: ret + + .line 100001,100001 : 0,0 '' + IL_0023: ldc.i4.0 + IL_0024: ret + } // end of method 'expensiveInStockProducts@33-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/'expensiveInStockProducts@33-1'::.ctor() + IL_0005: stsfld class Linq101Where01/'expensiveInStockProducts@33-1' Linq101Where01/'expensiveInStockProducts@33-1'::@_instance + IL_000a: ret + } // end of method 'expensiveInStockProducts@33-1'::.cctor + + } // end of class 'expensiveInStockProducts@33-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'expensiveInStockProducts@34-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Where01/'expensiveInStockProducts@34-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'expensiveInStockProducts@34-2'::.ctor + + .method public strict virtual instance class [Utils]Utils/Product + Invoke(class [Utils]Utils/Product p) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 34,34 : 16,17 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'expensiveInStockProducts@34-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/'expensiveInStockProducts@34-2'::.ctor() + IL_0005: stsfld class Linq101Where01/'expensiveInStockProducts@34-2' Linq101Where01/'expensiveInStockProducts@34-2'::@_instance + IL_000a: ret + } // end of method 'expensiveInStockProducts@34-2'::.cctor + + } // end of class 'expensiveInStockProducts@34-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 41@42' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder 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.Linq.QueryBuilder 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.Linq.QueryBuilder Linq101Where01/'Pipe #2 input at line 41@42'::builder@ + IL_000d: ret + } // end of method 'Pipe #2 input at line 41@42'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 + Invoke(class [Utils]Utils/Customer _arg1) cil managed + { + // Code size 17 (0x11) + .maxstack 6 + .locals init ([0] class [Utils]Utils/Customer c) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 43,43 : 9,32 '' + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Where01/'Pipe #2 input at line 41@42'::builder@ + IL_0008: ldloc.0 + IL_0009: tail. + IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) + IL_0010: ret + } // end of method 'Pipe #2 input at line 41@42'::Invoke + + } // end of class 'Pipe #2 input at line 41@42' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 41@43-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Where01/'Pipe #2 input at line 41@43-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 41@43-1'::.ctor + + .method public strict virtual instance bool + Invoke(class [Utils]Utils/Customer c) cil managed + { + // Code size 17 (0x11) + .maxstack 8 + .line 43,43 : 16,31 '' + IL_0000: ldarg.1 + IL_0001: callvirt instance string [Utils]Utils/Customer::get_Region() + IL_0006: ldstr "WA" + IL_000b: call bool [netstandard]System.String::Equals(string, + string) + IL_0010: ret + } // end of method 'Pipe #2 input at line 41@43-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/'Pipe #2 input at line 41@43-1'::.ctor() + IL_0005: stsfld class Linq101Where01/'Pipe #2 input at line 41@43-1' Linq101Where01/'Pipe #2 input at line 41@43-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 41@43-1'::.cctor + + } // end of class 'Pipe #2 input at line 41@43-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 input at line 41@44-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class Linq101Where01/'Pipe #2 input at line 41@44-2' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'Pipe #2 input at line 41@44-2'::.ctor + + .method public strict virtual instance class [Utils]Utils/Customer + Invoke(class [Utils]Utils/Customer c) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + .line 44,44 : 16,17 '' + IL_0000: ldarg.1 + IL_0001: ret + } // end of method 'Pipe #2 input at line 41@44-2'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/'Pipe #2 input at line 41@44-2'::.ctor() + IL_0005: stsfld class Linq101Where01/'Pipe #2 input at line 41@44-2' Linq101Where01/'Pipe #2 input at line 41@44-2'::@_instance + IL_000a: ret + } // end of method 'Pipe #2 input at line 41@44-2'::.cctor + + } // end of class 'Pipe #2 input at line 41@44-2' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 input at line 50@51-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Linq101Where01/'Pipe #3 input at line 50@51-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 input at line 50@51-1'::.ctor + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1 + Invoke(string _arg1) cil managed + { + // Code size 11 (0xb) + .maxstack 5 + .locals init ([0] string d) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 52,52 : 9,17 '' + IL_0002: ldloc.0 + IL_0003: tail. + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_000a: ret + } // end of method 'Pipe #3 input at line 50@51-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/'Pipe #3 input at line 50@51-1'::.ctor() + IL_0005: stsfld class Linq101Where01/'Pipe #3 input at line 50@51-1' Linq101Where01/'Pipe #3 input at line 50@51-1'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 input at line 50@51-1'::.cctor + + } // end of class 'Pipe #3 input at line 50@51-1' + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'Pipe #3 input at line 50@52' + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 int32 pc + .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 string current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + int32 pc, + string current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'Pipe #3 input at line 50@52'::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld string Linq101Where01/'Pipe #3 input at line 50@52'::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method 'Pipe #3 input at line 50@52'::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 156 (0x9c) + .maxstack 7 + .locals init ([0] string d) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0072 + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_006f + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_0093 + + .line 100001,100001 : 0,0 '' + 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, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'Pipe #3 input at line 50@52'::'enum' + IL_003f: ldarg.0 + IL_0040: ldc.i4.1 + IL_0041: stfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc + 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() + IL_0051: brfalse.s IL_0072 + + IL_0053: ldarg.0 + 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 + 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 + IL_006e: ret + + .line 100001,100001 : 0,0 '' + IL_006f: nop + IL_0070: br.s IL_0046 + + IL_0072: ldarg.0 + IL_0073: ldc.i4.3 + IL_0074: stfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc + 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) + IL_0084: nop + IL_0085: ldarg.0 + IL_0086: ldnull + IL_0087: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'Pipe #3 input at line 50@52'::'enum' + IL_008c: ldarg.0 + IL_008d: ldc.i4.3 + IL_008e: stfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc + IL_0093: ldarg.0 + IL_0094: ldnull + IL_0095: stfld string Linq101Where01/'Pipe #3 input at line 50@52'::current + IL_009a: ldc.i4.0 + IL_009b: ret + } // end of method 'Pipe #3 input at line 50@52'::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 127 (0x7f) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0016 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0016: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_0017: ldarg.0 + IL_0018: ldfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc + IL_001d: switch ( + IL_0034, + IL_0037, + IL_003a, + IL_003d) + IL_0032: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003a: nop + IL_003b: br.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_003d: nop + IL_003e: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0040: nop + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: ldarg.0 + IL_0043: ldc.i4.3 + IL_0044: stfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc + IL_0049: ldarg.0 + IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'Pipe #3 input at line 50@52'::'enum' + IL_004f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0054: nop + .line 100001,100001 : 0,0 '' + IL_0055: nop + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc + IL_005d: ldarg.0 + IL_005e: ldnull + IL_005f: stfld string Linq101Where01/'Pipe #3 input at line 50@52'::current + IL_0064: leave.s IL_0070 + + } // end .try + catch [mscorlib]System.Object + { + IL_0066: castclass [mscorlib]System.Exception + IL_006b: stloc.1 + IL_006c: ldloc.1 + IL_006d: stloc.0 + IL_006e: leave.s IL_0070 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0070: nop + IL_0071: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_007c: ldloc.0 + IL_007d: throw + + .line 100001,100001 : 0,0 '' + IL_007e: ret + } // end of method 'Pipe #3 input at line 50@52'::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method 'Pipe #3 input at line 50@52'::get_CheckClose + + .method public strict virtual instance string + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string Linq101Where01/'Pipe #3 input at line 50@52'::current + IL_0006: ret + } // end of method 'Pipe #3 input at line 50@52'::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 9 (0x9) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Where01/'Pipe #3 input at line 50@52'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + string) + IL_0008: ret + } // end of method 'Pipe #3 input at line 50@52'::GetFreshEnumerator + + } // end of class 'Pipe #3 input at line 50@52' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #3 stage #1 at line 54@54' + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3> + { + .field static assembly initonly class Linq101Where01/'Pipe #3 stage #1 at line 54@54' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3>::.ctor() + IL_0006: ret + } // end of method 'Pipe #3 stage #1 at line 54@54'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 + Invoke(int32 i, + string d) cil managed + { + // Code size 19 (0x13) + .maxstack 8 + .line 54,54 : 29,49 '' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.2 + IL_0002: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0007: ldarg.1 + IL_0008: bge.s IL_0011 + + .line 54,54 : 50,57 '' + IL_000a: ldarg.2 + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) + IL_0010: ret + + .line 54,54 : 63,67 '' + IL_0011: ldnull + IL_0012: ret + } // end of method 'Pipe #3 stage #1 at line 54@54'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/'Pipe #3 stage #1 at line 54@54'::.ctor() + IL_0005: stsfld class Linq101Where01/'Pipe #3 stage #1 at line 54@54' Linq101Where01/'Pipe #3 stage #1 at line 54@54'::@_instance + IL_000a: ret + } // end of method 'Pipe #3 stage #1 at line 54@54'::.cctor + + } // end of class 'Pipe #3 stage #1 at line 54@54' + + .class auto ansi serializable sealed nested assembly beforefieldinit shortDigits@55 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1> + { + .field static assembly initonly class Linq101Where01/shortDigits@55 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>::.ctor() + IL_0006: ret + } // end of method shortDigits@55::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 x) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: tail. + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Identity>(!!0) + IL_0008: ret + } // end of method shortDigits@55::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void Linq101Where01/shortDigits@55::.ctor() + IL_0005: stsfld class Linq101Where01/shortDigits@55 Linq101Where01/shortDigits@55::@_instance + IL_000a: ret + } // end of method shortDigits@55::.cctor + + } // end of class shortDigits@55 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_numbers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::numbers@9 + IL_0005: ret + } // end of method Linq101Where01::get_numbers + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_lowNums() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::lowNums@12 + IL_0005: ret + } // end of method Linq101Where01::get_lowNums + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_products() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::products@20 + IL_0005: ret + } // end of method Linq101Where01::get_products + + .method public specialname static class [mscorlib]System.Collections.Generic.IEnumerable`1 + get_soldOutProducts() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::soldOutProducts@22 + IL_0005: ret + } // end of method Linq101Where01::get_soldOutProducts + + .method public specialname static class [mscorlib]System.Collections.Generic.IEnumerable`1 + get_expensiveInStockProducts() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::expensiveInStockProducts@30 + IL_0005: ret + } // end of method Linq101Where01::get_expensiveInStockProducts + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_customers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::customers@38 + IL_0005: ret + } // end of method Linq101Where01::get_customers + + .method public specialname static class [Utils]Utils/Customer[] + get_waCustomers() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [Utils]Utils/Customer[] ''.$Linq101Where01::waCustomers@40 + IL_0005: ret + } // end of method Linq101Where01::get_waCustomers + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_digits() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::digits@48 + IL_0005: ret + } // end of method Linq101Where01::get_digits + + .method public specialname static class [mscorlib]System.Collections.Generic.IEnumerable`1 + get_shortDigits() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::shortDigits@49 + IL_0005: ret + } // end of method Linq101Where01::get_shortDigits + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + numbers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_numbers() + } // end of property Linq101Where01::numbers + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + lowNums() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_lowNums() + } // end of property Linq101Where01::lowNums + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + products() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_products() + } // end of property Linq101Where01::products + .property class [mscorlib]System.Collections.Generic.IEnumerable`1 + soldOutProducts() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101Where01::get_soldOutProducts() + } // end of property Linq101Where01::soldOutProducts + .property class [mscorlib]System.Collections.Generic.IEnumerable`1 + expensiveInStockProducts() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101Where01::get_expensiveInStockProducts() + } // end of property Linq101Where01::expensiveInStockProducts + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + customers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_customers() + } // end of property Linq101Where01::customers + .property class [Utils]Utils/Customer[] + waCustomers() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [Utils]Utils/Customer[] Linq101Where01::get_waCustomers() + } // end of property Linq101Where01::waCustomers + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + digits() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_digits() + } // end of property Linq101Where01::digits + .property class [mscorlib]System.Collections.Generic.IEnumerable`1 + shortDigits() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101Where01::get_shortDigits() + } // end of property Linq101Where01::shortDigits +} // end of class Linq101Where01 + +.class private abstract auto ansi sealed ''.$Linq101Where01 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers@9 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 lowNums@12 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@20 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 soldOutProducts@22 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 expensiveInStockProducts@30 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers@38 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [Utils]Utils/Customer[] waCustomers@40 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 digits@48 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 shortDigits@49 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // 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, + [2] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, + [3] class [mscorlib]System.Collections.Generic.IEnumerable`1 soldOutProducts, + [4] class [mscorlib]System.Collections.Generic.IEnumerable`1 expensiveInStockProducts, + [5] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers, + [6] class [Utils]Utils/Customer[] waCustomers, + [7] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 digits, + [8] class [mscorlib]System.Collections.Generic.IEnumerable`1 shortDigits, + [9] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 13', + [10] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_10, + [11] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_11, + [12] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_12, + [13] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #2 input at line 41', + [14] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_14, + [15] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #3 input at line 50', + [16] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_16, + [17] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #3 stage #1 at line 54') + .line 9,9 : 1,47 '' + IL_0000: ldc.i4.5 + IL_0001: ldc.i4.4 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.3 + IL_0004: ldc.i4.s 9 + IL_0006: ldc.i4.8 + IL_0007: ldc.i4.6 + IL_0008: ldc.i4.7 + IL_0009: ldc.i4.2 + IL_000a: ldc.i4.0 + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0010: 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_0015: 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_001a: 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_001f: 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_0024: 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_0029: 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_002e: 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_0033: 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_0038: 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_003d: 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_0042: dup + IL_0043: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::numbers@9 + IL_0048: stloc.0 + .line 13,13 : 5,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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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 + .line 42,42 : 9,12 '' + IL_0146: ldloc.s V_14 + IL_0148: ldloc.s V_14 + 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_020a: stloc.s 'Pipe #3 input at line 50' + .line 54,54 : 8,68 '' + 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_0218: stloc.s 'Pipe #3 stage #1 at line 54' + .line 55,55 : 8,21 '' + 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_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 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Utils.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Utils.fs new file mode 100644 index 00000000000..cf652bfdc87 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/Utils.fs @@ -0,0 +1,227 @@ +[] +module Utils + +open System +open System.Text.RegularExpressions +open System.Xml +open System.Xml.Linq + +type ProductR = { ProductID : int; ProductName : string; Category : string; UnitPrice : decimal; UnitsInStock : int } + +type Product() = + let mutable id = 0 + let mutable name = "" + let mutable category = "" + let mutable price = 0M + let mutable unitsInStock = 0 + + member x.ProductID with get() = id and set(v) = id <- v + member x.ProductName with get() = name and set(v) = name <- v + member x.Category with get() = category and set(v) = category <- v + member x.UnitPrice with get() = price and set(v) = price <- v + member x.UnitsInStock with get() = unitsInStock and set(v) = unitsInStock <- v + +let getProductList() = + [ + Product(ProductID = 1, ProductName = "Chai", Category = "Beverages", UnitPrice = 18.0000M, UnitsInStock = 39 ); + Product(ProductID = 2, ProductName = "Chang", Category = "Beverages", UnitPrice = 19.0000M, UnitsInStock = 17 ); + Product(ProductID = 3, ProductName = "Aniseed Syrup", Category = "Condiments", UnitPrice = 10.0000M, UnitsInStock = 13 ); + Product(ProductID = 4, ProductName = "Chef Anton's Cajun Seasoning", Category = "Condiments", UnitPrice = 22.0000M, UnitsInStock = 53 ); + Product(ProductID = 5, ProductName = "Chef Anton's Gumbo Mix", Category = "Condiments", UnitPrice = 21.3500M, UnitsInStock = 0 ); + Product(ProductID = 6, ProductName = "Grandma's Boysenberry Spread", Category = "Condiments", UnitPrice = 25.0000M, UnitsInStock = 120 ); + Product(ProductID = 7, ProductName = "Uncle Bob's Organic Dried Pears", Category = "Produce", UnitPrice = 30.0000M, UnitsInStock = 15 ); + Product(ProductID = 8, ProductName = "Northwoods Cranberry Sauce", Category = "Condiments", UnitPrice = 40.0000M, UnitsInStock = 6 ); + Product(ProductID = 9, ProductName = "Mishi Kobe Niku", Category = "Meat/Poultry", UnitPrice = 97.0000M, UnitsInStock = 29 ); + Product(ProductID = 10, ProductName = "Ikura", Category = "Seafood", UnitPrice = 31.0000M, UnitsInStock = 31 ); + Product(ProductID = 11, ProductName = "Queso Cabrales", Category = "Dairy Products", UnitPrice = 21.0000M, UnitsInStock = 22 ); + Product(ProductID = 12, ProductName = "Queso Manchego La Pastora", Category = "Dairy Products", UnitPrice = 38.0000M, UnitsInStock = 86 ); + Product(ProductID = 13, ProductName = "Konbu", Category = "Seafood", UnitPrice = 6.0000M, UnitsInStock = 24 ); + Product(ProductID = 14, ProductName = "Tofu", Category = "Produce", UnitPrice = 23.2500M, UnitsInStock = 35 ); + Product(ProductID = 15, ProductName = "Genen Shouyu", Category = "Condiments", UnitPrice = 15.5000M, UnitsInStock = 39 ); + Product(ProductID = 16, ProductName = "Pavlova", Category = "Confections", UnitPrice = 17.4500M, UnitsInStock = 29 ); + Product(ProductID = 17, ProductName = "Alice Mutton", Category = "Meat/Poultry", UnitPrice = 39.0000M, UnitsInStock = 0 ); + Product(ProductID = 18, ProductName = "Carnarvon Tigers", Category = "Seafood", UnitPrice = 62.5000M, UnitsInStock = 42 ); + Product(ProductID = 19, ProductName = "Teatime Chocolate Biscuits", Category = "Confections", UnitPrice = 9.2000M, UnitsInStock = 25 ); + Product(ProductID = 20, ProductName = "Sir Rodney's Marmalade", Category = "Confections", UnitPrice = 81.0000M, UnitsInStock = 40 ); + Product(ProductID = 21, ProductName = "Sir Rodney's Scones", Category = "Confections", UnitPrice = 10.0000M, UnitsInStock = 3 ); + Product(ProductID = 22, ProductName = "Gustaf's Knäckebröd", Category = "Grains/Cereals", UnitPrice = 21.0000M, UnitsInStock = 104 ); + Product(ProductID = 23, ProductName = "Tunnbröd", Category = "Grains/Cereals", UnitPrice = 9.0000M, UnitsInStock = 61 ); + Product(ProductID = 24, ProductName = "Guaraná Fantástica", Category = "Beverages", UnitPrice = 4.5000M, UnitsInStock = 20 ); + Product(ProductID = 25, ProductName = "NuNuCa Nuß-Nougat-Creme", Category = "Confections", UnitPrice = 14.0000M, UnitsInStock = 76 ); + Product(ProductID = 26, ProductName = "Gumbär Gummibärchen", Category = "Confections", UnitPrice = 31.2300M, UnitsInStock = 15 ); + Product(ProductID = 27, ProductName = "Schoggi Schokolade", Category = "Confections", UnitPrice = 43.9000M, UnitsInStock = 49 ); + Product(ProductID = 28, ProductName = "Rössle Sauerkraut", Category = "Produce", UnitPrice = 45.6000M, UnitsInStock = 26 ); + Product(ProductID = 29, ProductName = "Thüringer Rostbratwurst", Category = "Meat/Poultry", UnitPrice = 123.7900M, UnitsInStock = 0 ); + Product(ProductID = 30, ProductName = "Nord-Ost Matjeshering", Category = "Seafood", UnitPrice = 25.8900M, UnitsInStock = 10 ); + Product(ProductID = 31, ProductName = "Gorgonzola Telino", Category = "Dairy Products", UnitPrice = 12.5000M, UnitsInStock = 0 ); + Product(ProductID = 32, ProductName = "Mascarpone Fabioli", Category = "Dairy Products", UnitPrice = 32.0000M, UnitsInStock = 9 ); + Product(ProductID = 33, ProductName = "Geitost", Category = "Dairy Products", UnitPrice = 2.5000M, UnitsInStock = 112 ); + Product(ProductID = 34, ProductName = "Sasquatch Ale", Category = "Beverages", UnitPrice = 14.0000M, UnitsInStock = 111 ); + Product(ProductID = 35, ProductName = "Steeleye Stout", Category = "Beverages", UnitPrice = 18.0000M, UnitsInStock = 20 ); + Product(ProductID = 36, ProductName = "Inlagd Sill", Category = "Seafood", UnitPrice = 19.0000M, UnitsInStock = 112 ); + Product(ProductID = 37, ProductName = "Gravad lax", Category = "Seafood", UnitPrice = 26.0000M, UnitsInStock = 11 ); + Product(ProductID = 38, ProductName = "Côte de Blaye", Category = "Beverages", UnitPrice = 263.5000M, UnitsInStock = 17 ); + Product(ProductID = 39, ProductName = "Chartreuse verte", Category = "Beverages", UnitPrice = 18.0000M, UnitsInStock = 69 ); + Product(ProductID = 40, ProductName = "Boston Crab Meat", Category = "Seafood", UnitPrice = 18.4000M, UnitsInStock = 123 ); + Product(ProductID = 41, ProductName = "Jack's New England Clam Chowder", Category = "Seafood", UnitPrice = 9.6500M, UnitsInStock = 85 ); + Product(ProductID = 42, ProductName = "Singaporean Hokkien Fried Mee", Category = "Grains/Cereals", UnitPrice = 14.0000M, UnitsInStock = 26 ); + Product(ProductID = 43, ProductName = "Ipoh Coffee", Category = "Beverages", UnitPrice = 46.0000M, UnitsInStock = 17 ); + Product(ProductID = 44, ProductName = "Gula Malacca", Category = "Condiments", UnitPrice = 19.4500M, UnitsInStock = 27 ); + Product(ProductID = 45, ProductName = "Rogede sild", Category = "Seafood", UnitPrice = 9.5000M, UnitsInStock = 5 ); + Product(ProductID = 46, ProductName = "Spegesild", Category = "Seafood", UnitPrice = 12.0000M, UnitsInStock = 95 ); + Product(ProductID = 47, ProductName = "Zaanse koeken", Category = "Confections", UnitPrice = 9.5000M, UnitsInStock = 36 ); + Product(ProductID = 48, ProductName = "Chocolade", Category = "Confections", UnitPrice = 12.7500M, UnitsInStock = 15 ); + Product(ProductID = 49, ProductName = "Maxilaku", Category = "Confections", UnitPrice = 20.0000M, UnitsInStock = 10 ); + Product(ProductID = 50, ProductName = "Valkoinen suklaa", Category = "Confections", UnitPrice = 16.2500M, UnitsInStock = 65 ); + Product(ProductID = 51, ProductName = "Manjimup Dried Apples", Category = "Produce", UnitPrice = 53.0000M, UnitsInStock = 20 ); + Product(ProductID = 52, ProductName = "Filo Mix", Category = "Grains/Cereals", UnitPrice = 7.0000M, UnitsInStock = 38 ); + Product(ProductID = 53, ProductName = "Perth Pasties", Category = "Meat/Poultry", UnitPrice = 32.8000M, UnitsInStock = 0 ); + Product(ProductID = 54, ProductName = "Tourtière", Category = "Meat/Poultry", UnitPrice = 7.4500M, UnitsInStock = 21 ); + Product(ProductID = 55, ProductName = "Pâté chinois", Category = "Meat/Poultry", UnitPrice = 24.0000M, UnitsInStock = 115 ); + Product(ProductID = 56, ProductName = "Gnocchi di nonna Alice", Category = "Grains/Cereals", UnitPrice = 38.0000M, UnitsInStock = 21 ); + Product(ProductID = 57, ProductName = "Ravioli Angelo", Category = "Grains/Cereals", UnitPrice = 19.5000M, UnitsInStock = 36 ); + Product(ProductID = 58, ProductName = "Escargots de Bourgogne", Category = "Seafood", UnitPrice = 13.2500M, UnitsInStock = 62 ); + Product(ProductID = 59, ProductName = "Raclette Courdavault", Category = "Dairy Products", UnitPrice = 55.0000M, UnitsInStock = 79 ); + Product(ProductID = 60, ProductName = "Camembert Pierrot", Category = "Dairy Products", UnitPrice = 34.0000M, UnitsInStock = 19 ); + Product(ProductID = 61, ProductName = "Sirop d'érable", Category = "Condiments", UnitPrice = 28.5000M, UnitsInStock = 113 ); + Product(ProductID = 62, ProductName = "Tarte au sucre", Category = "Confections", UnitPrice = 49.3000M, UnitsInStock = 17 ); + Product(ProductID = 63, ProductName = "Vegie-spread", Category = "Condiments", UnitPrice = 43.9000M, UnitsInStock = 24 ); + Product(ProductID = 64, ProductName = "Wimmers gute Semmelknödel", Category = "Grains/Cereals", UnitPrice = 33.2500M, UnitsInStock = 22 ); + Product(ProductID = 65, ProductName = "Louisiana Fiery Hot Pepper Sauce", Category = "Condiments", UnitPrice = 21.0500M, UnitsInStock = 76 ); + Product(ProductID = 66, ProductName = "Louisiana Hot Spiced Okra", Category = "Condiments", UnitPrice = 17.0000M, UnitsInStock = 4 ); + Product(ProductID = 67, ProductName = "Laughing Lumberjack Lager", Category = "Beverages", UnitPrice = 14.0000M, UnitsInStock = 52 ); + Product(ProductID = 68, ProductName = "Scottish Longbreads", Category = "Confections", UnitPrice = 12.5000M, UnitsInStock = 6 ); + Product(ProductID = 69, ProductName = "Gudbrandsdalsost", Category = "Dairy Products", UnitPrice = 36.0000M, UnitsInStock = 26 ); + Product(ProductID = 70, ProductName = "Outback Lager", Category = "Beverages", UnitPrice = 15.0000M, UnitsInStock = 15 ); + Product(ProductID = 71, ProductName = "Flotemysost", Category = "Dairy Products", UnitPrice = 21.5000M, UnitsInStock = 26 ); + Product(ProductID = 72, ProductName = "Mozzarella di Giovanni", Category = "Dairy Products", UnitPrice = 34.8000M, UnitsInStock = 14 ); + Product(ProductID = 73, ProductName = "Röd Kaviar", Category = "Seafood", UnitPrice = 15.0000M, UnitsInStock = 101 ); + Product(ProductID = 74, ProductName = "Longlife Tofu", Category = "Produce", UnitPrice = 10.0000M, UnitsInStock = 4 ); + Product(ProductID = 75, ProductName = "Rhönbräu Klosterbier", Category = "Beverages", UnitPrice = 7.7500M, UnitsInStock = 125 ); + Product(ProductID = 76, ProductName = "Lakkalikööri", Category = "Beverages", UnitPrice = 18.0000M, UnitsInStock = 57 ); + Product(ProductID = 77, ProductName = "Original Frankfurter grüne Soße", Category = "Condiments", UnitPrice = 13.0000M, UnitsInStock = 32 ) + ] + +let getProductListAsRecords() = + [{ ProductID = 1; ProductName = "Chai"; Category = "Beverages"; UnitPrice = 18.0000M; UnitsInStock = 39 }; + { ProductID = 2; ProductName = "Chang"; Category = "Beverages"; UnitPrice = 19.0000M; UnitsInStock = 17 }; + { ProductID = 3; ProductName = "Aniseed Syrup"; Category = "Condiments"; UnitPrice = 10.0000M; UnitsInStock = 13 }; + { ProductID = 4; ProductName = "Chef Anton's Cajun Seasoning"; Category = "Condiments"; UnitPrice = 22.0000M; UnitsInStock = 53 }; + { ProductID = 5; ProductName = "Chef Anton's Gumbo Mix"; Category = "Condiments"; UnitPrice = 21.3500M; UnitsInStock = 0 }; + { ProductID = 6; ProductName = "Grandma's Boysenberry Spread"; Category = "Condiments"; UnitPrice = 25.0000M; UnitsInStock = 120 }; + { ProductID = 7; ProductName = "Uncle Bob's Organic Dried Pears"; Category = "Produce"; UnitPrice = 30.0000M; UnitsInStock = 15 }; + { ProductID = 8; ProductName = "Northwoods Cranberry Sauce"; Category = "Condiments"; UnitPrice = 40.0000M; UnitsInStock = 6 }; + { ProductID = 9; ProductName = "Mishi Kobe Niku"; Category = "Meat/Poultry"; UnitPrice = 97.0000M; UnitsInStock = 29 }; + { ProductID = 10; ProductName = "Ikura"; Category = "Seafood"; UnitPrice = 31.0000M; UnitsInStock = 31 }; + { ProductID = 11; ProductName = "Queso Cabrales"; Category = "Dairy Products"; UnitPrice = 21.0000M; UnitsInStock = 22 }; + { ProductID = 12; ProductName = "Queso Manchego La Pastora"; Category = "Dairy Products"; UnitPrice = 38.0000M; UnitsInStock = 86 }; + { ProductID = 13; ProductName = "Konbu"; Category = "Seafood"; UnitPrice = 6.0000M; UnitsInStock = 24 }; + { ProductID = 14; ProductName = "Tofu"; Category = "Produce"; UnitPrice = 23.2500M; UnitsInStock = 35 }; + { ProductID = 15; ProductName = "Genen Shouyu"; Category = "Condiments"; UnitPrice = 15.5000M; UnitsInStock = 39 }; + { ProductID = 16; ProductName = "Pavlova"; Category = "Confections"; UnitPrice = 17.4500M; UnitsInStock = 29 }; + { ProductID = 17; ProductName = "Alice Mutton"; Category = "Meat/Poultry"; UnitPrice = 39.0000M; UnitsInStock = 0 }; + { ProductID = 18; ProductName = "Carnarvon Tigers"; Category = "Seafood"; UnitPrice = 62.5000M; UnitsInStock = 42 }; + { ProductID = 19; ProductName = "Teatime Chocolate Biscuits"; Category = "Confections"; UnitPrice = 9.2000M; UnitsInStock = 25 }; + { ProductID = 20; ProductName = "Sir Rodney's Marmalade"; Category = "Confections"; UnitPrice = 81.0000M; UnitsInStock = 40 }; + { ProductID = 21; ProductName = "Sir Rodney's Scones"; Category = "Confections"; UnitPrice = 10.0000M; UnitsInStock = 3 }; + { ProductID = 22; ProductName = "Gustaf's Knäckebröd"; Category = "Grains/Cereals"; UnitPrice = 21.0000M; UnitsInStock = 104 }; + { ProductID = 23; ProductName = "Tunnbröd"; Category = "Grains/Cereals"; UnitPrice = 9.0000M; UnitsInStock = 61 }; + { ProductID = 24; ProductName = "Guaraná Fantástica"; Category = "Beverages"; UnitPrice = 4.5000M; UnitsInStock = 20 }; + { ProductID = 25; ProductName = "NuNuCa Nuß-Nougat-Creme"; Category = "Confections"; UnitPrice = 14.0000M; UnitsInStock = 76 }; + { ProductID = 26; ProductName = "Gumbär Gummibärchen"; Category = "Confections"; UnitPrice = 31.2300M; UnitsInStock = 15 }; + { ProductID = 27; ProductName = "Schoggi Schokolade"; Category = "Confections"; UnitPrice = 43.9000M; UnitsInStock = 49 }; + { ProductID = 28; ProductName = "Rössle Sauerkraut"; Category = "Produce"; UnitPrice = 45.6000M; UnitsInStock = 26 }; + { ProductID = 29; ProductName = "Thüringer Rostbratwurst"; Category = "Meat/Poultry"; UnitPrice = 123.7900M; UnitsInStock = 0 }; + { ProductID = 30; ProductName = "Nord-Ost Matjeshering"; Category = "Seafood"; UnitPrice = 25.8900M; UnitsInStock = 10 }; + { ProductID = 31; ProductName = "Gorgonzola Telino"; Category = "Dairy Products"; UnitPrice = 12.5000M; UnitsInStock = 0 }; + { ProductID = 32; ProductName = "Mascarpone Fabioli"; Category = "Dairy Products"; UnitPrice = 32.0000M; UnitsInStock = 9 }; + { ProductID = 33; ProductName = "Geitost"; Category = "Dairy Products"; UnitPrice = 2.5000M; UnitsInStock = 112 }; + { ProductID = 34; ProductName = "Sasquatch Ale"; Category = "Beverages"; UnitPrice = 14.0000M; UnitsInStock = 111 }; + { ProductID = 35; ProductName = "Steeleye Stout"; Category = "Beverages"; UnitPrice = 18.0000M; UnitsInStock = 20 }; + { ProductID = 36; ProductName = "Inlagd Sill"; Category = "Seafood"; UnitPrice = 19.0000M; UnitsInStock = 112 }; + { ProductID = 37; ProductName = "Gravad lax"; Category = "Seafood"; UnitPrice = 26.0000M; UnitsInStock = 11 }; + { ProductID = 38; ProductName = "Côte de Blaye"; Category = "Beverages"; UnitPrice = 263.5000M; UnitsInStock = 17 }; + { ProductID = 39; ProductName = "Chartreuse verte"; Category = "Beverages"; UnitPrice = 18.0000M; UnitsInStock = 69 }; + { ProductID = 40; ProductName = "Boston Crab Meat"; Category = "Seafood"; UnitPrice = 18.4000M; UnitsInStock = 123 }; + { ProductID = 41; ProductName = "Jack's New England Clam Chowder"; Category = "Seafood"; UnitPrice = 9.6500M; UnitsInStock = 85 }; + { ProductID = 42; ProductName = "Singaporean Hokkien Fried Mee"; Category = "Grains/Cereals"; UnitPrice = 14.0000M; UnitsInStock = 26 }; + { ProductID = 43; ProductName = "Ipoh Coffee"; Category = "Beverages"; UnitPrice = 46.0000M; UnitsInStock = 17 }; + { ProductID = 44; ProductName = "Gula Malacca"; Category = "Condiments"; UnitPrice = 19.4500M; UnitsInStock = 27 }; + { ProductID = 45; ProductName = "Rogede sild"; Category = "Seafood"; UnitPrice = 9.5000M; UnitsInStock = 5 }; + { ProductID = 46; ProductName = "Spegesild"; Category = "Seafood"; UnitPrice = 12.0000M; UnitsInStock = 95 }; + { ProductID = 47; ProductName = "Zaanse koeken"; Category = "Confections"; UnitPrice = 9.5000M; UnitsInStock = 36 }; + { ProductID = 48; ProductName = "Chocolade"; Category = "Confections"; UnitPrice = 12.7500M; UnitsInStock = 15 }; + { ProductID = 49; ProductName = "Maxilaku"; Category = "Confections"; UnitPrice = 20.0000M; UnitsInStock = 10 }; + { ProductID = 50; ProductName = "Valkoinen suklaa"; Category = "Confections"; UnitPrice = 16.2500M; UnitsInStock = 65 }; + { ProductID = 51; ProductName = "Manjimup Dried Apples"; Category = "Produce"; UnitPrice = 53.0000M; UnitsInStock = 20 }; + { ProductID = 52; ProductName = "Filo Mix"; Category = "Grains/Cereals"; UnitPrice = 7.0000M; UnitsInStock = 38 }; + { ProductID = 53; ProductName = "Perth Pasties"; Category = "Meat/Poultry"; UnitPrice = 32.8000M; UnitsInStock = 0 }; + { ProductID = 54; ProductName = "Tourtière"; Category = "Meat/Poultry"; UnitPrice = 7.4500M; UnitsInStock = 21 }; + { ProductID = 55; ProductName = "Pâté chinois"; Category = "Meat/Poultry"; UnitPrice = 24.0000M; UnitsInStock = 115 }; + { ProductID = 56; ProductName = "Gnocchi di nonna Alice"; Category = "Grains/Cereals"; UnitPrice = 38.0000M; UnitsInStock = 21 }; + { ProductID = 57; ProductName = "Ravioli Angelo"; Category = "Grains/Cereals"; UnitPrice = 19.5000M; UnitsInStock = 36 }; + { ProductID = 58; ProductName = "Escargots de Bourgogne"; Category = "Seafood"; UnitPrice = 13.2500M; UnitsInStock = 62 }; + { ProductID = 59; ProductName = "Raclette Courdavault"; Category = "Dairy Products"; UnitPrice = 55.0000M; UnitsInStock = 79 }; + { ProductID = 60; ProductName = "Camembert Pierrot"; Category = "Dairy Products"; UnitPrice = 34.0000M; UnitsInStock = 19 }; + { ProductID = 61; ProductName = "Sirop d'érable"; Category = "Condiments"; UnitPrice = 28.5000M; UnitsInStock = 113 }; + { ProductID = 62; ProductName = "Tarte au sucre"; Category = "Confections"; UnitPrice = 49.3000M; UnitsInStock = 17 }; + { ProductID = 63; ProductName = "Vegie-spread"; Category = "Condiments"; UnitPrice = 43.9000M; UnitsInStock = 24 }; + { ProductID = 64; ProductName = "Wimmers gute Semmelknödel"; Category = "Grains/Cereals"; UnitPrice = 33.2500M; UnitsInStock = 22 }; + { ProductID = 65; ProductName = "Louisiana Fiery Hot Pepper Sauce"; Category = "Condiments"; UnitPrice = 21.0500M; UnitsInStock = 76 }; + { ProductID = 66; ProductName = "Louisiana Hot Spiced Okra"; Category = "Condiments"; UnitPrice = 17.0000M; UnitsInStock = 4 }; + { ProductID = 67; ProductName = "Laughing Lumberjack Lager"; Category = "Beverages"; UnitPrice = 14.0000M; UnitsInStock = 52 }; + { ProductID = 68; ProductName = "Scottish Longbreads"; Category = "Confections"; UnitPrice = 12.5000M; UnitsInStock = 6 }; + { ProductID = 69; ProductName = "Gudbrandsdalsost"; Category = "Dairy Products"; UnitPrice = 36.0000M; UnitsInStock = 26 }; + { ProductID = 70; ProductName = "Outback Lager"; Category = "Beverages"; UnitPrice = 15.0000M; UnitsInStock = 15 }; + { ProductID = 71; ProductName = "Flotemysost"; Category = "Dairy Products"; UnitPrice = 21.5000M; UnitsInStock = 26 }; + { ProductID = 72; ProductName = "Mozzarella di Giovanni"; Category = "Dairy Products"; UnitPrice = 34.8000M; UnitsInStock = 14 }; + { ProductID = 73; ProductName = "Röd Kaviar"; Category = "Seafood"; UnitPrice = 15.0000M; UnitsInStock = 101 }; + { ProductID = 74; ProductName = "Longlife Tofu"; Category = "Produce"; UnitPrice = 10.0000M; UnitsInStock = 4 }; + { ProductID = 75; ProductName = "Rhönbräu Klosterbier"; Category = "Beverages"; UnitPrice = 7.7500M; UnitsInStock = 125 }; + { ProductID = 76; ProductName = "Lakkalikööri"; Category = "Beverages"; UnitPrice = 18.0000M; UnitsInStock = 57 }; + { ProductID = 77; ProductName = "Original Frankfurter grüne Soße"; Category = "Condiments"; UnitPrice = 13.0000M; UnitsInStock = 32 }] + + +type Order(orderID, orderDate : DateTime, total) = + member x.OrderID = orderID + member x.OrderDate = orderDate + member x.Total = total + +type Customer(customerID, companyName, address, city, region, postalCode, country, phone, fax, orders) = + member x.CustomerID = customerID + member x.CompanyName = companyName + member x.Address = address + member x.City = city + member x.Region = region + member x.PostalCode = postalCode + member x.Country = country + member x.Phone = phone + member x.Fax = fax + member x.Orders = orders + +let getCustomerList() = + let doc = XmlReader.Create(Environment.CurrentDirectory + "\\customers.xml") + + let xname s = XName.Get(s) + let ge (x : XElement) (s : string) = + try + let r = x.Element(XName.Get(s)).ToString() + Regex.Match(r, ">(.*)<").Groups.[1].Value + with + | :? NullReferenceException -> "" + query { + for e in XDocument.Load(doc).Root.Elements(xname "customer") do + let get = ge e + let orders = + query { + for o in e.Elements(xname "orders").Elements(xname "order") do + let date = ge o "orderdate" + let dateParts = date.Substring(0, date.Length-9).Split([|'-'|]) + let orderDate = DateTime(Int32.Parse(dateParts.[0]), Int32.Parse(dateParts.[1]), Int32.Parse(dateParts.[2])) + let order = o.Element(xname "id") |> int + let total = o.Element(xname "total") |> decimal + select (Order(order, orderDate, total)) + } |> Seq.toArray + let c = Customer(get "id", get "name", get "address", get "city", get "region", get "postcalcode", get "country", get "phone", get "fax", orders) + select c + } |> Seq.toList \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/env.lst new file mode 100644 index 00000000000..ffb1ef3226a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/env.lst @@ -0,0 +1,19 @@ +NoMT SOURCE=Utils.fs SCFLAGS="-a -r:System.Xml.Linq" # Utils.fs +Retry,NoMT SOURCE=Linq101Aggregates01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Aggregates01.exe" # Linq101Aggregates01.fs - CodeGen +NoMT SOURCE=Linq101ElementOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101ElementOperators01.exe" # Linq101ElementOperators01.fs - CodeGen +NoMT SOURCE=Linq101Grouping01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Grouping01.exe" # Linq101Grouping01.fs - CodeGen +NoMT SOURCE=Linq101Joins01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Joins01.exe" # Linq101Joins01.fs - CodeGen +NoMT SOURCE=Linq101Ordering01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Ordering01.exe" # Linq101Ordering01.fs - CodeGen +NoMT SOURCE=Linq101Partitioning01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Partitioning01.exe" # Linq101Partitioning01.fs - CodeGen +NoMT SOURCE=Linq101Quantifiers01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Quantifiers01.exe" # Linq101Quantifiers01.fs - CodeGen +Retry,NoMT SOURCE=Linq101Select01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Select01.exe" # Linq101Select01.fs - CodeGen +Retry,NoMT SOURCE=Linq101SetOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101SetOperators01.exe" # Linq101SetOperators01.fs - CodeGen +NoMT SOURCE=Linq101Where01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Where01.exe" # Linq101Where01.fs - CodeGen + + + + + + + + diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/keep.lst similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/keep.lst rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/QueryExpressionStepping/keep.lst diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.fs new file mode 100644 index 00000000000..d0b9589d64f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.fs @@ -0,0 +1,8 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Sequences +module SeqExpressionSteppingTest1 // Regression test for FSHARP1.0:4058 +module SeqExpressionSteppingTest1 = + + let f0 () = + seq { yield 1 } + + let _ = f0()|> Seq.length diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl new file mode 100644 index 00000000000..4b4e0c5bf76 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl @@ -0,0 +1,252 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly SeqExpressionSteppingTest1 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SeqExpressionSteppingTest1 +{ + // Offset: 0x00000000 Length: 0x00000263 +} +.mresource public FSharpOptimizationData.SeqExpressionSteppingTest1 +{ + // Offset: 0x00000268 Length: 0x000000AD +} +.module SeqExpressionSteppingTest1.exe +// MVID: {611B0EC5-2432-947D-A745-0383C50E1B61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06CF0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SeqExpressionSteppingTest1 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public SeqExpressionSteppingTest1 + extends [mscorlib]System.Object + { + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname f0@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(int32 pc, + int32 current) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current + IL_000e: ldarg.0 + IL_000f: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0014: ret + } // end of method f0@6::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 62 (0x3e) + .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\\SeqExpressionStepping\\SeqExpressionSteppingTest1.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_0017, + IL_001a) + IL_0015: br.s IL_001d + + .line 100001,100001 : 0,0 '' + IL_0017: nop + IL_0018: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_001a: nop + IL_001b: br.s IL_0035 + + .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 + IL_0026: ldc.i4.1 + IL_0027: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current + IL_002c: ldc.i4.1 + IL_002d: ret + + IL_002e: ldarg.0 + IL_002f: ldc.i4.2 + IL_0030: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0035: ldarg.0 + IL_0036: ldc.i4.0 + IL_0037: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current + IL_003c: ldc.i4.0 + IL_003d: ret + } // end of method f0@6::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.2 + IL_0002: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0007: ret + } // end of method f0@6::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 39 (0x27) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0006: switch ( + IL_0019, + IL_001c, + IL_001f) + IL_0017: br.s IL_0022 + + .line 100001,100001 : 0,0 '' + IL_0019: nop + IL_001a: br.s IL_0025 + + .line 100001,100001 : 0,0 '' + IL_001c: nop + IL_001d: br.s IL_0023 + + .line 100001,100001 : 0,0 '' + IL_001f: nop + IL_0020: br.s IL_0025 + + .line 100001,100001 : 0,0 '' + IL_0022: nop + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + } // end of method f0@6::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current + IL_0006: ret + } // end of method f0@6::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 8 (0x8) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ldc.i4.0 + IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32, + int32) + IL_0007: ret + } // end of method f0@6::GetFreshEnumerator + + } // end of class f0@6 + + .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 + f0() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 6,6 : 9,24 '' + IL_0000: ldc.i4.0 + IL_0001: ldc.i4.0 + IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32, + int32) + IL_0007: ret + } // end of method SeqExpressionSteppingTest1::f0 + + } // end of class SeqExpressionSteppingTest1 + +} // end of class SeqExpressionSteppingTest1 + +.class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest1 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 14 (0xe) + .maxstack 3 + .locals init ([0] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 8') + .line 8,8 : 13,17 '' + IL_0000: call class [mscorlib]System.Collections.Generic.IEnumerable`1 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1::f0() + IL_0005: stloc.0 + .line 8,8 : 20,30 '' + IL_0006: ldloc.0 + IL_0007: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000c: pop + IL_000d: ret + } // end of method $SeqExpressionSteppingTest1::main@ + +} // end of class ''.$SeqExpressionSteppingTest1 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.fs new file mode 100644 index 00000000000..b78badf05dc --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.fs @@ -0,0 +1,10 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Sequences +module SeqExpressionSteppingTest2 // Regression test for FSHARP1.0:4058 +module SeqExpressionSteppingTest2 = + let f1 () = + seq { printfn "hello" + yield 1 + printfn "goodbye" + yield 2 } + + let _ = f1()|> Seq.length diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl new file mode 100644 index 00000000000..91422d1148b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl @@ -0,0 +1,285 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly SeqExpressionSteppingTest2 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SeqExpressionSteppingTest2 +{ + // Offset: 0x00000000 Length: 0x00000263 +} +.mresource public FSharpOptimizationData.SeqExpressionSteppingTest2 +{ + // Offset: 0x00000268 Length: 0x000000AD +} +.module SeqExpressionSteppingTest2.exe +// MVID: {611B0EC5-2432-951E-A745-0383C50E1B61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06940000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SeqExpressionSteppingTest2 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public SeqExpressionSteppingTest2 + extends [mscorlib]System.Object + { + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname f1@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(int32 pc, + int32 current) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_000e: ldarg.0 + IL_000f: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0014: ret + } // end of method f1@5::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 117 (0x75) + .maxstack 6 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SeqExpressionStepping\\SeqExpressionSteppingTest2.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0045 + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0065 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_0024: nop + .line 5,5 : 15,30 '' + IL_0025: ldstr "hello" + 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 + IL_003d: ldc.i4.1 + IL_003e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_0043: ldc.i4.1 + IL_0044: ret + + .line 7,7 : 15,32 '' + IL_0045: ldstr "goodbye" + 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 + IL_005d: ldc.i4.2 + IL_005e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_0063: ldc.i4.1 + IL_0064: ret + + IL_0065: ldarg.0 + IL_0066: ldc.i4.3 + IL_0067: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_006c: ldarg.0 + IL_006d: ldc.i4.0 + IL_006e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_0073: ldc.i4.0 + IL_0074: ret + } // end of method f1@5::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_0007: ret + } // end of method f1@5::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method f1@5::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_0006: ret + } // end of method f1@5::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 8 (0x8) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ldc.i4.0 + IL_0002: newobj instance void SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::.ctor(int32, + int32) + IL_0007: ret + } // end of method f1@5::GetFreshEnumerator + + } // end of class f1@5 + + .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 + f1() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + .line 5,8 : 9,24 '' + IL_0000: ldc.i4.0 + IL_0001: ldc.i4.0 + IL_0002: newobj instance void SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::.ctor(int32, + int32) + IL_0007: ret + } // end of method SeqExpressionSteppingTest2::f1 + + } // end of class SeqExpressionSteppingTest2 + +} // end of class SeqExpressionSteppingTest2 + +.class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest2 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 14 (0xe) + .maxstack 3 + .locals init ([0] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 10') + .line 10,10 : 13,17 '' + IL_0000: call class [mscorlib]System.Collections.Generic.IEnumerable`1 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2::f1() + IL_0005: stloc.0 + .line 10,10 : 20,30 '' + IL_0006: ldloc.0 + IL_0007: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000c: pop + IL_000d: ret + } // end of method $SeqExpressionSteppingTest2::main@ + +} // end of class ''.$SeqExpressionSteppingTest2 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.fs new file mode 100644 index 00000000000..a2734f9a766 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.fs @@ -0,0 +1,11 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Sequences +module SeqExpressionSteppingTest3 // Regression test for FSHARP1.0:4058 +module SeqExpressionSteppingTest3 = + let f2 () = + let x = ref 0 + seq { while !x < 4 do + incr x + printfn "hello" + yield x } + + let _ = f2()|> Seq.length diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl new file mode 100644 index 00000000000..5dfb9d70895 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl @@ -0,0 +1,289 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly SeqExpressionSteppingTest3 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SeqExpressionSteppingTest3 +{ + // Offset: 0x00000000 Length: 0x00000273 +} +.mresource public FSharpOptimizationData.SeqExpressionSteppingTest3 +{ + // Offset: 0x00000278 Length: 0x000000AD +} +.module SeqExpressionSteppingTest3.exe +// MVID: {611B0EC5-2432-943F-A745-0383C50E1B61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06440000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SeqExpressionSteppingTest3 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public SeqExpressionSteppingTest3 + extends [mscorlib]System.Object + { + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname f2@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1> + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .field public int32 pc + .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 current + .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 public specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, + int32 pc, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::x + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() + IL_001b: ret + } // end of method f2@6::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1>& next) cil managed + { + // Code size 112 (0x70) + .maxstack 6 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SeqExpressionStepping\\SeqExpressionSteppingTest3.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_0017, + IL_001a) + IL_0015: br.s IL_001d + + .line 100001,100001 : 0,0 '' + IL_0017: nop + IL_0018: br.s IL_005d + + .line 100001,100001 : 0,0 '' + IL_001a: nop + IL_001b: br.s IL_0067 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + .line 6,6 : 15,27 '' + IL_001e: ldarg.0 + IL_001f: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::x + IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0029: ldc.i4.4 + IL_002a: bge.s IL_0060 + + .line 7,7 : 18,24 '' + IL_002c: ldarg.0 + IL_002d: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::x + IL_0032: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0037: nop + .line 8,8 : 18,33 '' + IL_0038: ldstr "hello" + 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 + 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 + IL_005b: ldc.i4.1 + IL_005c: ret + + .line 100001,100001 : 0,0 '' + IL_005d: nop + IL_005e: br.s IL_001e + + IL_0060: ldarg.0 + IL_0061: ldc.i4.2 + IL_0062: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::pc + IL_0067: ldarg.0 + IL_0068: ldnull + IL_0069: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::current + IL_006e: ldc.i4.0 + IL_006f: ret + } // end of method f2@6::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.2 + IL_0002: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::pc + IL_0007: ret + } // end of method f2@6::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 39 (0x27) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::pc + IL_0006: switch ( + IL_0019, + IL_001c, + IL_001f) + IL_0017: br.s IL_0022 + + .line 100001,100001 : 0,0 '' + IL_0019: nop + IL_001a: br.s IL_0025 + + .line 100001,100001 : 0,0 '' + IL_001c: nop + IL_001d: br.s IL_0023 + + .line 100001,100001 : 0,0 '' + IL_001f: nop + IL_0020: br.s IL_0025 + + .line 100001,100001 : 0,0 '' + IL_0022: nop + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + } // end of method f2@6::get_CheckClose + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::current + IL_0006: ret + } // end of method f2@6::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1> + GetFreshEnumerator() 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: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::x + IL_0006: ldc.i4.0 + IL_0007: ldnull + IL_0008: newobj instance void SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000d: ret + } // end of method f2@6::GetFreshEnumerator + + } // end of class f2@6 + + .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1> + f2() cil managed + { + // Code size 16 (0x10) + .maxstack 5 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) + .line 5,5 : 9,22 '' + 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,9 : 9,27 '' + IL_0007: ldloc.0 + IL_0008: ldc.i4.0 + IL_0009: ldnull + IL_000a: newobj instance void SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000f: ret + } // end of method SeqExpressionSteppingTest3::f2 + + } // end of class SeqExpressionSteppingTest3 + +} // end of class SeqExpressionSteppingTest3 + +.class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest3 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 14 (0xe) + .maxstack 3 + .locals init ([0] class [mscorlib]System.Collections.Generic.IEnumerable`1> 'Pipe #1 input at line 11') + .line 11,11 : 13,17 '' + IL_0000: call class [mscorlib]System.Collections.Generic.IEnumerable`1> SeqExpressionSteppingTest3/SeqExpressionSteppingTest3::f2() + IL_0005: stloc.0 + .line 11,11 : 20,30 '' + IL_0006: ldloc.0 + IL_0007: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000c: pop + IL_000d: ret + } // end of method $SeqExpressionSteppingTest3::main@ + +} // end of class ''.$SeqExpressionSteppingTest3 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.fs new file mode 100644 index 00000000000..8270ce861e1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.fs @@ -0,0 +1,13 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Sequences +module SeqExpressionSteppingTest4 // Regression test for FSHARP1.0:4058 +module SeqExpressionSteppingTest4 = + let f3 () = + seq { let x = ref 0 + incr x + let y = ref 0 + incr y + yield !x + let z = !x + !y + yield z } + + let _ = f3()|> Seq.length diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl new file mode 100644 index 00000000000..1d760a896ae --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl @@ -0,0 +1,331 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly SeqExpressionSteppingTest4 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SeqExpressionSteppingTest4 +{ + // Offset: 0x00000000 Length: 0x00000263 +} +.mresource public FSharpOptimizationData.SeqExpressionSteppingTest4 +{ + // Offset: 0x00000268 Length: 0x000000AD +} +.module SeqExpressionSteppingTest4.exe +// MVID: {61FD4A6D-2432-93E0-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x069C0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SeqExpressionSteppingTest4 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public SeqExpressionSteppingTest4 + extends [mscorlib]System.Object + { + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname f3@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y + .field public int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, + int32 pc, + int32 current) cil managed + { + // Code size 36 (0x24) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc + IL_0015: ldarg.0 + IL_0016: ldarg.s current + IL_0018: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current + IL_001d: ldarg.0 + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret + } // end of method f3@5::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 184 (0xb8) + .maxstack 6 + .locals init ([0] int32 z) + .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\\SeqExpressionStepping\\SeqExpressionSteppingTest4.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0072 + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_009a + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br IL_00af + + .line 100001,100001 : 0,0 '' + IL_0027: nop + .line 5,5 : 15,28 '' + IL_0028: ldarg.0 + IL_0029: ldc.i4.0 + IL_002a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_002f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x + .line 6,6 : 15,21 '' + IL_0034: ldarg.0 + IL_0035: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x + IL_003a: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_003f: nop + .line 7,7 : 15,28 '' + IL_0040: ldarg.0 + IL_0041: ldc.i4.0 + IL_0042: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0047: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y + .line 8,8 : 15,21 '' + IL_004c: ldarg.0 + 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 + 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) + IL_006b: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current + IL_0070: ldc.i4.1 + IL_0071: ret + + .line 10,10 : 15,30 '' + IL_0072: ldarg.0 + IL_0073: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x + IL_0078: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_007d: ldarg.0 + IL_007e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y + 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 + IL_0092: ldloc.0 + IL_0093: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current + IL_0098: ldc.i4.1 + IL_0099: ret + + IL_009a: ldarg.0 + IL_009b: ldnull + IL_009c: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y + IL_00a1: ldarg.0 + IL_00a2: ldnull + IL_00a3: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x + IL_00a8: ldarg.0 + IL_00a9: ldc.i4.3 + IL_00aa: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc + IL_00af: ldarg.0 + IL_00b0: ldc.i4.0 + IL_00b1: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current + IL_00b6: ldc.i4.0 + IL_00b7: ret + } // end of method f3@5::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc + IL_0007: ret + } // end of method f3@5::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method f3@5::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current + IL_0006: ret + } // end of method f3@5::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 10 (0xa) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + int32) + IL_0009: ret + } // end of method f3@5::GetFreshEnumerator + + } // end of class f3@5 + + .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 + f3() cil managed + { + // Code size 10 (0xa) + .maxstack 8 + .line 5,11 : 9,24 '' + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + int32) + IL_0009: ret + } // end of method SeqExpressionSteppingTest4::f3 + + } // end of class SeqExpressionSteppingTest4 + +} // end of class SeqExpressionSteppingTest4 + +.class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest4 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 14 (0xe) + .maxstack 3 + .locals init ([0] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 13') + .line 13,13 : 13,17 '' + IL_0000: call class [mscorlib]System.Collections.Generic.IEnumerable`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4::f3() + IL_0005: stloc.0 + .line 13,13 : 20,30 '' + IL_0006: ldloc.0 + IL_0007: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000c: pop + IL_000d: ret + } // end of method $SeqExpressionSteppingTest4::main@ + +} // end of class ''.$SeqExpressionSteppingTest4 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.fs new file mode 100644 index 00000000000..6c046982911 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.fs @@ -0,0 +1,16 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Sequences +module SeqExpressionSteppingTest5 // Regression test for FSHARP1.0:4058 +module SeqExpressionSteppingTest5 = + let f4 () = + seq { let x = ref 0 + try + let y = ref 0 + incr y + yield !x + let z = !x + !y + yield z + finally + incr x + printfn "done" } + + let _ = f4()|> Seq.length diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl new file mode 100644 index 00000000000..d8d9b87bf50 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl @@ -0,0 +1,460 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly SeqExpressionSteppingTest5 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SeqExpressionSteppingTest5 +{ + // Offset: 0x00000000 Length: 0x00000263 +} +.mresource public FSharpOptimizationData.SeqExpressionSteppingTest5 +{ + // Offset: 0x00000268 Length: 0x000000AD +} +.module SeqExpressionSteppingTest5.exe +// MVID: {61FD4A6D-2432-9401-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06FD0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SeqExpressionSteppingTest5 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public SeqExpressionSteppingTest5 + extends [mscorlib]System.Object + { + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname f4@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y + .field public int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, + int32 pc, + int32 current) cil managed + { + // Code size 36 (0x24) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0015: ldarg.0 + IL_0016: ldarg.s current + IL_0018: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current + IL_001d: ldarg.0 + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret + } // end of method f4@5::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 224 (0xe0) + .maxstack 6 + .locals init ([0] int32 z) + .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\\SeqExpressionStepping\\SeqExpressionSteppingTest5.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001f, + IL_0025, + IL_0028, + IL_002b) + IL_001d: br.s IL_0031 + + .line 100001,100001 : 0,0 '' + IL_001f: nop + IL_0020: br IL_00a6 + + .line 100001,100001 : 0,0 '' + IL_0025: nop + IL_0026: br.s IL_0077 + + .line 100001,100001 : 0,0 '' + IL_0028: nop + IL_0029: br.s IL_009f + + .line 100001,100001 : 0,0 '' + IL_002b: nop + IL_002c: br IL_00d7 + + .line 100001,100001 : 0,0 '' + IL_0031: nop + .line 5,5 : 15,28 '' + IL_0032: ldarg.0 + 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 + .line 7,7 : 19,32 '' + IL_0045: ldarg.0 + IL_0046: ldc.i4.0 + IL_0047: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_004c: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y + .line 8,8 : 19,25 '' + IL_0051: ldarg.0 + 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 + 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) + IL_0070: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current + IL_0075: ldc.i4.1 + IL_0076: ret + + .line 10,10 : 19,34 '' + IL_0077: ldarg.0 + IL_0078: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x + IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0082: ldarg.0 + IL_0083: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y + 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 + IL_0097: ldloc.0 + IL_0098: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current + IL_009d: ldc.i4.1 + IL_009e: ret + + IL_009f: ldarg.0 + IL_00a0: ldnull + IL_00a1: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y + IL_00a6: ldarg.0 + IL_00a7: ldc.i4.4 + IL_00a8: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + .line 13,13 : 18,24 '' + IL_00ad: ldarg.0 + IL_00ae: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x + IL_00b3: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_00b8: nop + .line 14,14 : 18,32 '' + IL_00b9: ldstr "done" + IL_00be: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00c3: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00c8: pop + IL_00c9: ldarg.0 + IL_00ca: ldnull + IL_00cb: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x + IL_00d0: ldarg.0 + IL_00d1: ldc.i4.4 + IL_00d2: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_00d7: ldarg.0 + IL_00d8: ldc.i4.0 + IL_00d9: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current + IL_00de: ldc.i4.0 + IL_00df: ret + } // end of method f4@5::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 156 (0x9c) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0006: ldc.i4.4 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br IL_0093 + + .line 100001,100001 : 0,0 '' + IL_0019: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_001a: ldarg.0 + IL_001b: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0020: switch ( + IL_003b, + IL_003e, + IL_0041, + IL_0044, + IL_0047) + IL_0039: br.s IL_004a + + .line 100001,100001 : 0,0 '' + IL_003b: nop + IL_003c: br.s IL_0073 + + .line 100001,100001 : 0,0 '' + IL_003e: nop + IL_003f: br.s IL_004f + + .line 100001,100001 : 0,0 '' + IL_0041: nop + IL_0042: br.s IL_004e + + .line 100001,100001 : 0,0 '' + IL_0044: nop + IL_0045: br.s IL_004b + + .line 100001,100001 : 0,0 '' + IL_0047: nop + IL_0048: br.s IL_0073 + + .line 100001,100001 : 0,0 '' + IL_004a: nop + .line 100001,100001 : 0,0 '' + IL_004b: nop + IL_004c: br.s IL_004f + + .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 + .line 13,13 : 18,24 '' + IL_0056: ldarg.0 + IL_0057: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x + IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0061: nop + .line 14,14 : 18,32 '' + IL_0062: ldstr "done" + IL_0067: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_006c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0071: pop + .line 100001,100001 : 0,0 '' + IL_0072: nop + IL_0073: ldarg.0 + IL_0074: ldc.i4.4 + IL_0075: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_007a: ldarg.0 + IL_007b: ldc.i4.0 + IL_007c: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current + IL_0081: leave.s IL_008d + + } // end .try + catch [mscorlib]System.Object + { + IL_0083: castclass [mscorlib]System.Exception + IL_0088: stloc.1 + IL_0089: ldloc.1 + IL_008a: stloc.0 + IL_008b: leave.s IL_008d + + .line 100001,100001 : 0,0 '' + } // end handler + IL_008d: nop + IL_008e: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_0093: ldloc.0 + IL_0094: ldnull + IL_0095: cgt.un + IL_0097: brfalse.s IL_009b + + .line 100001,100001 : 0,0 '' + IL_0099: ldloc.0 + IL_009a: throw + + .line 100001,100001 : 0,0 '' + IL_009b: ret + } // end of method f4@5::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 57 (0x39) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0006: switch ( + IL_0021, + IL_0024, + IL_0027, + IL_002a, + IL_002d) + IL_001f: br.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_0037 + + .line 100001,100001 : 0,0 '' + IL_0024: nop + IL_0025: br.s IL_0035 + + .line 100001,100001 : 0,0 '' + IL_0027: nop + IL_0028: br.s IL_0033 + + .line 100001,100001 : 0,0 '' + IL_002a: nop + IL_002b: br.s IL_0031 + + .line 100001,100001 : 0,0 '' + IL_002d: nop + IL_002e: br.s IL_0037 + + .line 100001,100001 : 0,0 '' + IL_0030: nop + IL_0031: ldc.i4.1 + IL_0032: ret + + IL_0033: ldc.i4.1 + IL_0034: ret + + IL_0035: ldc.i4.1 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret + } // end of method f4@5::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current + IL_0006: ret + } // end of method f4@5::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 10 (0xa) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + int32) + IL_0009: ret + } // end of method f4@5::GetFreshEnumerator + + } // end of class f4@5 + + .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 + f4() cil managed + { + // Code size 10 (0xa) + .maxstack 8 + .line 5,14 : 9,34 '' + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + int32) + IL_0009: ret + } // end of method SeqExpressionSteppingTest5::f4 + + } // end of class SeqExpressionSteppingTest5 + +} // end of class SeqExpressionSteppingTest5 + +.class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest5 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 14 (0xe) + .maxstack 3 + .locals init ([0] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 16') + .line 16,16 : 13,17 '' + IL_0000: call class [mscorlib]System.Collections.Generic.IEnumerable`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5::f4() + IL_0005: stloc.0 + .line 16,16 : 20,30 '' + IL_0006: ldloc.0 + IL_0007: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000c: pop + IL_000d: ret + } // end of method $SeqExpressionSteppingTest5::main@ + +} // end of class ''.$SeqExpressionSteppingTest5 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.fs new file mode 100644 index 00000000000..225694e0359 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.fs @@ -0,0 +1,15 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Sequences +module SeqExpressionSteppingTest6 // Regression test for FSHARP1.0:4058 +module SeqExpressionSteppingTest6 = + let es = [1;2;3] + let f7 () = + seq { for x in es do + printfn "hello" + yield x + for x in es do + printfn "goodbye" + yield x } + + let _ = f7() |> Seq.length + + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl new file mode 100644 index 00000000000..619f85c4a5c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl @@ -0,0 +1,546 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly SeqExpressionSteppingTest6 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SeqExpressionSteppingTest6 +{ + // Offset: 0x00000000 Length: 0x00000298 +} +.mresource public FSharpOptimizationData.SeqExpressionSteppingTest6 +{ + // Offset: 0x000002A0 Length: 0x000000BA +} +.module SeqExpressionSteppingTest6.exe +// MVID: {61FD4A6D-2432-94A2-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06F10000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SeqExpressionSteppingTest6 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public SeqExpressionSteppingTest6 + extends [mscorlib]System.Object + { + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname f7@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' + .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 enum0 + .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 int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + class [mscorlib]System.Collections.Generic.IEnumerator`1 enum0, + int32 pc, + int32 current) cil managed + { + // Code size 36 (0x24) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0015: ldarg.0 + IL_0016: ldarg.s current + IL_0018: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_001d: ldarg.0 + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret + } // end of method f7@6::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 294 (0x126) + .maxstack 6 + .locals init ([0] int32 x, + [1] int32 V_1) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SeqExpressionStepping\\SeqExpressionSteppingTest6.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_0023, + IL_0026, + IL_0029, + IL_002f, + IL_0035) + IL_0021: br.s IL_003b + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_008f + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_008c + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: br IL_00fc + + .line 100001,100001 : 0,0 '' + IL_002f: nop + IL_0030: br IL_00f9 + + .line 100001,100001 : 0,0 '' + IL_0035: nop + IL_0036: br IL_011d + + .line 100001,100001 : 0,0 '' + IL_003b: nop + .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,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() + IL_005e: brfalse.s IL_008f + + IL_0060: ldarg.0 + IL_0061: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0066: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_006b: stloc.0 + .line 7,7 : 18,33 '' + IL_006c: ldstr "hello" + 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 + IL_0084: ldloc.0 + IL_0085: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_008a: ldc.i4.1 + IL_008b: ret + + .line 100001,100001 : 0,0 '' + IL_008c: nop + IL_008d: br.s IL_0053 + + IL_008f: ldarg.0 + IL_0090: ldc.i4.5 + IL_0091: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + 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 + IL_00a2: ldarg.0 + IL_00a3: ldnull + IL_00a4: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + .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,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() + IL_00cb: brfalse.s IL_00fc + + IL_00cd: ldarg.0 + IL_00ce: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00d3: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_00d8: stloc.1 + .line 10,10 : 18,35 '' + IL_00d9: ldstr "goodbye" + 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 + IL_00f1: ldloc.1 + IL_00f2: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_00f7: ldc.i4.1 + IL_00f8: ret + + .line 100001,100001 : 0,0 '' + IL_00f9: nop + IL_00fa: br.s IL_00c0 + + IL_00fc: ldarg.0 + IL_00fd: ldc.i4.5 + IL_00fe: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + 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 + IL_010f: ldarg.0 + IL_0110: ldnull + IL_0111: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0116: ldarg.0 + IL_0117: ldc.i4.5 + IL_0118: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_011d: ldarg.0 + IL_011e: ldc.i4.0 + IL_011f: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0124: ldc.i4.0 + IL_0125: ret + } // end of method f7@6::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 167 (0xa7) + .maxstack 6 + .locals init ([0] class [mscorlib]System.Exception V_0, + [1] class [mscorlib]System.Exception e) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0006: ldc.i4.5 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 + + .line 100001,100001 : 0,0 '' + IL_0013: nop + IL_0014: br IL_009e + + .line 100001,100001 : 0,0 '' + IL_0019: nop + .line 100001,100001 : 0,0 '' + .try + { + IL_001a: ldarg.0 + IL_001b: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0020: switch ( + IL_003f, + IL_0042, + IL_0045, + IL_0048, + IL_004b, + IL_004e) + IL_003d: br.s IL_0051 + + .line 100001,100001 : 0,0 '' + IL_003f: nop + IL_0040: br.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_0042: nop + IL_0043: br.s IL_006a + + .line 100001,100001 : 0,0 '' + IL_0045: nop + IL_0046: br.s IL_0069 + + .line 100001,100001 : 0,0 '' + IL_0048: nop + IL_0049: br.s IL_0053 + + .line 100001,100001 : 0,0 '' + IL_004b: nop + IL_004c: br.s IL_0052 + + .line 100001,100001 : 0,0 '' + IL_004e: nop + IL_004f: br.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_0051: nop + .line 100001,100001 : 0,0 '' + IL_0052: nop + IL_0053: ldarg.0 + IL_0054: ldc.i4.5 + IL_0055: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_005a: ldarg.0 + IL_005b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0060: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0065: nop + .line 100001,100001 : 0,0 '' + IL_0066: nop + IL_0067: br.s IL_007e + + .line 100001,100001 : 0,0 '' + IL_0069: nop + IL_006a: ldarg.0 + IL_006b: ldc.i4.5 + IL_006c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0071: ldarg.0 + IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007c: nop + .line 100001,100001 : 0,0 '' + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldc.i4.5 + IL_0080: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0085: ldarg.0 + IL_0086: ldc.i4.0 + IL_0087: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_008c: leave.s IL_0098 + + } // end .try + catch [mscorlib]System.Object + { + IL_008e: castclass [mscorlib]System.Exception + IL_0093: stloc.1 + IL_0094: ldloc.1 + IL_0095: stloc.0 + IL_0096: leave.s IL_0098 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0098: nop + IL_0099: br IL_0000 + + .line 100001,100001 : 0,0 '' + IL_009e: ldloc.0 + IL_009f: ldnull + IL_00a0: cgt.un + IL_00a2: brfalse.s IL_00a6 + + .line 100001,100001 : 0,0 '' + IL_00a4: ldloc.0 + IL_00a5: throw + + .line 100001,100001 : 0,0 '' + IL_00a6: ret + } // end of method f7@6::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 66 (0x42) + .maxstack 5 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0006: switch ( + IL_0025, + IL_0028, + IL_002b, + IL_002e, + IL_0031, + IL_0034) + IL_0023: br.s IL_0037 + + .line 100001,100001 : 0,0 '' + IL_0025: nop + IL_0026: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0028: nop + IL_0029: br.s IL_003e + + .line 100001,100001 : 0,0 '' + IL_002b: nop + IL_002c: br.s IL_003c + + .line 100001,100001 : 0,0 '' + IL_002e: nop + IL_002f: br.s IL_003a + + .line 100001,100001 : 0,0 '' + IL_0031: nop + IL_0032: br.s IL_0038 + + .line 100001,100001 : 0,0 '' + IL_0034: nop + IL_0035: br.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: ldc.i4.1 + IL_0039: ret + + IL_003a: ldc.i4.1 + IL_003b: ret + + IL_003c: ldc.i4.1 + IL_003d: ret + + IL_003e: ldc.i4.1 + IL_003f: ret + + IL_0040: ldc.i4.0 + IL_0041: ret + } // end of method f7@6::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0006: ret + } // end of method f7@6::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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 10 (0xa) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0009: ret + } // end of method f7@6::GetFreshEnumerator + + } // 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 ''.$SeqExpressionSteppingTest6::es@4 + IL_0005: ret + } // end of method SeqExpressionSteppingTest6::get_es + + .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 + f7() cil managed + { + // Code size 10 (0xa) + .maxstack 8 + .line 6,11 : 9,27 '' + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0009: ret + } // end of method SeqExpressionSteppingTest6::f7 + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + es() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + } // end of property SeqExpressionSteppingTest6::es + } // end of class SeqExpressionSteppingTest6 + +} // end of class SeqExpressionSteppingTest6 + +.class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest6 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es@4 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 44 (0x2c) + .maxstack 6 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es, + [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 'Pipe #1 input at line 13') + .line 4,4 : 5,21 '' + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: ldc.i4.3 + 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_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_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: dup + IL_0018: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$SeqExpressionSteppingTest6::es@4 + IL_001d: stloc.0 + .line 13,13 : 13,17 '' + IL_001e: call class [mscorlib]System.Collections.Generic.IEnumerable`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::f7() + IL_0023: stloc.1 + .line 13,13 : 21,31 '' + IL_0024: ldloc.1 + IL_0025: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_002a: pop + IL_002b: ret + } // end of method $SeqExpressionSteppingTest6::main@ + +} // end of class ''.$SeqExpressionSteppingTest6 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.fs new file mode 100644 index 00000000000..6eed0b6dd45 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.fs @@ -0,0 +1,75 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Sequences +module SeqExpressionSteppingTest7 // Regression test for FSHARP1.0:4454 +// "Stepping into sequence expression pops up a dialog trying to located an unknown file" +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/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl new file mode 100644 index 00000000000..fb5d62e1ea4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl @@ -0,0 +1,931 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly SeqExpressionSteppingTest7 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SeqExpressionSteppingTest7 +{ + // Offset: 0x00000000 Length: 0x0000084F +} +.mresource public FSharpOptimizationData.SeqExpressionSteppingTest7 +{ + // Offset: 0x00000858 Length: 0x000003BA +} +.module SeqExpressionSteppingTest7.exe +// MVID: {61FD4A6D-2432-93C3-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07240000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SeqExpressionSteppingTest7 + extends [mscorlib]System.Object +{ + .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 specialname static class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 + get_r() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ''.$SeqExpressionSteppingTest7::r@4 + IL_0005: ret + } // end of method SeqExpressionSteppingTest7::get_r + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f() cil managed + { + // Code size 60 (0x3c) + .maxstack 5 + .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + [1] string V_1) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 12,57 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SeqExpressionStepping\\SeqExpressionSteppingTest7.fs' + IL_0000: nop + .line 5,5 : 14,36 '' + IL_0001: nop + .line 5,5 : 18,24 '' + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest7::get_r() + IL_0007: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000c: nop + .line 5,5 : 26,30 '' + IL_000d: ldc.i4.1 + IL_000e: brfalse.s IL_0033 + + .line 5,5 : 37,55 '' + IL_0010: ldstr "" + IL_0015: stloc.1 + IL_0016: ldloca.s V_0 + IL_0018: ldc.i4.0 + IL_0019: brfalse.s IL_0023 + + IL_001b: ldnull + IL_001c: unbox.any class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_0021: br.s IL_002a + + IL_0023: ldloc.1 + IL_0024: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_0029: throw + + IL_002a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::AddMany(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_002f: nop + .line 100001,100001 : 0,0 '' + IL_0030: nop + IL_0031: br.s IL_0034 + + .line 100001,100001 : 0,0 '' + 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 + .line 75,75 : 13,20 '' + 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 + .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() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest7::get_r() + } // end of property SeqExpressionSteppingTest7::r +} // end of class SeqExpressionSteppingTest7 + +.class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest7 + extends [mscorlib]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 r@4 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 98 (0x62) + .maxstack 4 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 r, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + [3] class [mscorlib]System.Exception V_3, + [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4) + .line 4,4 : 1,14 '' + 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: dup + IL_0007: stsfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ''.$SeqExpressionSteppingTest7::r@4 + IL_000c: stloc.0 + .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) + .line 6,6 : 21,24 '' + IL_001c: stloc.1 + .line 6,6 : 25,29 '' + .try + { + IL_001d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest7::f() + IL_0022: stloc.2 + IL_0023: leave.s IL_0059 + + .line 6,6 : 30,34 '' + } // end .try + catch [mscorlib]System.Object + { + IL_0025: castclass [mscorlib]System.Exception + IL_002a: stloc.3 + IL_002b: ldloc.3 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [mscorlib]System.Exception) + IL_0031: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0033: ldloc.s V_4 + IL_0035: brfalse.s IL_004e + + .line 6,6 : 48,52 '' + IL_0037: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest7::get_r() + IL_003c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0041: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0046: 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_004b: stloc.2 + IL_004c: leave.s IL_0059 + + .line 100001,100001 : 0,0 '' + IL_004e: rethrow + IL_0050: ldnull + IL_0051: unbox.any class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + IL_0056: stloc.2 + IL_0057: leave.s IL_0059 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0059: ldloc.1 + IL_005a: ldloc.2 + IL_005b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0060: pop + IL_0061: ret + } // end of method $SeqExpressionSteppingTest7::main@ + +} // end of class ''.$SeqExpressionSteppingTest7 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/env.lst new file mode 100644 index 00000000000..4ccb9a9d07e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/env.lst @@ -0,0 +1,7 @@ +Retry SOURCE=SeqExpressionSteppingTest1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest1.exe" # SeqExpressionSteppingTest1.fs - + SOURCE=SeqExpressionSteppingTest2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest2.exe" # SeqExpressionSteppingTest2.fs - + SOURCE=SeqExpressionSteppingTest3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest3.exe" # SeqExpressionSteppingTest3.fs - + SOURCE=SeqExpressionSteppingTest4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest4.exe" # SeqExpressionSteppingTest4.fs - + SOURCE=SeqExpressionSteppingTest5.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest5.exe" # SeqExpressionSteppingTest5.fs - + SOURCE=SeqExpressionSteppingTest6.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest6.exe" # SeqExpressionSteppingTest6.fs - + SOURCE=SeqExpressionSteppingTest7.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest7.exe" # SeqExpressionSteppingTest7.fs - diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/keep.lst similarity index 100% rename from tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/keep.lst rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionStepping/keep.lst diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs new file mode 100644 index 00000000000..152eeca7d84 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs @@ -0,0 +1,4 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Sequences #TailCalls +module SeqExpressionTailCalls01 // Regression test for FSHARP1.0:4135 +let rec rwalk x = seq { yield x; yield! rwalk (x+1) } + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl new file mode 100644 index 00000000000..15530e6ca76 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl @@ -0,0 +1,272 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly SeqExpressionTailCalls01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SeqExpressionTailCalls01 +{ + // Offset: 0x00000000 Length: 0x00000219 +} +.mresource public FSharpOptimizationData.SeqExpressionTailCalls01 +{ + // Offset: 0x00000220 Length: 0x0000008C +} +.module SeqExpressionTailCalls01.exe +// MVID: {61FD4A6D-093A-A6BE-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05DB0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SeqExpressionTailCalls01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname rwalk@3 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public int32 x + .field public int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(int32 x, + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 SeqExpressionTailCalls01/rwalk@3::x + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 SeqExpressionTailCalls01/rwalk@3::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 SeqExpressionTailCalls01/rwalk@3::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method rwalk@3::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 102 (0x66) + .maxstack 7 + .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\\SeqExpressionTailCalls\\SeqExpressionTailCalls01.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionTailCalls01/rwalk@3::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_003a + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_005d + + .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 + 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 : 34,52 '' + IL_003a: ldarg.0 + IL_003b: ldc.i4.2 + IL_003c: stfld int32 SeqExpressionTailCalls01/rwalk@3::pc + IL_0041: ldarg.1 + IL_0042: ldarg.0 + IL_0043: ldfld int32 SeqExpressionTailCalls01/rwalk@3::x + IL_0048: ldc.i4.1 + IL_0049: add + IL_004a: call class [mscorlib]System.Collections.Generic.IEnumerable`1 SeqExpressionTailCalls01::rwalk(int32) + IL_004f: stobj class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_0054: ldc.i4.2 + IL_0055: ret + + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 SeqExpressionTailCalls01/rwalk@3::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 SeqExpressionTailCalls01/rwalk@3::current + IL_0064: ldc.i4.0 + IL_0065: ret + } // end of method rwalk@3::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 SeqExpressionTailCalls01/rwalk@3::pc + IL_0007: ret + } // end of method rwalk@3::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionTailCalls01/rwalk@3::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method rwalk@3::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionTailCalls01/rwalk@3::current + IL_0006: ret + } // end of method rwalk@3::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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: ldfld int32 SeqExpressionTailCalls01/rwalk@3::x + IL_0006: ldc.i4.0 + IL_0007: ldc.i4.0 + IL_0008: newobj instance void SeqExpressionTailCalls01/rwalk@3::.ctor(int32, + int32, + int32) + IL_000d: ret + } // end of method rwalk@3::GetFreshEnumerator + + } // end of class rwalk@3 + + .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 + rwalk(int32 x) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 3,3 : 19,54 '' + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void SeqExpressionTailCalls01/rwalk@3::.ctor(int32, + int32, + int32) + IL_0008: ret + } // end of method SeqExpressionTailCalls01::rwalk + +} // end of class SeqExpressionTailCalls01 + +.class private abstract auto ansi sealed ''.$SeqExpressionTailCalls01 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $SeqExpressionTailCalls01::main@ + +} // end of class ''.$SeqExpressionTailCalls01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs new file mode 100644 index 00000000000..0bac3ea71d1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs @@ -0,0 +1,6 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL #Sequences #TailCalls +// Regression test for FSHARP1.0:4135 +// Same as SeqExpressionTailCalls01.fs, but with MUTUALLY RECURSIVE PAIR OF SEQUENCES +module SeqExpressionTailCalls02 +let rec rwalk1 x = seq { yield x; yield! rwalk2 (x+1) } + and rwalk2 x = seq { yield x; yield! rwalk1 (x+1) } diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl new file mode 100644 index 00000000000..28843dbeeb9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl @@ -0,0 +1,471 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly SeqExpressionTailCalls02 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SeqExpressionTailCalls02 +{ + // Offset: 0x00000000 Length: 0x00000252 +} +.mresource public FSharpOptimizationData.SeqExpressionTailCalls02 +{ + // Offset: 0x00000258 Length: 0x0000009E +} +.module SeqExpressionTailCalls02.exe +// MVID: {61FD4A6D-093A-EC43-A745-03836D4AFD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x052F0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SeqExpressionTailCalls02 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested assembly beforefieldinit specialname rwalk1@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public int32 x + .field public int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(int32 x, + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 SeqExpressionTailCalls02/rwalk1@5::x + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 SeqExpressionTailCalls02/rwalk1@5::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 SeqExpressionTailCalls02/rwalk1@5::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method rwalk1@5::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 102 (0x66) + .maxstack 7 + .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\\SeqExpressionTailCalls\\SeqExpressionTailCalls02.fs' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionTailCalls02/rwalk1@5::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_003a + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_005d + + .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 + 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 : 35,54 '' + IL_003a: ldarg.0 + IL_003b: ldc.i4.2 + IL_003c: stfld int32 SeqExpressionTailCalls02/rwalk1@5::pc + IL_0041: ldarg.1 + IL_0042: ldarg.0 + IL_0043: ldfld int32 SeqExpressionTailCalls02/rwalk1@5::x + IL_0048: ldc.i4.1 + IL_0049: add + IL_004a: call class [mscorlib]System.Collections.Generic.IEnumerable`1 SeqExpressionTailCalls02::rwalk2(int32) + IL_004f: stobj class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_0054: ldc.i4.2 + IL_0055: ret + + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 SeqExpressionTailCalls02/rwalk1@5::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 SeqExpressionTailCalls02/rwalk1@5::current + IL_0064: ldc.i4.0 + IL_0065: ret + } // end of method rwalk1@5::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 SeqExpressionTailCalls02/rwalk1@5::pc + IL_0007: ret + } // end of method rwalk1@5::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionTailCalls02/rwalk1@5::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method rwalk1@5::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionTailCalls02/rwalk1@5::current + IL_0006: ret + } // end of method rwalk1@5::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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: ldfld int32 SeqExpressionTailCalls02/rwalk1@5::x + IL_0006: ldc.i4.0 + IL_0007: ldc.i4.0 + IL_0008: newobj instance void SeqExpressionTailCalls02/rwalk1@5::.ctor(int32, + int32, + int32) + IL_000d: ret + } // end of method rwalk1@5::GetFreshEnumerator + + } // end of class rwalk1@5 + + .class auto autochar serializable sealed nested assembly beforefieldinit specialname rwalk2@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) + .field public int32 x + .field public int32 pc + .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 int32 current + .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 public specialname rtspecialname + instance void .ctor(int32 x, + int32 pc, + int32 current) cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 SeqExpressionTailCalls02/rwalk2@6::x + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 SeqExpressionTailCalls02/rwalk2@6::pc + IL_000e: ldarg.0 + IL_000f: ldarg.3 + IL_0010: stfld int32 SeqExpressionTailCalls02/rwalk2@6::current + IL_0015: ldarg.0 + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret + } // end of method rwalk2@6::.ctor + + .method public strict virtual instance int32 + GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed + { + // Code size 102 (0x66) + .maxstack 7 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionTailCalls02/rwalk2@6::pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch ( + IL_001b, + IL_001e, + IL_0021) + IL_0019: br.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_003a + + .line 100001,100001 : 0,0 '' + IL_001e: nop + IL_001f: br.s IL_0056 + + .line 100001,100001 : 0,0 '' + IL_0021: nop + IL_0022: br.s IL_005d + + .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 + 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 : 35,54 '' + IL_003a: ldarg.0 + IL_003b: ldc.i4.2 + IL_003c: stfld int32 SeqExpressionTailCalls02/rwalk2@6::pc + IL_0041: ldarg.1 + IL_0042: ldarg.0 + IL_0043: ldfld int32 SeqExpressionTailCalls02/rwalk2@6::x + IL_0048: ldc.i4.1 + IL_0049: add + IL_004a: call class [mscorlib]System.Collections.Generic.IEnumerable`1 SeqExpressionTailCalls02::rwalk1(int32) + IL_004f: stobj class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_0054: ldc.i4.2 + IL_0055: ret + + IL_0056: ldarg.0 + IL_0057: ldc.i4.3 + IL_0058: stfld int32 SeqExpressionTailCalls02/rwalk2@6::pc + IL_005d: ldarg.0 + IL_005e: ldc.i4.0 + IL_005f: stfld int32 SeqExpressionTailCalls02/rwalk2@6::current + IL_0064: ldc.i4.0 + IL_0065: ret + } // end of method rwalk2@6::GenerateNext + + .method public strict virtual instance void + Close() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 SeqExpressionTailCalls02/rwalk2@6::pc + IL_0007: ret + } // end of method rwalk2@6::Close + + .method public strict virtual instance bool + get_CheckClose() cil managed + { + // Code size 48 (0x30) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionTailCalls02/rwalk2@6::pc + IL_0006: switch ( + IL_001d, + IL_0020, + IL_0023, + IL_0026) + IL_001b: br.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001d: nop + IL_001e: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: br.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0026: nop + IL_0027: br.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method rwalk2@6::get_CheckClose + + .method public strict virtual instance int32 + get_LastGenerated() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionTailCalls02/rwalk2@6::current + IL_0006: ret + } // end of method rwalk2@6::get_LastGenerated + + .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 + GetFreshEnumerator() 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: ldfld int32 SeqExpressionTailCalls02/rwalk2@6::x + IL_0006: ldc.i4.0 + IL_0007: ldc.i4.0 + IL_0008: newobj instance void SeqExpressionTailCalls02/rwalk2@6::.ctor(int32, + int32, + int32) + IL_000d: ret + } // end of method rwalk2@6::GetFreshEnumerator + + } // end of class rwalk2@6 + + .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 + rwalk1(int32 x) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 5,5 : 20,56 '' + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void SeqExpressionTailCalls02/rwalk1@5::.ctor(int32, + int32, + int32) + IL_0008: ret + } // end of method SeqExpressionTailCalls02::rwalk1 + + .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 + rwalk2(int32 x) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .line 6,6 : 20,56 '' + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj instance void SeqExpressionTailCalls02/rwalk2@6::.ctor(int32, + int32, + int32) + IL_0008: ret + } // end of method SeqExpressionTailCalls02::rwalk2 + +} // end of class SeqExpressionTailCalls02 + +.class private abstract auto ansi sealed ''.$SeqExpressionTailCalls02 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $SeqExpressionTailCalls02::main@ + +} // end of class ''.$SeqExpressionTailCalls02 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/env.lst new file mode 100644 index 00000000000..68f45ef0d50 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/env.lst @@ -0,0 +1,2 @@ + SOURCE=SeqExpressionTailCalls01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionTailCalls01.exe" # SeqExpressionTailCalls01.fs - + SOURCE=SeqExpressionTailCalls02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionTailCalls02.exe" # SeqExpressionTailCalls02.fs - diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/keep.lst new file mode 100644 index 00000000000..f59ec20aabf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SeqExpressionTailCalls/keep.lst @@ -0,0 +1 @@ +* \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelModule.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelModule.fs new file mode 100644 index 00000000000..2be0deda8ea --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelModule.fs @@ -0,0 +1,22 @@ +// Regression test for DevDiv:327356 +// top-level module + +module ABC + (* type *) + type Expr = Num of int + exception MyExn of int + type A(x:string) = member __.X = x + + (* value *) + let add x y = x + y + let greeting = "hello" + + module ABC = + (* type *) + type Expr = Num of int + exception MyExn of int + type A(x:string) = member __.X = x + + (* value *) + let add x y = x + y + let greeting = "hello" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl new file mode 100644 index 00000000000..0e3f3afaa40 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl @@ -0,0 +1,1683 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TopLevelModule +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TopLevelModule +{ + // Offset: 0x00000000 Length: 0x0000113D +} +.mresource public FSharpOptimizationData.TopLevelModule +{ + // Offset: 0x00001148 Length: 0x000003FD +} +.module TopLevelModule.dll +// MVID: {61F2D6CA-37F5-C118-A745-0383CAD6F261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07430000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ABC + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested public beforefieldinit Expr + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly int32 item + .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 public static class ABC/Expr + NewNum(int32 item) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void ABC/Expr::.ctor(int32) + IL_0006: ret + } // end of method Expr::NewNum + + .method assembly specialname rtspecialname + instance void .ctor(int32 item) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 ABC/Expr::item + IL_000d: ret + } // end of method Expr::.ctor + + .method public hidebysig instance int32 + get_Item() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/Expr::item + IL_0006: ret + } // end of method Expr::get_Item + + .method public hidebysig instance int32 + get_Tag() 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 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } // end of method Expr::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Expr::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Expr::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class ABC/Expr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 64 (0x40) + .maxstack 4 + .locals init ([0] class ABC/Expr V_0, + [1] class ABC/Expr V_1, + [2] class [mscorlib]System.Collections.IComparer V_2, + [3] int32 V_3, + [4] int32 V_4) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelModule.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0036 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0034 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.2 + IL_0018: ldloc.0 + IL_0019: ldfld int32 ABC/Expr::item + IL_001e: stloc.3 + IL_001f: ldloc.1 + IL_0020: ldfld int32 ABC/Expr::item + IL_0025: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: bge.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_002c: ldc.i4.m1 + IL_002d: ret + + .line 100001,100001 : 0,0 '' + IL_002e: ldloc.3 + IL_002f: ldloc.s V_4 + IL_0031: cgt + IL_0033: ret + + .line 100001,100001 : 0,0 '' + IL_0034: ldc.i4.1 + IL_0035: ret + + .line 100001,100001 : 0,0 '' + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: brfalse.s IL_003e + + .line 100001,100001 : 0,0 '' + IL_003c: ldc.i4.m1 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldc.i4.0 + IL_003f: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any ABC/Expr + IL_0007: callvirt instance int32 ABC/Expr::CompareTo(class ABC/Expr) + IL_000c: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 80 (0x50) + .maxstack 4 + .locals init ([0] class ABC/Expr V_0, + [1] class ABC/Expr V_1, + [2] class ABC/Expr V_2, + [3] class [mscorlib]System.Collections.IComparer V_3, + [4] int32 V_4, + [5] int32 V_5) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any ABC/Expr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.1 + IL_000e: unbox.any ABC/Expr + IL_0013: ldnull + IL_0014: cgt.un + IL_0016: brfalse.s IL_003f + + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 100001,100001 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldarg.2 + IL_001f: stloc.3 + IL_0020: ldloc.1 + IL_0021: ldfld int32 ABC/Expr::item + IL_0026: stloc.s V_4 + IL_0028: ldloc.2 + IL_0029: ldfld int32 ABC/Expr::item + IL_002e: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: bge.s IL_0038 + + .line 100001,100001 : 0,0 '' + IL_0036: ldc.i4.m1 + IL_0037: ret + + .line 100001,100001 : 0,0 '' + IL_0038: ldloc.s V_4 + IL_003a: ldloc.s V_5 + IL_003c: cgt + IL_003e: ret + + .line 100001,100001 : 0,0 '' + IL_003f: ldc.i4.1 + IL_0040: ret + + .line 100001,100001 : 0,0 '' + IL_0041: ldarg.1 + IL_0042: unbox.any ABC/Expr + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: brfalse.s IL_004e + + .line 100001,100001 : 0,0 '' + IL_004c: ldc.i4.m1 + IL_004d: ret + + .line 100001,100001 : 0,0 '' + IL_004e: ldc.i4.0 + IL_004f: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class ABC/Expr V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.0 + IL_0009: pop + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: stloc.1 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: ldc.i4 0x9e3779b9 + IL_0013: ldarg.1 + IL_0014: stloc.2 + IL_0015: ldloc.1 + IL_0016: ldfld int32 ABC/Expr::item + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr + IL_0021: add + IL_0022: add + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret + + .line 100001,100001 : 0,0 '' + IL_0027: ldc.i4.0 + IL_0028: ret + } // end of method Expr::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Expr::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 52 (0x34) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst ABC/Expr + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: stloc.3 + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.2 + IL_001c: ldfld int32 ABC/Expr::item + IL_0021: ldloc.3 + IL_0022: ldfld int32 ABC/Expr::item + IL_0027: ceq + IL_0029: ret + + .line 100001,100001 : 0,0 '' + IL_002a: ldc.i4.0 + IL_002b: ret + + .line 100001,100001 : 0,0 '' + IL_002c: ldarg.1 + IL_002d: ldnull + IL_002e: cgt.un + IL_0030: ldc.i4.0 + IL_0031: ceq + IL_0033: ret + } // end of method Expr::Equals + + .method public hidebysig virtual final + instance bool Equals(class ABC/Expr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 43 (0x2b) + .maxstack 4 + .locals init ([0] class ABC/Expr V_0, + [1] class ABC/Expr V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0023 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0021 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: ldloc.1 + IL_0019: ldfld int32 ABC/Expr::item + IL_001e: ceq + IL_0020: ret + + .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 + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class ABC/Expr V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst ABC/Expr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool ABC/Expr::Equals(class ABC/Expr) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method Expr::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 ABC/Expr::get_Tag() + } // end of property Expr::Tag + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 00 00 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 ) + .get instance int32 ABC/Expr::get_Item() + } // end of property Expr::Item + } // end of class Expr + + .class auto ansi serializable nested public beforefieldinit MyExn + extends [mscorlib]System.Exception + implements [mscorlib]System.Collections.IStructuralEquatable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) + .field assembly int32 Data0@ + .method public specialname rtspecialname + instance void .ctor(int32 data0) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Exception::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 ABC/MyExn::Data0@ + IL_000d: ret + } // end of method MyExn::.ctor + + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Exception::.ctor() + IL_0006: ret + } // end of method MyExn::.ctor + + .method family specialname rtspecialname + instance void .ctor(class [mscorlib]System.Runtime.Serialization.SerializationInfo info, + valuetype [mscorlib]System.Runtime.Serialization.StreamingContext context) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: call instance void [mscorlib]System.Exception::.ctor(class [mscorlib]System.Runtime.Serialization.SerializationInfo, + valuetype [mscorlib]System.Runtime.Serialization.StreamingContext) + IL_0008: ret + } // end of method MyExn::.ctor + + .method public hidebysig specialname + instance int32 get_Data0() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/MyExn::Data0@ + IL_0006: ret + } // end of method MyExn::get_Data0 + + .method public hidebysig virtual 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 40 (0x28) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class [mscorlib]System.Collections.IEqualityComparer V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .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: stloc.0 + IL_0024: ldloc.0 + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldc.i4.0 + IL_0027: ret + } // end of method MyExn::GetHashCode + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method MyExn::GetHashCode + + .method public hidebysig virtual instance bool + Equals(object obj, + 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) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003b + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst [mscorlib]System.Exception + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldloc.0 + IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0018: brtrue.s IL_001c + + IL_001a: br.s IL_0037 + + .line 100001,100001 : 0,0 '' + IL_001c: ldarg.2 + IL_001d: stloc.2 + IL_001e: ldarg.0 + IL_001f: castclass ABC/MyExn + IL_0024: call instance int32 ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass ABC/MyExn + IL_002f: call instance int32 ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret + + .line 100001,100001 : 0,0 '' + IL_0037: ldc.i4.0 + IL_0038: ret + + .line 100001,100001 : 0,0 '' + IL_0039: ldc.i4.0 + IL_003a: ret + + .line 100001,100001 : 0,0 '' + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret + } // end of method MyExn::Equals + + .method public hidebysig instance bool + Equals(class [mscorlib]System.Exception obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 59 (0x3b) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.1 + IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0012: brtrue.s IL_0016 + + IL_0014: br.s IL_002f + + .line 100001,100001 : 0,0 '' + IL_0016: ldarg.0 + IL_0017: castclass ABC/MyExn + IL_001c: call instance int32 ABC/MyExn::get_Data0() + IL_0021: ldarg.1 + IL_0022: castclass ABC/MyExn + IL_0027: call instance int32 ABC/MyExn::get_Data0() + IL_002c: ceq + IL_002e: ret + + .line 100001,100001 : 0,0 '' + IL_002f: ldc.i4.0 + IL_0030: ret + + .line 100001,100001 : 0,0 '' + IL_0031: ldc.i4.0 + IL_0032: ret + + .line 100001,100001 : 0,0 '' + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret + } // end of method MyExn::Equals + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class [mscorlib]System.Exception V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst [mscorlib]System.Exception + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool ABC/MyExn::Equals(class [mscorlib]System.Exception) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method MyExn::Equals + + .property instance int32 Data0() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 ABC/MyExn::get_Data0() + } // end of property MyExn::Data0 + } // end of class MyExn + + .class auto ansi serializable nested public A + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly string x + .method public specialname rtspecialname + instance void .ctor(string x) cil managed + { + // 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 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld string ABC/A::x + IL_000f: ret + } // end of method A::.ctor + + .method public hidebysig specialname + instance string get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 8,8 : 42,43 '' + IL_0000: ldarg.0 + IL_0001: ldfld string ABC/A::x + IL_0006: ret + } // end of method A::get_X + + .property instance string X() + { + .get instance string ABC/A::get_X() + } // end of property A::X + } // end of class A + + .class abstract auto ansi sealed nested public ABC + extends [mscorlib]System.Object + { + .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 ) + .class auto autochar serializable sealed nested public beforefieldinit Expr + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly int32 item + .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 public static class ABC/ABC/Expr + NewNum(int32 item) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void ABC/ABC/Expr::.ctor(int32) + IL_0006: ret + } // end of method Expr::NewNum + + .method assembly specialname rtspecialname + instance void .ctor(int32 item) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 ABC/ABC/Expr::item + IL_000d: ret + } // end of method Expr::.ctor + + .method public hidebysig instance int32 + get_Item() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/ABC/Expr::item + IL_0006: ret + } // end of method Expr::get_Item + + .method public hidebysig instance int32 + get_Tag() 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 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } // end of method Expr::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Expr::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class ABC/ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Expr::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class ABC/ABC/Expr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 64 (0x40) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0036 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0034 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.2 + IL_0018: ldloc.0 + IL_0019: ldfld int32 ABC/ABC/Expr::item + IL_001e: stloc.3 + IL_001f: ldloc.1 + IL_0020: ldfld int32 ABC/ABC/Expr::item + IL_0025: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: bge.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_002c: ldc.i4.m1 + IL_002d: ret + + .line 100001,100001 : 0,0 '' + IL_002e: ldloc.3 + IL_002f: ldloc.s V_4 + IL_0031: cgt + IL_0033: ret + + .line 100001,100001 : 0,0 '' + IL_0034: ldc.i4.1 + IL_0035: ret + + .line 100001,100001 : 0,0 '' + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: brfalse.s IL_003e + + .line 100001,100001 : 0,0 '' + IL_003c: ldc.i4.m1 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldc.i4.0 + IL_003f: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any ABC/ABC/Expr + IL_0007: callvirt instance int32 ABC/ABC/Expr::CompareTo(class ABC/ABC/Expr) + IL_000c: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 80 (0x50) + .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 [mscorlib]System.Collections.IComparer V_3, + [4] int32 V_4, + [5] int32 V_5) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any ABC/ABC/Expr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.1 + IL_000e: unbox.any ABC/ABC/Expr + IL_0013: ldnull + IL_0014: cgt.un + IL_0016: brfalse.s IL_003f + + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 100001,100001 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldarg.2 + IL_001f: stloc.3 + IL_0020: ldloc.1 + IL_0021: ldfld int32 ABC/ABC/Expr::item + IL_0026: stloc.s V_4 + IL_0028: ldloc.2 + IL_0029: ldfld int32 ABC/ABC/Expr::item + IL_002e: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: bge.s IL_0038 + + .line 100001,100001 : 0,0 '' + IL_0036: ldc.i4.m1 + IL_0037: ret + + .line 100001,100001 : 0,0 '' + IL_0038: ldloc.s V_4 + IL_003a: ldloc.s V_5 + IL_003c: cgt + IL_003e: ret + + .line 100001,100001 : 0,0 '' + IL_003f: ldc.i4.1 + IL_0040: ret + + .line 100001,100001 : 0,0 '' + IL_0041: ldarg.1 + IL_0042: unbox.any ABC/ABC/Expr + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: brfalse.s IL_004e + + .line 100001,100001 : 0,0 '' + IL_004c: ldc.i4.m1 + IL_004d: ret + + .line 100001,100001 : 0,0 '' + IL_004e: ldc.i4.0 + IL_004f: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class ABC/ABC/Expr V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.0 + IL_0009: pop + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: stloc.1 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: ldc.i4 0x9e3779b9 + IL_0013: ldarg.1 + IL_0014: stloc.2 + IL_0015: ldloc.1 + IL_0016: ldfld int32 ABC/ABC/Expr::item + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr + IL_0021: add + IL_0022: add + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret + + .line 100001,100001 : 0,0 '' + IL_0027: ldc.i4.0 + IL_0028: ret + } // end of method Expr::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Expr::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 52 (0x34) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst ABC/ABC/Expr + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: stloc.3 + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.2 + IL_001c: ldfld int32 ABC/ABC/Expr::item + IL_0021: ldloc.3 + IL_0022: ldfld int32 ABC/ABC/Expr::item + IL_0027: ceq + IL_0029: ret + + .line 100001,100001 : 0,0 '' + IL_002a: ldc.i4.0 + IL_002b: ret + + .line 100001,100001 : 0,0 '' + IL_002c: ldarg.1 + IL_002d: ldnull + IL_002e: cgt.un + IL_0030: ldc.i4.0 + IL_0031: ceq + IL_0033: ret + } // end of method Expr::Equals + + .method public hidebysig virtual final + instance bool Equals(class ABC/ABC/Expr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 43 (0x2b) + .maxstack 4 + .locals init ([0] class ABC/ABC/Expr V_0, + [1] class ABC/ABC/Expr V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0023 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0021 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: ldloc.1 + IL_0019: ldfld int32 ABC/ABC/Expr::item + IL_001e: ceq + IL_0020: ret + + .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 + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class ABC/ABC/Expr V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst ABC/ABC/Expr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool ABC/ABC/Expr::Equals(class ABC/ABC/Expr) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method Expr::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 ABC/ABC/Expr::get_Tag() + } // end of property Expr::Tag + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 00 00 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 ) + .get instance int32 ABC/ABC/Expr::get_Item() + } // end of property Expr::Item + } // end of class Expr + + .class auto ansi serializable nested public beforefieldinit MyExn + extends [mscorlib]System.Exception + implements [mscorlib]System.Collections.IStructuralEquatable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) + .field assembly int32 Data0@ + .method public specialname rtspecialname + instance void .ctor(int32 data0) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Exception::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 ABC/ABC/MyExn::Data0@ + IL_000d: ret + } // end of method MyExn::.ctor + + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Exception::.ctor() + IL_0006: ret + } // end of method MyExn::.ctor + + .method family specialname rtspecialname + instance void .ctor(class [mscorlib]System.Runtime.Serialization.SerializationInfo info, + valuetype [mscorlib]System.Runtime.Serialization.StreamingContext context) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: call instance void [mscorlib]System.Exception::.ctor(class [mscorlib]System.Runtime.Serialization.SerializationInfo, + valuetype [mscorlib]System.Runtime.Serialization.StreamingContext) + IL_0008: ret + } // end of method MyExn::.ctor + + .method public hidebysig specialname + instance int32 get_Data0() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/ABC/MyExn::Data0@ + IL_0006: ret + } // end of method MyExn::get_Data0 + + .method public hidebysig virtual 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 40 (0x28) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class [mscorlib]System.Collections.IEqualityComparer V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .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: stloc.0 + IL_0024: ldloc.0 + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldc.i4.0 + IL_0027: ret + } // end of method MyExn::GetHashCode + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method MyExn::GetHashCode + + .method public hidebysig virtual instance bool + Equals(object obj, + 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) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003b + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst [mscorlib]System.Exception + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldloc.0 + IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0018: brtrue.s IL_001c + + IL_001a: br.s IL_0037 + + .line 100001,100001 : 0,0 '' + IL_001c: ldarg.2 + IL_001d: stloc.2 + IL_001e: ldarg.0 + IL_001f: castclass ABC/ABC/MyExn + IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass ABC/ABC/MyExn + IL_002f: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret + + .line 100001,100001 : 0,0 '' + IL_0037: ldc.i4.0 + IL_0038: ret + + .line 100001,100001 : 0,0 '' + IL_0039: ldc.i4.0 + IL_003a: ret + + .line 100001,100001 : 0,0 '' + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret + } // end of method MyExn::Equals + + .method public hidebysig instance bool + Equals(class [mscorlib]System.Exception obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 59 (0x3b) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.1 + IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0012: brtrue.s IL_0016 + + IL_0014: br.s IL_002f + + .line 100001,100001 : 0,0 '' + IL_0016: ldarg.0 + IL_0017: castclass ABC/ABC/MyExn + IL_001c: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0021: ldarg.1 + IL_0022: castclass ABC/ABC/MyExn + IL_0027: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_002c: ceq + IL_002e: ret + + .line 100001,100001 : 0,0 '' + IL_002f: ldc.i4.0 + IL_0030: ret + + .line 100001,100001 : 0,0 '' + IL_0031: ldc.i4.0 + IL_0032: ret + + .line 100001,100001 : 0,0 '' + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret + } // end of method MyExn::Equals + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class [mscorlib]System.Exception V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst [mscorlib]System.Exception + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool ABC/ABC/MyExn::Equals(class [mscorlib]System.Exception) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method MyExn::Equals + + .property instance int32 Data0() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 ABC/ABC/MyExn::get_Data0() + } // end of property MyExn::Data0 + } // end of class MyExn + + .class auto ansi serializable nested public A + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly string x + .method public specialname rtspecialname + instance void .ctor(string x) cil managed + { + // 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 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld string ABC/ABC/A::x + IL_000f: ret + } // end of method A::.ctor + + .method public hidebysig specialname + instance string get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 18,18 : 46,47 '' + IL_0000: ldarg.0 + IL_0001: ldfld string ABC/ABC/A::x + IL_0006: ret + } // end of method A::get_X + + .property instance string X() + { + .get instance string ABC/ABC/A::get_X() + } // end of property A::X + } // end of class A + + .method public static int32 'add'(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 4 (0x4) + .maxstack 8 + .line 21,21 : 27,32 '' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: add + IL_0003: ret + } // end of method ABC::'add' + + .method public specialname static string + get_greeting() 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 6 (0x6) + .maxstack 8 + IL_0000: ldstr "hello" + IL_0005: ret + } // end of method ABC::get_greeting + + .property string greeting() + { + .get string ABC/ABC::get_greeting() + } // end of property ABC::greeting + } // end of class ABC + + .method public static int32 'add'(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 4 (0x4) + .maxstack 8 + .line 11,11 : 23,28 '' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: add + IL_0003: ret + } // end of method ABC::'add' + + .method public specialname static string + get_greeting() 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 6 (0x6) + .maxstack 8 + IL_0000: ldstr "hello" + IL_0005: ret + } // end of method ABC::get_greeting + + .property string greeting() + { + .get string ABC::get_greeting() + } // end of property ABC::greeting +} // end of class ABC + +.class private abstract auto ansi sealed ''.$ABC + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 13 (0xd) + .maxstack 3 + .locals init ([0] string greeting, + [1] string V_1) + .line 12,12 : 9,31 '' + IL_0000: call string ABC::get_greeting() + IL_0005: stloc.0 + .line 22,22 : 13,35 '' + IL_0006: call string ABC/ABC::get_greeting() + IL_000b: stloc.1 + IL_000c: ret + } // end of method $ABC::.cctor + +} // end of class ''.$ABC + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelNamespace.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelNamespace.fs new file mode 100644 index 00000000000..17c641d2dbd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelNamespace.fs @@ -0,0 +1,29 @@ +// Regression test for DevDiv:327356 +// top-level namespace + +namespace XYZ + + (* type *) + type Expr = Num of int + exception MyExn of int + type A(x:string) = member __.X = x + + module ABC = + (* type *) + type Expr = Num of int + exception MyExn of int + type A(x:string) = member __.X = x + + (* value *) + let add x y = x + y + let greeting = "hello" + + module ABC = + (* type *) + type Expr = Num of int + exception MyExn of int + type A(x:string) = member __.X = x + + (* value *) + let add x y = x + y + let greeting = "hello" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl new file mode 100644 index 00000000000..f91bd3c72d3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl @@ -0,0 +1,2450 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ToplevelNamespace +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ToplevelNamespace +{ + // Offset: 0x00000000 Length: 0x00001848 +} +.mresource public FSharpOptimizationData.ToplevelNamespace +{ + // Offset: 0x00001850 Length: 0x0000055C +} +.module ToplevelNamespace.dll +// MVID: {61F2D6CC-218B-729A-A745-0383CCD6F261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07080000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto autochar serializable sealed beforefieldinit XYZ.Expr + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable +{ + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly int32 item + .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 public static class XYZ.Expr NewNum(int32 item) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void XYZ.Expr::.ctor(int32) + IL_0006: ret + } // end of method Expr::NewNum + + .method assembly specialname rtspecialname + instance void .ctor(int32 item) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 XYZ.Expr::item + IL_000d: ret + } // end of method Expr::.ctor + + .method public hidebysig instance int32 + get_Item() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.Expr::item + IL_0006: ret + } // end of method Expr::get_Item + + .method public hidebysig instance int32 + get_Tag() 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 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } // end of method Expr::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Expr::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class XYZ.Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Expr::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class XYZ.Expr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 64 (0x40) + .maxstack 4 + .locals init ([0] class XYZ.Expr V_0, + [1] class XYZ.Expr V_1, + [2] class [mscorlib]System.Collections.IComparer V_2, + [3] int32 V_3, + [4] int32 V_4) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelNamespace.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0036 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0034 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.2 + IL_0018: ldloc.0 + IL_0019: ldfld int32 XYZ.Expr::item + IL_001e: stloc.3 + IL_001f: ldloc.1 + IL_0020: ldfld int32 XYZ.Expr::item + IL_0025: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: bge.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_002c: ldc.i4.m1 + IL_002d: ret + + .line 100001,100001 : 0,0 '' + IL_002e: ldloc.3 + IL_002f: ldloc.s V_4 + IL_0031: cgt + IL_0033: ret + + .line 100001,100001 : 0,0 '' + IL_0034: ldc.i4.1 + IL_0035: ret + + .line 100001,100001 : 0,0 '' + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: brfalse.s IL_003e + + .line 100001,100001 : 0,0 '' + IL_003c: ldc.i4.m1 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldc.i4.0 + IL_003f: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any XYZ.Expr + IL_0007: callvirt instance int32 XYZ.Expr::CompareTo(class XYZ.Expr) + IL_000c: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 80 (0x50) + .maxstack 4 + .locals init ([0] class XYZ.Expr V_0, + [1] class XYZ.Expr V_1, + [2] class XYZ.Expr V_2, + [3] class [mscorlib]System.Collections.IComparer V_3, + [4] int32 V_4, + [5] int32 V_5) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any XYZ.Expr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.1 + IL_000e: unbox.any XYZ.Expr + IL_0013: ldnull + IL_0014: cgt.un + IL_0016: brfalse.s IL_003f + + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 100001,100001 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldarg.2 + IL_001f: stloc.3 + IL_0020: ldloc.1 + IL_0021: ldfld int32 XYZ.Expr::item + IL_0026: stloc.s V_4 + IL_0028: ldloc.2 + IL_0029: ldfld int32 XYZ.Expr::item + IL_002e: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: bge.s IL_0038 + + .line 100001,100001 : 0,0 '' + IL_0036: ldc.i4.m1 + IL_0037: ret + + .line 100001,100001 : 0,0 '' + IL_0038: ldloc.s V_4 + IL_003a: ldloc.s V_5 + IL_003c: cgt + IL_003e: ret + + .line 100001,100001 : 0,0 '' + IL_003f: ldc.i4.1 + IL_0040: ret + + .line 100001,100001 : 0,0 '' + IL_0041: ldarg.1 + IL_0042: unbox.any XYZ.Expr + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: brfalse.s IL_004e + + .line 100001,100001 : 0,0 '' + IL_004c: ldc.i4.m1 + IL_004d: ret + + .line 100001,100001 : 0,0 '' + IL_004e: ldc.i4.0 + IL_004f: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class XYZ.Expr V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.0 + IL_0009: pop + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: stloc.1 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: ldc.i4 0x9e3779b9 + IL_0013: ldarg.1 + IL_0014: stloc.2 + IL_0015: ldloc.1 + IL_0016: ldfld int32 XYZ.Expr::item + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr + IL_0021: add + IL_0022: add + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret + + .line 100001,100001 : 0,0 '' + IL_0027: ldc.i4.0 + IL_0028: ret + } // end of method Expr::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Expr::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 52 (0x34) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst XYZ.Expr + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: stloc.3 + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.2 + IL_001c: ldfld int32 XYZ.Expr::item + IL_0021: ldloc.3 + IL_0022: ldfld int32 XYZ.Expr::item + IL_0027: ceq + IL_0029: ret + + .line 100001,100001 : 0,0 '' + IL_002a: ldc.i4.0 + IL_002b: ret + + .line 100001,100001 : 0,0 '' + IL_002c: ldarg.1 + IL_002d: ldnull + IL_002e: cgt.un + IL_0030: ldc.i4.0 + IL_0031: ceq + IL_0033: ret + } // end of method Expr::Equals + + .method public hidebysig virtual final + instance bool Equals(class XYZ.Expr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 43 (0x2b) + .maxstack 4 + .locals init ([0] class XYZ.Expr V_0, + [1] class XYZ.Expr V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0023 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0021 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: ldloc.1 + IL_0019: ldfld int32 XYZ.Expr::item + IL_001e: ceq + IL_0020: ret + + .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 + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class XYZ.Expr V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst XYZ.Expr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool XYZ.Expr::Equals(class XYZ.Expr) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method Expr::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 XYZ.Expr::get_Tag() + } // end of property Expr::Tag + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 00 00 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 ) + .get instance int32 XYZ.Expr::get_Item() + } // end of property Expr::Item +} // end of class XYZ.Expr + +.class public auto ansi serializable beforefieldinit XYZ.MyExn + extends [mscorlib]System.Exception + implements [mscorlib]System.Collections.IStructuralEquatable +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) + .field assembly int32 Data0@ + .method public specialname rtspecialname + instance void .ctor(int32 data0) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Exception::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 XYZ.MyExn::Data0@ + IL_000d: ret + } // end of method MyExn::.ctor + + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Exception::.ctor() + IL_0006: ret + } // end of method MyExn::.ctor + + .method family specialname rtspecialname + instance void .ctor(class [mscorlib]System.Runtime.Serialization.SerializationInfo info, + valuetype [mscorlib]System.Runtime.Serialization.StreamingContext context) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: call instance void [mscorlib]System.Exception::.ctor(class [mscorlib]System.Runtime.Serialization.SerializationInfo, + valuetype [mscorlib]System.Runtime.Serialization.StreamingContext) + IL_0008: ret + } // end of method MyExn::.ctor + + .method public hidebysig specialname instance int32 + get_Data0() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.MyExn::Data0@ + IL_0006: ret + } // end of method MyExn::get_Data0 + + .method public hidebysig virtual 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 40 (0x28) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class [mscorlib]System.Collections.IEqualityComparer V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .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: stloc.0 + IL_0024: ldloc.0 + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldc.i4.0 + IL_0027: ret + } // end of method MyExn::GetHashCode + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method MyExn::GetHashCode + + .method public hidebysig virtual instance bool + Equals(object obj, + 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) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003b + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst [mscorlib]System.Exception + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldloc.0 + IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0018: brtrue.s IL_001c + + IL_001a: br.s IL_0037 + + .line 100001,100001 : 0,0 '' + IL_001c: ldarg.2 + IL_001d: stloc.2 + IL_001e: ldarg.0 + IL_001f: castclass XYZ.MyExn + IL_0024: call instance int32 XYZ.MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass XYZ.MyExn + IL_002f: call instance int32 XYZ.MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret + + .line 100001,100001 : 0,0 '' + IL_0037: ldc.i4.0 + IL_0038: ret + + .line 100001,100001 : 0,0 '' + IL_0039: ldc.i4.0 + IL_003a: ret + + .line 100001,100001 : 0,0 '' + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret + } // end of method MyExn::Equals + + .method public hidebysig instance bool + Equals(class [mscorlib]System.Exception obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 59 (0x3b) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.1 + IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0012: brtrue.s IL_0016 + + IL_0014: br.s IL_002f + + .line 100001,100001 : 0,0 '' + IL_0016: ldarg.0 + IL_0017: castclass XYZ.MyExn + IL_001c: call instance int32 XYZ.MyExn::get_Data0() + IL_0021: ldarg.1 + IL_0022: castclass XYZ.MyExn + IL_0027: call instance int32 XYZ.MyExn::get_Data0() + IL_002c: ceq + IL_002e: ret + + .line 100001,100001 : 0,0 '' + IL_002f: ldc.i4.0 + IL_0030: ret + + .line 100001,100001 : 0,0 '' + IL_0031: ldc.i4.0 + IL_0032: ret + + .line 100001,100001 : 0,0 '' + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret + } // end of method MyExn::Equals + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class [mscorlib]System.Exception V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst [mscorlib]System.Exception + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool XYZ.MyExn::Equals(class [mscorlib]System.Exception) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method MyExn::Equals + + .property instance int32 Data0() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 XYZ.MyExn::get_Data0() + } // end of property MyExn::Data0 +} // end of class XYZ.MyExn + +.class public auto ansi serializable XYZ.A + extends [mscorlib]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly string x + .method public specialname rtspecialname + instance void .ctor(string x) cil managed + { + // 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 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld string XYZ.A::x + IL_000f: ret + } // end of method A::.ctor + + .method public hidebysig specialname instance string + get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 9,9 : 38,39 '' + IL_0000: ldarg.0 + IL_0001: ldfld string XYZ.A::x + IL_0006: ret + } // end of method A::get_X + + .property instance string X() + { + .get instance string XYZ.A::get_X() + } // end of property A::X +} // end of class XYZ.A + +.class public abstract auto ansi sealed XYZ.ABC + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested public beforefieldinit Expr + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly int32 item + .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 public static class XYZ.ABC/Expr + NewNum(int32 item) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void XYZ.ABC/Expr::.ctor(int32) + IL_0006: ret + } // end of method Expr::NewNum + + .method assembly specialname rtspecialname + instance void .ctor(int32 item) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 XYZ.ABC/Expr::item + IL_000d: ret + } // end of method Expr::.ctor + + .method public hidebysig instance int32 + get_Item() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/Expr::item + IL_0006: ret + } // end of method Expr::get_Item + + .method public hidebysig instance int32 + get_Tag() 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 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } // end of method Expr::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Expr::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class XYZ.ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Expr::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class XYZ.ABC/Expr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 64 (0x40) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0036 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0034 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.2 + IL_0018: ldloc.0 + IL_0019: ldfld int32 XYZ.ABC/Expr::item + IL_001e: stloc.3 + IL_001f: ldloc.1 + IL_0020: ldfld int32 XYZ.ABC/Expr::item + IL_0025: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: bge.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_002c: ldc.i4.m1 + IL_002d: ret + + .line 100001,100001 : 0,0 '' + IL_002e: ldloc.3 + IL_002f: ldloc.s V_4 + IL_0031: cgt + IL_0033: ret + + .line 100001,100001 : 0,0 '' + IL_0034: ldc.i4.1 + IL_0035: ret + + .line 100001,100001 : 0,0 '' + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: brfalse.s IL_003e + + .line 100001,100001 : 0,0 '' + IL_003c: ldc.i4.m1 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldc.i4.0 + IL_003f: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any XYZ.ABC/Expr + IL_0007: callvirt instance int32 XYZ.ABC/Expr::CompareTo(class XYZ.ABC/Expr) + IL_000c: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 80 (0x50) + .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 [mscorlib]System.Collections.IComparer V_3, + [4] int32 V_4, + [5] int32 V_5) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any XYZ.ABC/Expr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.1 + IL_000e: unbox.any XYZ.ABC/Expr + IL_0013: ldnull + IL_0014: cgt.un + IL_0016: brfalse.s IL_003f + + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 100001,100001 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldarg.2 + IL_001f: stloc.3 + IL_0020: ldloc.1 + IL_0021: ldfld int32 XYZ.ABC/Expr::item + IL_0026: stloc.s V_4 + IL_0028: ldloc.2 + IL_0029: ldfld int32 XYZ.ABC/Expr::item + IL_002e: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: bge.s IL_0038 + + .line 100001,100001 : 0,0 '' + IL_0036: ldc.i4.m1 + IL_0037: ret + + .line 100001,100001 : 0,0 '' + IL_0038: ldloc.s V_4 + IL_003a: ldloc.s V_5 + IL_003c: cgt + IL_003e: ret + + .line 100001,100001 : 0,0 '' + IL_003f: ldc.i4.1 + IL_0040: ret + + .line 100001,100001 : 0,0 '' + IL_0041: ldarg.1 + IL_0042: unbox.any XYZ.ABC/Expr + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: brfalse.s IL_004e + + .line 100001,100001 : 0,0 '' + IL_004c: ldc.i4.m1 + IL_004d: ret + + .line 100001,100001 : 0,0 '' + IL_004e: ldc.i4.0 + IL_004f: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class XYZ.ABC/Expr V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.0 + IL_0009: pop + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: stloc.1 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: ldc.i4 0x9e3779b9 + IL_0013: ldarg.1 + IL_0014: stloc.2 + IL_0015: ldloc.1 + IL_0016: ldfld int32 XYZ.ABC/Expr::item + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr + IL_0021: add + IL_0022: add + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret + + .line 100001,100001 : 0,0 '' + IL_0027: ldc.i4.0 + IL_0028: ret + } // end of method Expr::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Expr::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 52 (0x34) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst XYZ.ABC/Expr + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: stloc.3 + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.2 + IL_001c: ldfld int32 XYZ.ABC/Expr::item + IL_0021: ldloc.3 + IL_0022: ldfld int32 XYZ.ABC/Expr::item + IL_0027: ceq + IL_0029: ret + + .line 100001,100001 : 0,0 '' + IL_002a: ldc.i4.0 + IL_002b: ret + + .line 100001,100001 : 0,0 '' + IL_002c: ldarg.1 + IL_002d: ldnull + IL_002e: cgt.un + IL_0030: ldc.i4.0 + IL_0031: ceq + IL_0033: ret + } // end of method Expr::Equals + + .method public hidebysig virtual final + instance bool Equals(class XYZ.ABC/Expr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 43 (0x2b) + .maxstack 4 + .locals init ([0] class XYZ.ABC/Expr V_0, + [1] class XYZ.ABC/Expr V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0023 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0021 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: ldloc.1 + IL_0019: ldfld int32 XYZ.ABC/Expr::item + IL_001e: ceq + IL_0020: ret + + .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 + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class XYZ.ABC/Expr V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst XYZ.ABC/Expr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool XYZ.ABC/Expr::Equals(class XYZ.ABC/Expr) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method Expr::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 XYZ.ABC/Expr::get_Tag() + } // end of property Expr::Tag + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 00 00 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 ) + .get instance int32 XYZ.ABC/Expr::get_Item() + } // end of property Expr::Item + } // end of class Expr + + .class auto ansi serializable nested public beforefieldinit MyExn + extends [mscorlib]System.Exception + implements [mscorlib]System.Collections.IStructuralEquatable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) + .field assembly int32 Data0@ + .method public specialname rtspecialname + instance void .ctor(int32 data0) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Exception::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 XYZ.ABC/MyExn::Data0@ + IL_000d: ret + } // end of method MyExn::.ctor + + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Exception::.ctor() + IL_0006: ret + } // end of method MyExn::.ctor + + .method family specialname rtspecialname + instance void .ctor(class [mscorlib]System.Runtime.Serialization.SerializationInfo info, + valuetype [mscorlib]System.Runtime.Serialization.StreamingContext context) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: call instance void [mscorlib]System.Exception::.ctor(class [mscorlib]System.Runtime.Serialization.SerializationInfo, + valuetype [mscorlib]System.Runtime.Serialization.StreamingContext) + IL_0008: ret + } // end of method MyExn::.ctor + + .method public hidebysig specialname + instance int32 get_Data0() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/MyExn::Data0@ + IL_0006: ret + } // end of method MyExn::get_Data0 + + .method public hidebysig virtual 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 40 (0x28) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class [mscorlib]System.Collections.IEqualityComparer V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .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: stloc.0 + IL_0024: ldloc.0 + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldc.i4.0 + IL_0027: ret + } // end of method MyExn::GetHashCode + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method MyExn::GetHashCode + + .method public hidebysig virtual instance bool + Equals(object obj, + 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) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003b + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst [mscorlib]System.Exception + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldloc.0 + IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0018: brtrue.s IL_001c + + IL_001a: br.s IL_0037 + + .line 100001,100001 : 0,0 '' + IL_001c: ldarg.2 + IL_001d: stloc.2 + IL_001e: ldarg.0 + IL_001f: castclass XYZ.ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass XYZ.ABC/MyExn + IL_002f: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret + + .line 100001,100001 : 0,0 '' + IL_0037: ldc.i4.0 + IL_0038: ret + + .line 100001,100001 : 0,0 '' + IL_0039: ldc.i4.0 + IL_003a: ret + + .line 100001,100001 : 0,0 '' + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret + } // end of method MyExn::Equals + + .method public hidebysig instance bool + Equals(class [mscorlib]System.Exception obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 59 (0x3b) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.1 + IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0012: brtrue.s IL_0016 + + IL_0014: br.s IL_002f + + .line 100001,100001 : 0,0 '' + IL_0016: ldarg.0 + IL_0017: castclass XYZ.ABC/MyExn + IL_001c: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0021: ldarg.1 + IL_0022: castclass XYZ.ABC/MyExn + IL_0027: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_002c: ceq + IL_002e: ret + + .line 100001,100001 : 0,0 '' + IL_002f: ldc.i4.0 + IL_0030: ret + + .line 100001,100001 : 0,0 '' + IL_0031: ldc.i4.0 + IL_0032: ret + + .line 100001,100001 : 0,0 '' + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret + } // end of method MyExn::Equals + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class [mscorlib]System.Exception V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst [mscorlib]System.Exception + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool XYZ.ABC/MyExn::Equals(class [mscorlib]System.Exception) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method MyExn::Equals + + .property instance int32 Data0() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 XYZ.ABC/MyExn::get_Data0() + } // end of property MyExn::Data0 + } // end of class MyExn + + .class auto ansi serializable nested public A + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly string x + .method public specialname rtspecialname + instance void .ctor(string x) cil managed + { + // 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 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld string XYZ.ABC/A::x + IL_000f: ret + } // end of method A::.ctor + + .method public hidebysig specialname + instance string get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 15,15 : 42,43 '' + IL_0000: ldarg.0 + IL_0001: ldfld string XYZ.ABC/A::x + IL_0006: ret + } // end of method A::get_X + + .property instance string X() + { + .get instance string XYZ.ABC/A::get_X() + } // end of property A::X + } // end of class A + + .class abstract auto ansi sealed nested public ABC + extends [mscorlib]System.Object + { + .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 ) + .class auto autochar serializable sealed nested public beforefieldinit Expr + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly int32 item + .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 public static class XYZ.ABC/ABC/Expr + NewNum(int32 item) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void XYZ.ABC/ABC/Expr::.ctor(int32) + IL_0006: ret + } // end of method Expr::NewNum + + .method assembly specialname rtspecialname + instance void .ctor(int32 item) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 XYZ.ABC/ABC/Expr::item + IL_000d: ret + } // end of method Expr::.ctor + + .method public hidebysig instance int32 + get_Item() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0006: ret + } // end of method Expr::get_Item + + .method public hidebysig instance int32 + get_Tag() 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 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } // end of method Expr::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Expr::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class XYZ.ABC/ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Expr::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class XYZ.ABC/ABC/Expr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 64 (0x40) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0036 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0034 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.2 + IL_0018: ldloc.0 + IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001e: stloc.3 + IL_001f: ldloc.1 + IL_0020: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0025: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: bge.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_002c: ldc.i4.m1 + IL_002d: ret + + .line 100001,100001 : 0,0 '' + IL_002e: ldloc.3 + IL_002f: ldloc.s V_4 + IL_0031: cgt + IL_0033: ret + + .line 100001,100001 : 0,0 '' + IL_0034: ldc.i4.1 + IL_0035: ret + + .line 100001,100001 : 0,0 '' + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: brfalse.s IL_003e + + .line 100001,100001 : 0,0 '' + IL_003c: ldc.i4.m1 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldc.i4.0 + IL_003f: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any XYZ.ABC/ABC/Expr + IL_0007: callvirt instance int32 XYZ.ABC/ABC/Expr::CompareTo(class XYZ.ABC/ABC/Expr) + IL_000c: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 80 (0x50) + .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 [mscorlib]System.Collections.IComparer V_3, + [4] int32 V_4, + [5] int32 V_5) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any XYZ.ABC/ABC/Expr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.1 + IL_000e: unbox.any XYZ.ABC/ABC/Expr + IL_0013: ldnull + IL_0014: cgt.un + IL_0016: brfalse.s IL_003f + + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 100001,100001 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldarg.2 + IL_001f: stloc.3 + IL_0020: ldloc.1 + IL_0021: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0026: stloc.s V_4 + IL_0028: ldloc.2 + IL_0029: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_002e: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: bge.s IL_0038 + + .line 100001,100001 : 0,0 '' + IL_0036: ldc.i4.m1 + IL_0037: ret + + .line 100001,100001 : 0,0 '' + IL_0038: ldloc.s V_4 + IL_003a: ldloc.s V_5 + IL_003c: cgt + IL_003e: ret + + .line 100001,100001 : 0,0 '' + IL_003f: ldc.i4.1 + IL_0040: ret + + .line 100001,100001 : 0,0 '' + IL_0041: ldarg.1 + IL_0042: unbox.any XYZ.ABC/ABC/Expr + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: brfalse.s IL_004e + + .line 100001,100001 : 0,0 '' + IL_004c: ldc.i4.m1 + IL_004d: ret + + .line 100001,100001 : 0,0 '' + IL_004e: ldc.i4.0 + IL_004f: ret + } // end of method Expr::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class XYZ.ABC/ABC/Expr V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.0 + IL_0009: pop + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: stloc.1 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: ldc.i4 0x9e3779b9 + IL_0013: ldarg.1 + IL_0014: stloc.2 + IL_0015: ldloc.1 + IL_0016: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr + IL_0021: add + IL_0022: add + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret + + .line 100001,100001 : 0,0 '' + IL_0027: ldc.i4.0 + IL_0028: ret + } // end of method Expr::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Expr::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 52 (0x34) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst XYZ.ABC/ABC/Expr + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002a + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: stloc.3 + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.2 + IL_001c: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0021: ldloc.3 + IL_0022: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0027: ceq + IL_0029: ret + + .line 100001,100001 : 0,0 '' + IL_002a: ldc.i4.0 + IL_002b: ret + + .line 100001,100001 : 0,0 '' + IL_002c: ldarg.1 + IL_002d: ldnull + IL_002e: cgt.un + IL_0030: ldc.i4.0 + IL_0031: ceq + IL_0033: ret + } // end of method Expr::Equals + + .method public hidebysig virtual final + instance bool Equals(class XYZ.ABC/ABC/Expr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 43 (0x2b) + .maxstack 4 + .locals init ([0] class XYZ.ABC/ABC/Expr V_0, + [1] class XYZ.ABC/ABC/Expr V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0023 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0021 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: ldloc.1 + IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001e: ceq + IL_0020: ret + + .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 + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class XYZ.ABC/ABC/Expr V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst XYZ.ABC/ABC/Expr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool XYZ.ABC/ABC/Expr::Equals(class XYZ.ABC/ABC/Expr) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method Expr::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 XYZ.ABC/ABC/Expr::get_Tag() + } // end of property Expr::Tag + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 00 00 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 ) + .get instance int32 XYZ.ABC/ABC/Expr::get_Item() + } // end of property Expr::Item + } // end of class Expr + + .class auto ansi serializable nested public beforefieldinit MyExn + extends [mscorlib]System.Exception + implements [mscorlib]System.Collections.IStructuralEquatable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) + .field assembly int32 Data0@ + .method public specialname rtspecialname + instance void .ctor(int32 data0) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Exception::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 XYZ.ABC/ABC/MyExn::Data0@ + IL_000d: ret + } // end of method MyExn::.ctor + + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Exception::.ctor() + IL_0006: ret + } // end of method MyExn::.ctor + + .method family specialname rtspecialname + instance void .ctor(class [mscorlib]System.Runtime.Serialization.SerializationInfo info, + valuetype [mscorlib]System.Runtime.Serialization.StreamingContext context) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: call instance void [mscorlib]System.Exception::.ctor(class [mscorlib]System.Runtime.Serialization.SerializationInfo, + valuetype [mscorlib]System.Runtime.Serialization.StreamingContext) + IL_0008: ret + } // end of method MyExn::.ctor + + .method public hidebysig specialname + instance int32 get_Data0() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ + IL_0006: ret + } // end of method MyExn::get_Data0 + + .method public hidebysig virtual 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 40 (0x28) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class [mscorlib]System.Collections.IEqualityComparer V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .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: stloc.0 + IL_0024: ldloc.0 + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldc.i4.0 + IL_0027: ret + } // end of method MyExn::GetHashCode + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method MyExn::GetHashCode + + .method public hidebysig virtual instance bool + Equals(object obj, + 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) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003b + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst [mscorlib]System.Exception + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldloc.0 + IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0018: brtrue.s IL_001c + + IL_001a: br.s IL_0037 + + .line 100001,100001 : 0,0 '' + IL_001c: ldarg.2 + IL_001d: stloc.2 + IL_001e: ldarg.0 + IL_001f: castclass XYZ.ABC/ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass XYZ.ABC/ABC/MyExn + IL_002f: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret + + .line 100001,100001 : 0,0 '' + IL_0037: ldc.i4.0 + IL_0038: ret + + .line 100001,100001 : 0,0 '' + IL_0039: ldc.i4.0 + IL_003a: ret + + .line 100001,100001 : 0,0 '' + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret + } // end of method MyExn::Equals + + .method public hidebysig instance bool + Equals(class [mscorlib]System.Exception obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 59 (0x3b) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.1 + IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0012: brtrue.s IL_0016 + + IL_0014: br.s IL_002f + + .line 100001,100001 : 0,0 '' + IL_0016: ldarg.0 + IL_0017: castclass XYZ.ABC/ABC/MyExn + IL_001c: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0021: ldarg.1 + IL_0022: castclass XYZ.ABC/ABC/MyExn + IL_0027: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_002c: ceq + IL_002e: ret + + .line 100001,100001 : 0,0 '' + IL_002f: ldc.i4.0 + IL_0030: ret + + .line 100001,100001 : 0,0 '' + IL_0031: ldc.i4.0 + IL_0032: ret + + .line 100001,100001 : 0,0 '' + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret + } // end of method MyExn::Equals + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class [mscorlib]System.Exception V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst [mscorlib]System.Exception + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool XYZ.ABC/ABC/MyExn::Equals(class [mscorlib]System.Exception) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method MyExn::Equals + + .property instance int32 Data0() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + } // end of property MyExn::Data0 + } // end of class MyExn + + .class auto ansi serializable nested public A + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly string x + .method public specialname rtspecialname + instance void .ctor(string x) cil managed + { + // 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 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld string XYZ.ABC/ABC/A::x + IL_000f: ret + } // end of method A::.ctor + + .method public hidebysig specialname + instance string get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 25,25 : 46,47 '' + IL_0000: ldarg.0 + IL_0001: ldfld string XYZ.ABC/ABC/A::x + IL_0006: ret + } // end of method A::get_X + + .property instance string X() + { + .get instance string XYZ.ABC/ABC/A::get_X() + } // end of property A::X + } // end of class A + + .method public static int32 'add'(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 4 (0x4) + .maxstack 8 + .line 28,28 : 27,32 '' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: add + IL_0003: ret + } // end of method ABC::'add' + + .method public specialname static string + get_greeting() 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 6 (0x6) + .maxstack 8 + IL_0000: ldstr "hello" + IL_0005: ret + } // end of method ABC::get_greeting + + .property string greeting() + { + .get string XYZ.ABC/ABC::get_greeting() + } // end of property ABC::greeting + } // end of class ABC + + .method public static int32 'add'(int32 x, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 4 (0x4) + .maxstack 8 + .line 18,18 : 23,28 '' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: add + IL_0003: ret + } // end of method ABC::'add' + + .method public specialname static string + get_greeting() 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 6 (0x6) + .maxstack 8 + IL_0000: ldstr "hello" + IL_0005: ret + } // end of method ABC::get_greeting + + .property string greeting() + { + .get string XYZ.ABC::get_greeting() + } // end of property ABC::greeting +} // end of class XYZ.ABC + +.class private abstract auto ansi sealed ''.$ToplevelNamespace + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 13 (0xd) + .maxstack 3 + .locals init ([0] string greeting, + [1] string V_1) + .line 19,19 : 9,31 '' + IL_0000: call string XYZ.ABC::get_greeting() + IL_0005: stloc.0 + .line 29,29 : 13,35 '' + IL_0006: call string XYZ.ABC/ABC::get_greeting() + IL_000b: stloc.1 + IL_000c: ret + } // end of method $ToplevelNamespace::.cctor + +} // end of class ''.$ToplevelNamespace + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/env.lst new file mode 100644 index 00000000000..02b9c03bb30 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/env.lst @@ -0,0 +1,5 @@ + SOURCE=ToplevelModule.fs SCFLAGS="-a -g --out:TopLevelModule.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModule.dll" # ToplevelModule.fs - Desktop + SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --out:ToplevelNamespace.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace.dll" # ToplevelNamespace.fs - Desktop + + + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/keep.lst new file mode 100644 index 00000000000..f59ec20aabf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SerializableAttribute/keep.lst @@ -0,0 +1 @@ +* \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/LetBinding01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/LetBinding01.fs new file mode 100644 index 00000000000..59f22bcb140 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/LetBinding01.fs @@ -0,0 +1,6 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:5651 +// + +let x = () +printfn "x = %A" x diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/LetBinding01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/LetBinding01.il.bsl new file mode 100644 index 00000000000..8dc585e0a8a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/LetBinding01.il.bsl @@ -0,0 +1,103 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly LetBinding01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.LetBinding01 +{ + // Offset: 0x00000000 Length: 0x000001B0 +} +.mresource public FSharpOptimizationData.LetBinding01 +{ + // Offset: 0x000001B8 Length: 0x00000070 +} +.module LetBinding01.exe +// MVID: {61E07031-269D-BEEF-A745-03833170E061} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x051E0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed LetBinding01 + extends [mscorlib]System.Object +{ + .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 specialname static class [FSharp.Core]Microsoft.FSharp.Core.Unit + get_x() 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 2 (0x2) + .maxstack 8 + IL_0000: ldnull + IL_0001: ret + } // end of method LetBinding01::get_x + + .property class [FSharp.Core]Microsoft.FSharp.Core.Unit + x() + { + .get class [FSharp.Core]Microsoft.FSharp.Core.Unit LetBinding01::get_x() + } // end of property LetBinding01::x +} // end of class LetBinding01 + +.class private abstract auto ansi sealed ''.$LetBinding01 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 33 (0x21) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .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,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) + IL_0015: call class [FSharp.Core]Microsoft.FSharp.Core.Unit LetBinding01::get_x() + IL_001a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001f: pop + IL_0020: ret + } // end of method $LetBinding01::main@ + +} // end of class ''.$LetBinding01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Class01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Class01.fs new file mode 100644 index 00000000000..01177dbce16 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Class01.fs @@ -0,0 +1,8 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +// +module StaticInit_ClassS01 +type C(s:System.DateTime) = + class + static let x = "1".Length + static let f () = x + "2".Length + end diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Class01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Class01.il.bsl new file mode 100644 index 00000000000..0473438cf5b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Class01.il.bsl @@ -0,0 +1,147 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly StaticInit_Class01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.StaticInit_Class01 +{ + // Offset: 0x00000000 Length: 0x0000032F +} +.mresource public FSharpOptimizationData.StaticInit_Class01 +{ + // Offset: 0x00000338 Length: 0x000000AD +} +.module StaticInit_Class01.dll +// MVID: {61FC3629-EC34-E66E-A745-03832936FC61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07570000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed StaticInit_ClassS01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable nested public C + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field static assembly int32 x + .field static assembly int32 init@4 + .method public specialname rtspecialname + instance void .ctor(valuetype [mscorlib]System.DateTime s) cil managed + { + // 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 + IL_0007: pop + IL_0008: ret + } // end of method C::.ctor + + .method assembly static int32 f() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 38 (0x26) + .maxstack 8 + .line 7,7 : 23,37 '' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: volatile. + IL_0003: ldsfld int32 StaticInit_ClassS01/C::init@4 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 + + .line 100001,100001 : 0,0 '' + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() + IL_0010: nop + .line 100001,100001 : 0,0 '' + IL_0011: nop + IL_0012: br.s IL_0015 + + .line 100001,100001 : 0,0 '' + IL_0014: nop + IL_0015: ldsfld int32 StaticInit_ClassS01/C::x + IL_001a: ldstr "2" + IL_001f: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0024: add + IL_0025: ret + } // end of method C::f + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 13 (0xd) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$StaticInit_ClassS01::init@ + IL_0006: ldsfld int32 ''.$StaticInit_ClassS01::init@ + IL_000b: pop + IL_000c: ret + } // end of method C::.cctor + + } // end of class C + +} // end of class StaticInit_ClassS01 + +.class private abstract auto ansi sealed ''.$StaticInit_ClassS01 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // 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 + IL_0017: ret + } // end of method $StaticInit_ClassS01::.cctor + +} // end of class ''.$StaticInit_ClassS01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Module01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Module01.fs new file mode 100644 index 00000000000..5a10a3d6f82 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Module01.fs @@ -0,0 +1,8 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +// +module StaticInit_Module01 +module M = + let x = "1".Length + module N = + let y = x + "2".Length + let z = y + "3".Length diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Module01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Module01.il.bsl new file mode 100644 index 00000000000..bbe78bc0de6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Module01.il.bsl @@ -0,0 +1,162 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly StaticInit_Module01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.StaticInit_Module01 +{ + // Offset: 0x00000000 Length: 0x000002A3 +} +.mresource public FSharpOptimizationData.StaticInit_Module01 +{ + // Offset: 0x000002A8 Length: 0x000000DF +} +.module StaticInit_Module01.dll +// MVID: {60B68B90-705F-DF4F-A745-0383908BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x050C0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed StaticInit_Module01 + extends [mscorlib]System.Object +{ + .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 ) + .class abstract auto ansi sealed nested public M + extends [mscorlib]System.Object + { + .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 ) + .class abstract auto ansi sealed nested public N + extends [mscorlib]System.Object + { + .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 specialname static int32 + get_y() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$StaticInit_Module01::y@7 + IL_0005: ret + } // end of method N::get_y + + .method public specialname static int32 + get_z() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$StaticInit_Module01::z@8 + IL_0005: ret + } // end of method N::get_z + + .property int32 y() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 StaticInit_Module01/M/N::get_y() + } // end of property N::y + .property int32 z() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 StaticInit_Module01/M/N::get_z() + } // end of property N::z + } // end of class N + + .method public specialname static int32 + get_x() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld int32 ''.$StaticInit_Module01::x@5 + IL_0005: ret + } // end of method M::get_x + + .property int32 x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 StaticInit_Module01/M::get_x() + } // end of property M::x + } // end of class M + +} // end of class StaticInit_Module01 + +.class private abstract auto ansi sealed ''.$StaticInit_Module01 + extends [mscorlib]System.Object +{ + .field static assembly initonly int32 x@5 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly initonly int32 y@7 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly initonly int32 z@8 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 64 (0x40) + .maxstack 4 + .locals init ([0] int32 x, + [1] int32 y, + [2] int32 z) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 3,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Module01.fs' + IL_0000: ldstr "1" + IL_0005: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_000a: dup + IL_000b: stsfld int32 ''.$StaticInit_Module01::x@5 + IL_0010: stloc.0 + .line 7,7 : 5,27 '' + IL_0011: call int32 StaticInit_Module01/M::get_x() + IL_0016: ldstr "2" + IL_001b: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0020: add + IL_0021: dup + IL_0022: stsfld int32 ''.$StaticInit_Module01::y@7 + IL_0027: stloc.1 + .line 8,8 : 5,27 '' + IL_0028: call int32 StaticInit_Module01/M/N::get_y() + IL_002d: ldstr "3" + IL_0032: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0037: add + IL_0038: dup + IL_0039: stsfld int32 ''.$StaticInit_Module01::z@8 + IL_003e: stloc.2 + IL_003f: ret + } // end of method $StaticInit_Module01::.cctor + +} // end of class ''.$StaticInit_Module01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Struct01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Struct01.fs new file mode 100644 index 00000000000..e93c6e0d20f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Struct01.fs @@ -0,0 +1,8 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +// +module StaticInit_Struct01 +type C(s:System.DateTime) = + struct + static let x = "1".Length + static let f () = x + "2".Length + end diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl new file mode 100644 index 00000000000..0d494197f3c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl @@ -0,0 +1,341 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .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 StaticInit_Struct01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.StaticInit_Struct01 +{ + // Offset: 0x00000000 Length: 0x000007A1 +} +.mresource public FSharpOptimizationData.StaticInit_Struct01 +{ + // Offset: 0x000007A8 Length: 0x0000021F +} +.module StaticInit_Struct01.dll +// MVID: {61FC3629-05F6-D6CB-A745-03832936FC61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05360000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed StaticInit_Struct01 + extends [mscorlib]System.Object +{ + .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 ) + .class sequential ansi serializable sealed nested public C + extends [mscorlib]System.ValueType + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field static assembly int32 x + .field static assembly int32 init@4 + .field assembly valuetype [mscorlib]System.DateTime s + .method public hidebysig virtual final + instance int32 CompareTo(valuetype StaticInit_Struct01/C obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 27 (0x1b) + .maxstack 4 + .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() + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_000f: ldloc.0 + IL_0010: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_0015: call int32 [netstandard]System.DateTime::Compare(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) + IL_001a: ret + } // end of method C::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any StaticInit_Struct01/C + IL_0007: call instance int32 StaticInit_Struct01/C::CompareTo(valuetype StaticInit_Struct01/C) + IL_000c: ret + } // end of method C::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 30 (0x1e) + .maxstack 4 + .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 + IL_0007: ldloca.s V_0 + IL_0009: stloc.1 + IL_000a: ldarg.2 + IL_000b: stloc.2 + IL_000c: ldarg.0 + IL_000d: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_0012: ldloc.1 + IL_0013: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_0018: call int32 [netstandard]System.DateTime::Compare(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) + IL_001d: ret + } // end of method C::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 31 (0x1f) + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ret + } // end of method C::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method C::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + 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) + .maxstack 4 + .locals init ([0] valuetype StaticInit_Struct01/C V_0, + [1] valuetype StaticInit_Struct01/C& V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Struct01.fs' + IL_0000: ldarg.1 + IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0006: brtrue.s IL_000a + + IL_0008: br.s IL_0028 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any StaticInit_Struct01/C + IL_0010: stloc.0 + IL_0011: ldloca.s V_0 + IL_0013: stloc.1 + IL_0014: ldarg.2 + IL_0015: stloc.2 + IL_0016: ldarg.0 + IL_0017: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_001c: ldloc.1 + IL_001d: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_0022: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) + IL_0027: ret + + .line 100001,100001 : 0,0 '' + IL_0028: ldc.i4.0 + IL_0029: ret + } // end of method C::Equals + + .method public specialname rtspecialname + instance void .ctor(valuetype [mscorlib]System.DateTime s) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_0007: ret + } // end of method C::.ctor + + .method assembly static int32 f() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 38 (0x26) + .maxstack 8 + .line 7,7 : 23,37 '' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: volatile. + IL_0003: ldsfld int32 StaticInit_Struct01/C::init@4 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 + + .line 100001,100001 : 0,0 '' + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() + IL_0010: nop + .line 100001,100001 : 0,0 '' + IL_0011: nop + IL_0012: br.s IL_0015 + + .line 100001,100001 : 0,0 '' + IL_0014: nop + IL_0015: ldsfld int32 StaticInit_Struct01/C::x + IL_001a: ldstr "2" + IL_001f: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0024: add + IL_0025: ret + } // end of method C::f + + .method public hidebysig virtual final + instance bool Equals(valuetype StaticInit_Struct01/C obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 4 + .locals init (valuetype StaticInit_Struct01/C& V_0) + IL_0000: ldarga.s obj + IL_0002: stloc.0 + IL_0003: ldarg.0 + IL_0004: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_0009: ldloc.0 + IL_000a: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_000f: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) + IL_0014: ret + } // end of method C::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .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) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0006: brtrue.s IL_000a + + IL_0008: br.s IL_0019 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any StaticInit_Struct01/C + IL_0010: stloc.0 + IL_0011: ldarg.0 + IL_0012: ldloc.0 + IL_0013: call instance bool StaticInit_Struct01/C::Equals(valuetype StaticInit_Struct01/C) + IL_0018: ret + + .line 100001,100001 : 0,0 '' + IL_0019: ldc.i4.0 + IL_001a: ret + } // end of method C::Equals + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 13 (0xd) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$StaticInit_Struct01::init@ + IL_0006: ldsfld int32 ''.$StaticInit_Struct01::init@ + IL_000b: pop + IL_000c: ret + } // end of method C::.cctor + + } // end of class C + +} // end of class StaticInit_Struct01 + +.class private abstract auto ansi sealed ''.$StaticInit_Struct01 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // 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 + IL_0017: ret + } // end of method $StaticInit_Struct01::.cctor + +} // end of class ''.$StaticInit_Struct01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/env.lst new file mode 100644 index 00000000000..31a98f68d38 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/env.lst @@ -0,0 +1,7 @@ + SOURCE=LetBinding01.fs SCFLAGS=" -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetBinding01.exe" # LetBinding01.fs + + SOURCE=StaticInit_Struct01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Struct01.dll" # StaticInit_Struct01.fs - + + SOURCE=StaticInit_Class01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Class01.dll" # StaticInit_Class01.fs - + + SOURCE=StaticInit_Module01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Module01.dll" # StaticInit_Module01.fs - diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/keep.lst new file mode 100644 index 00000000000..f59ec20aabf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/StaticInit/keep.lst @@ -0,0 +1 @@ +* \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch01.fs new file mode 100644 index 00000000000..a2b09aad46a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch01.fs @@ -0,0 +1,9 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module SteppingMatch01 // Regression test for FSHARP1.0:4339 +open System +let public funcA (n) = + match n with + | Choice2Of2 _ -> + Console.WriteLine("A") + | Choice1Of2 _ -> + Console.WriteLine("B") diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch01.il.bsl new file mode 100644 index 00000000000..090ace0a0d5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch01.il.bsl @@ -0,0 +1,101 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly SteppingMatch01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SteppingMatch01 +{ + // Offset: 0x00000000 Length: 0x00000210 +} +.mresource public FSharpOptimizationData.SteppingMatch01 +{ + // Offset: 0x00000218 Length: 0x0000007A +} +.module SteppingMatch01.dll +// MVID: {611C4D99-ABFD-13F6-A745-0383994D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05320000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SteppingMatch01 + extends [mscorlib]System.Object +{ + .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 funcA(class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2 n) cil managed + { + // Code size 48 (0x30) + .maxstack 3 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2 V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice2Of2 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice1Of2 V_2) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch01.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0002: ldloc.0 + IL_0003: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice1Of2 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_001e + + .line 100001,100001 : 0,0 '' + IL_000c: ldloc.0 + IL_000d: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice2Of2 + IL_0012: stloc.1 + .line 7,7 : 13,35 '' + IL_0013: ldstr "A" + IL_0018: call void [mscorlib]System.Console::WriteLine(string) + IL_001d: ret + + .line 100001,100001 : 0,0 '' + IL_001e: ldloc.0 + IL_001f: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice1Of2 + IL_0024: stloc.2 + .line 9,9 : 13,35 '' + IL_0025: ldstr "B" + IL_002a: call void [mscorlib]System.Console::WriteLine(string) + IL_002f: ret + } // end of method SteppingMatch01::funcA + +} // end of class SteppingMatch01 + +.class private abstract auto ansi sealed ''.$SteppingMatch01 + extends [mscorlib]System.Object +{ +} // end of class ''.$SteppingMatch01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch02.fs new file mode 100644 index 00000000000..456cecbed1d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch02.fs @@ -0,0 +1,9 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module SteppingMatch02 // Regression test for FSHARP1.0:4339 +open System +let public funcB (n) = + match n with + | Choice1Of2 _ -> + Console.WriteLine("B") + | Choice2Of2 _ -> + Console.WriteLine("A") diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch02.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch02.il.bsl new file mode 100644 index 00000000000..d29ae57f651 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch02.il.bsl @@ -0,0 +1,101 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly SteppingMatch02 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SteppingMatch02 +{ + // Offset: 0x00000000 Length: 0x00000210 +} +.mresource public FSharpOptimizationData.SteppingMatch02 +{ + // Offset: 0x00000218 Length: 0x0000007A +} +.module SteppingMatch02.dll +// MVID: {611C4D99-CAC2-C63D-A745-0383994D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06CD0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SteppingMatch02 + extends [mscorlib]System.Object +{ + .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 funcB(class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2 n) cil managed + { + // Code size 48 (0x30) + .maxstack 3 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2 V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice1Of2 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice2Of2 V_2) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch02.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0002: ldloc.0 + IL_0003: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice2Of2 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_001e + + .line 100001,100001 : 0,0 '' + IL_000c: ldloc.0 + IL_000d: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice1Of2 + IL_0012: stloc.1 + .line 7,7 : 13,35 '' + IL_0013: ldstr "B" + IL_0018: call void [mscorlib]System.Console::WriteLine(string) + IL_001d: ret + + .line 100001,100001 : 0,0 '' + IL_001e: ldloc.0 + IL_001f: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice2Of2 + IL_0024: stloc.2 + .line 9,9 : 13,35 '' + IL_0025: ldstr "A" + IL_002a: call void [mscorlib]System.Console::WriteLine(string) + IL_002f: ret + } // end of method SteppingMatch02::funcB + +} // end of class SteppingMatch02 + +.class private abstract auto ansi sealed ''.$SteppingMatch02 + extends [mscorlib]System.Object +{ +} // end of class ''.$SteppingMatch02 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch03.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch03.fs new file mode 100644 index 00000000000..6a3bc1eaae1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch03.fs @@ -0,0 +1,11 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module SteppingMatch03 // Regression test for FSHARP1.0:4339 +open System +let public funcC (n) = + match n with + | Choice1Of3 _ -> + Console.WriteLine("A") + | Choice2Of3 _ -> + Console.WriteLine("B") + | Choice3Of3 _ -> + Console.WriteLine("C") diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch03.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch03.il.bsl new file mode 100644 index 00000000000..224265a3987 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch03.il.bsl @@ -0,0 +1,116 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly SteppingMatch03 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SteppingMatch03 +{ + // Offset: 0x00000000 Length: 0x00000225 +} +.mresource public FSharpOptimizationData.SteppingMatch03 +{ + // Offset: 0x00000230 Length: 0x0000007A +} +.module SteppingMatch03.dll +// MVID: {611C4D99-4E87-D110-A745-0383994D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06F80000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SteppingMatch03 + extends [mscorlib]System.Object +{ + .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 funcC(class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3 n) cil managed + { + // Code size 75 (0x4b) + .maxstack 3 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3 V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 V_3, + [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 V_4) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch03.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0002: ldloc.0 + IL_0003: stloc.1 + IL_0004: ldloc.1 + IL_0005: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 + IL_000a: brtrue.s IL_0026 + + IL_000c: ldloc.1 + IL_000d: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 + IL_0012: brtrue.s IL_0038 + + .line 100001,100001 : 0,0 '' + IL_0014: ldloc.0 + IL_0015: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 + IL_001a: stloc.2 + .line 7,7 : 13,35 '' + IL_001b: ldstr "A" + IL_0020: call void [mscorlib]System.Console::WriteLine(string) + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldloc.0 + IL_0027: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 + IL_002c: stloc.3 + .line 9,9 : 13,35 '' + IL_002d: ldstr "B" + IL_0032: call void [mscorlib]System.Console::WriteLine(string) + IL_0037: ret + + .line 100001,100001 : 0,0 '' + IL_0038: ldloc.0 + IL_0039: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 + IL_003e: stloc.s V_4 + .line 11,11 : 13,35 '' + IL_0040: ldstr "C" + IL_0045: call void [mscorlib]System.Console::WriteLine(string) + IL_004a: ret + } // end of method SteppingMatch03::funcC + +} // end of class SteppingMatch03 + +.class private abstract auto ansi sealed ''.$SteppingMatch03 + extends [mscorlib]System.Object +{ +} // end of class ''.$SteppingMatch03 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch04.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch04.fs new file mode 100644 index 00000000000..e1784c1b63a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch04.fs @@ -0,0 +1,11 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module SteppingMatch04 // Regression test for FSHARP1.0:4339 +open System +let public funcC2 (n) = + match n with + | Choice2Of3 _ -> + Console.WriteLine("B") + | Choice3Of3 _ -> + Console.WriteLine("C") + | Choice1Of3 _ -> + Console.WriteLine("A") diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch04.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch04.il.bsl new file mode 100644 index 00000000000..b1afa2fc791 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch04.il.bsl @@ -0,0 +1,116 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly SteppingMatch04 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SteppingMatch04 +{ + // Offset: 0x00000000 Length: 0x00000226 +} +.mresource public FSharpOptimizationData.SteppingMatch04 +{ + // Offset: 0x00000230 Length: 0x0000007B +} +.module SteppingMatch04.dll +// MVID: {611C4D99-6D4C-8357-A745-0383994D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06E30000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SteppingMatch04 + extends [mscorlib]System.Object +{ + .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 funcC2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3 n) cil managed + { + // Code size 75 (0x4b) + .maxstack 3 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3 V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 V_3, + [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 V_4) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch04.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0002: ldloc.0 + IL_0003: stloc.1 + IL_0004: ldloc.1 + IL_0005: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 + IL_000a: brtrue.s IL_0026 + + IL_000c: ldloc.1 + IL_000d: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 + IL_0012: brtrue.s IL_0038 + + .line 100001,100001 : 0,0 '' + IL_0014: ldloc.0 + IL_0015: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 + IL_001a: stloc.2 + .line 7,7 : 13,35 '' + IL_001b: ldstr "B" + IL_0020: call void [mscorlib]System.Console::WriteLine(string) + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldloc.0 + IL_0027: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 + IL_002c: stloc.3 + .line 9,9 : 13,35 '' + IL_002d: ldstr "C" + IL_0032: call void [mscorlib]System.Console::WriteLine(string) + IL_0037: ret + + .line 100001,100001 : 0,0 '' + IL_0038: ldloc.0 + IL_0039: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 + IL_003e: stloc.s V_4 + .line 11,11 : 13,35 '' + IL_0040: ldstr "A" + IL_0045: call void [mscorlib]System.Console::WriteLine(string) + IL_004a: ret + } // end of method SteppingMatch04::funcC2 + +} // end of class SteppingMatch04 + +.class private abstract auto ansi sealed ''.$SteppingMatch04 + extends [mscorlib]System.Object +{ +} // end of class ''.$SteppingMatch04 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch05.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch05.fs new file mode 100644 index 00000000000..4b7d8c9d4c1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch05.fs @@ -0,0 +1,11 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module SteppingMatch05 // Regression test for FSHARP1.0:4339 +open System +let public funcC3 (n) = + match n with + | Choice3Of3 _ -> + Console.WriteLine("C") + | Choice2Of3 _ -> + Console.WriteLine("B") + | Choice1Of3 _ -> + Console.WriteLine("A") diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch05.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch05.il.bsl new file mode 100644 index 00000000000..948bd3d9f92 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch05.il.bsl @@ -0,0 +1,116 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly SteppingMatch05 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SteppingMatch05 +{ + // Offset: 0x00000000 Length: 0x00000226 +} +.mresource public FSharpOptimizationData.SteppingMatch05 +{ + // Offset: 0x00000230 Length: 0x0000007B +} +.module SteppingMatch05.dll +// MVID: {611C4D99-30E9-4ADA-A745-0383994D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x064D0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SteppingMatch05 + extends [mscorlib]System.Object +{ + .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 funcC3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3 n) cil managed + { + // Code size 75 (0x4b) + .maxstack 3 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3 V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 V_3, + [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 V_4) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch05.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0002: ldloc.0 + IL_0003: stloc.1 + IL_0004: ldloc.1 + IL_0005: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 + IL_000a: brtrue.s IL_0026 + + IL_000c: ldloc.1 + IL_000d: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 + IL_0012: brtrue.s IL_0038 + + .line 100001,100001 : 0,0 '' + IL_0014: ldloc.0 + IL_0015: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 + IL_001a: stloc.2 + .line 7,7 : 13,35 '' + IL_001b: ldstr "C" + IL_0020: call void [mscorlib]System.Console::WriteLine(string) + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldloc.0 + IL_0027: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 + IL_002c: stloc.3 + .line 9,9 : 13,35 '' + IL_002d: ldstr "B" + IL_0032: call void [mscorlib]System.Console::WriteLine(string) + IL_0037: ret + + .line 100001,100001 : 0,0 '' + IL_0038: ldloc.0 + IL_0039: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 + IL_003e: stloc.s V_4 + .line 11,11 : 13,35 '' + IL_0040: ldstr "A" + IL_0045: call void [mscorlib]System.Console::WriteLine(string) + IL_004a: ret + } // end of method SteppingMatch05::funcC3 + +} // end of class SteppingMatch05 + +.class private abstract auto ansi sealed ''.$SteppingMatch05 + extends [mscorlib]System.Object +{ +} // end of class ''.$SteppingMatch05 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch06.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch06.fs new file mode 100644 index 00000000000..16f84709967 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch06.fs @@ -0,0 +1,10 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module SteppingMatch06 // Regression test for FSHARP1.0:4339 +open System +type Discr = CaseA | CaseB +let public funcD (n) = + match n with + | CaseB -> + Console.WriteLine("B") + | CaseA-> + Console.WriteLine("A") diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl new file mode 100644 index 00000000000..9a57805b166 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl @@ -0,0 +1,584 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly SteppingMatch06 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SteppingMatch06 +{ + // Offset: 0x00000000 Length: 0x00000675 +} +.mresource public FSharpOptimizationData.SteppingMatch06 +{ + // Offset: 0x00000680 Length: 0x000001D9 +} +.module SteppingMatch06.dll +// MVID: {61E07031-4FAE-FD21-A745-03833170E061} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06D40000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SteppingMatch06 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested public beforefieldinit Discr + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .class abstract auto ansi sealed nested public Tags + extends [mscorlib]System.Object + { + .field public static literal int32 CaseA = int32(0x00000000) + .field public static literal int32 CaseB = int32(0x00000001) + } // end of class Tags + + .field assembly initonly int32 _tag + .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 static assembly initonly class SteppingMatch06/Discr _unique_CaseA + .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 static assembly initonly class SteppingMatch06/Discr _unique_CaseB + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 23 (0x17) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: newobj instance void SteppingMatch06/Discr::.ctor(int32) + IL_0006: stsfld class SteppingMatch06/Discr SteppingMatch06/Discr::_unique_CaseA + IL_000b: ldc.i4.1 + IL_000c: newobj instance void SteppingMatch06/Discr::.ctor(int32) + IL_0011: stsfld class SteppingMatch06/Discr SteppingMatch06/Discr::_unique_CaseB + IL_0016: ret + } // end of method Discr::.cctor + + .method assembly specialname rtspecialname + instance void .ctor(int32 _tag) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 SteppingMatch06/Discr::_tag + IL_000d: ret + } // end of method Discr::.ctor + + .method public static class SteppingMatch06/Discr + get_CaseA() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class SteppingMatch06/Discr SteppingMatch06/Discr::_unique_CaseA + IL_0005: ret + } // end of method Discr::get_CaseA + + .method public hidebysig instance bool + get_IsCaseA() 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 10 (0xa) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance int32 SteppingMatch06/Discr::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } // end of method Discr::get_IsCaseA + + .method public static class SteppingMatch06/Discr + get_CaseB() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 01 00 00 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class SteppingMatch06/Discr SteppingMatch06/Discr::_unique_CaseB + IL_0005: ret + } // end of method Discr::get_CaseB + + .method public hidebysig instance bool + get_IsCaseB() 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 10 (0xa) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance int32 SteppingMatch06/Discr::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret + } // end of method Discr::get_IsCaseB + + .method public hidebysig instance int32 + get_Tag() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 SteppingMatch06/Discr::_tag + IL_0006: ret + } // end of method Discr::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Discr::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class SteppingMatch06/Discr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Discr::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class SteppingMatch06/Discr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 4 + .locals init ([0] int32 V_0, + [1] int32 V_1) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch06.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: ldfld int32 SteppingMatch06/Discr::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 SteppingMatch06/Discr::_tag + IL_0019: stloc.1 + .line 100001,100001 : 0,0 '' + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un.s IL_0020 + + .line 100001,100001 : 0,0 '' + IL_001e: ldc.i4.0 + IL_001f: ret + + .line 100001,100001 : 0,0 '' + IL_0020: ldloc.0 + IL_0021: ldloc.1 + IL_0022: sub + IL_0023: ret + + .line 100001,100001 : 0,0 '' + IL_0024: ldc.i4.1 + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldarg.1 + IL_0027: ldnull + IL_0028: cgt.un + IL_002a: brfalse.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_002c: ldc.i4.m1 + IL_002d: ret + + .line 100001,100001 : 0,0 '' + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method Discr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any SteppingMatch06/Discr + IL_0007: callvirt instance int32 SteppingMatch06/Discr::CompareTo(class SteppingMatch06/Discr) + IL_000c: ret + } // end of method Discr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 65 (0x41) + .maxstack 4 + .locals init ([0] class SteppingMatch06/Discr V_0, + [1] int32 V_1, + [2] int32 V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any SteppingMatch06/Discr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.1 + IL_000e: unbox.any SteppingMatch06/Discr + IL_0013: ldnull + IL_0014: cgt.un + IL_0016: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: ldfld int32 SteppingMatch06/Discr::_tag + IL_001e: stloc.1 + IL_001f: ldloc.0 + IL_0020: ldfld int32 SteppingMatch06/Discr::_tag + IL_0025: stloc.2 + .line 100001,100001 : 0,0 '' + IL_0026: ldloc.1 + IL_0027: ldloc.2 + IL_0028: bne.un.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_002a: ldc.i4.0 + IL_002b: ret + + .line 100001,100001 : 0,0 '' + IL_002c: ldloc.1 + IL_002d: ldloc.2 + IL_002e: sub + IL_002f: ret + + .line 100001,100001 : 0,0 '' + IL_0030: ldc.i4.1 + IL_0031: ret + + .line 100001,100001 : 0,0 '' + IL_0032: ldarg.1 + IL_0033: unbox.any SteppingMatch06/Discr + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: brfalse.s IL_003f + + .line 100001,100001 : 0,0 '' + IL_003d: ldc.i4.m1 + IL_003e: ret + + .line 100001,100001 : 0,0 '' + IL_003f: ldc.i4.0 + IL_0040: ret + } // end of method Discr::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 17 (0x11) + .maxstack 3 + .locals init ([0] int32 V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_000f + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: ldfld int32 SteppingMatch06/Discr::_tag + IL_000e: ret + + .line 100001,100001 : 0,0 '' + IL_000f: ldc.i4.0 + IL_0010: ret + } // end of method Discr::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Discr::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 47 (0x2f) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst SteppingMatch06/Discr + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0025 + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + IL_0012: ldarg.0 + IL_0013: ldfld int32 SteppingMatch06/Discr::_tag + IL_0018: stloc.2 + IL_0019: ldloc.1 + IL_001a: ldfld int32 SteppingMatch06/Discr::_tag + IL_001f: stloc.3 + .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_0025: ldc.i4.0 + IL_0026: ret + + .line 100001,100001 : 0,0 '' + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } // end of method Discr::Equals + + .method public hidebysig virtual final + instance bool Equals(class SteppingMatch06/Discr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 4 + .locals init ([0] int32 V_0, + [1] int32 V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0021 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_001f + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: ldfld int32 SteppingMatch06/Discr::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 SteppingMatch06/Discr::_tag + IL_0019: stloc.1 + .line 100001,100001 : 0,0 '' + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: ceq + IL_001e: ret + + .line 100001,100001 : 0,0 '' + IL_001f: ldc.i4.0 + IL_0020: ret + + .line 100001,100001 : 0,0 '' + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: cgt.un + IL_0025: ldc.i4.0 + IL_0026: ceq + IL_0028: ret + } // end of method Discr::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class SteppingMatch06/Discr V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst SteppingMatch06/Discr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool SteppingMatch06/Discr::Equals(class SteppingMatch06/Discr) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method Discr::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 SteppingMatch06/Discr::get_Tag() + } // end of property Discr::Tag + .property class SteppingMatch06/Discr + CaseA() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get class SteppingMatch06/Discr SteppingMatch06/Discr::get_CaseA() + } // end of property Discr::CaseA + .property instance bool IsCaseA() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance bool SteppingMatch06/Discr::get_IsCaseA() + } // end of property Discr::IsCaseA + .property class SteppingMatch06/Discr + CaseB() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get class SteppingMatch06/Discr SteppingMatch06/Discr::get_CaseB() + } // end of property Discr::CaseB + .property instance bool IsCaseB() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance bool SteppingMatch06/Discr::get_IsCaseB() + } // end of property Discr::IsCaseB + } // end of class Discr + + .method public static void funcD(class SteppingMatch06/Discr n) cil managed + { + // Code size 34 (0x22) + .maxstack 8 + .line 6,6 : 9,21 '' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: call instance int32 SteppingMatch06/Discr::get_Tag() + IL_0007: ldc.i4.0 + IL_0008: bne.un.s IL_000c + + IL_000a: br.s IL_0017 + + .line 8,8 : 13,35 '' + IL_000c: ldstr "B" + IL_0011: call void [mscorlib]System.Console::WriteLine(string) + IL_0016: ret + + .line 10,10 : 13,35 '' + IL_0017: ldstr "A" + IL_001c: call void [mscorlib]System.Console::WriteLine(string) + IL_0021: ret + } // end of method SteppingMatch06::funcD + +} // end of class SteppingMatch06 + +.class private abstract auto ansi sealed ''.$SteppingMatch06 + extends [mscorlib]System.Object +{ +} // end of class ''.$SteppingMatch06 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch07.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch07.fs new file mode 100644 index 00000000000..af3b6b7f337 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch07.fs @@ -0,0 +1,10 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module SteppingMatch07 // Regression test for FSHARP1.0:4339 +open System +type Discr = CaseA | CaseB +let public funcE (n) = + match n with + | CaseA-> + Console.WriteLine("A") + | CaseB -> + Console.WriteLine("B") diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl new file mode 100644 index 00000000000..733e90f336d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl @@ -0,0 +1,584 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly SteppingMatch07 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SteppingMatch07 +{ + // Offset: 0x00000000 Length: 0x00000675 +} +.mresource public FSharpOptimizationData.SteppingMatch07 +{ + // Offset: 0x00000680 Length: 0x000001D9 +} +.module SteppingMatch07.dll +// MVID: {61E07031-D373-07F3-A745-03833170E061} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x073B0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SteppingMatch07 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested public beforefieldinit Discr + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .class abstract auto ansi sealed nested public Tags + extends [mscorlib]System.Object + { + .field public static literal int32 CaseA = int32(0x00000000) + .field public static literal int32 CaseB = int32(0x00000001) + } // end of class Tags + + .field assembly initonly int32 _tag + .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 static assembly initonly class SteppingMatch07/Discr _unique_CaseA + .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 static assembly initonly class SteppingMatch07/Discr _unique_CaseB + .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 private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 23 (0x17) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: newobj instance void SteppingMatch07/Discr::.ctor(int32) + IL_0006: stsfld class SteppingMatch07/Discr SteppingMatch07/Discr::_unique_CaseA + IL_000b: ldc.i4.1 + IL_000c: newobj instance void SteppingMatch07/Discr::.ctor(int32) + IL_0011: stsfld class SteppingMatch07/Discr SteppingMatch07/Discr::_unique_CaseB + IL_0016: ret + } // end of method Discr::.cctor + + .method assembly specialname rtspecialname + instance void .ctor(int32 _tag) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 SteppingMatch07/Discr::_tag + IL_000d: ret + } // end of method Discr::.ctor + + .method public static class SteppingMatch07/Discr + get_CaseA() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class SteppingMatch07/Discr SteppingMatch07/Discr::_unique_CaseA + IL_0005: ret + } // end of method Discr::get_CaseA + + .method public hidebysig instance bool + get_IsCaseA() 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 10 (0xa) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance int32 SteppingMatch07/Discr::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } // end of method Discr::get_IsCaseA + + .method public static class SteppingMatch07/Discr + get_CaseB() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 01 00 00 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class SteppingMatch07/Discr SteppingMatch07/Discr::_unique_CaseB + IL_0005: ret + } // end of method Discr::get_CaseB + + .method public hidebysig instance bool + get_IsCaseB() 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 10 (0xa) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance int32 SteppingMatch07/Discr::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret + } // end of method Discr::get_IsCaseB + + .method public hidebysig instance int32 + get_Tag() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 SteppingMatch07/Discr::_tag + IL_0006: ret + } // end of method Discr::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Discr::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class SteppingMatch07/Discr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Discr::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class SteppingMatch07/Discr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 48 (0x30) + .maxstack 4 + .locals init ([0] int32 V_0, + [1] int32 V_1) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch07.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0024 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: ldfld int32 SteppingMatch07/Discr::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 SteppingMatch07/Discr::_tag + IL_0019: stloc.1 + .line 100001,100001 : 0,0 '' + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un.s IL_0020 + + .line 100001,100001 : 0,0 '' + IL_001e: ldc.i4.0 + IL_001f: ret + + .line 100001,100001 : 0,0 '' + IL_0020: ldloc.0 + IL_0021: ldloc.1 + IL_0022: sub + IL_0023: ret + + .line 100001,100001 : 0,0 '' + IL_0024: ldc.i4.1 + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldarg.1 + IL_0027: ldnull + IL_0028: cgt.un + IL_002a: brfalse.s IL_002e + + .line 100001,100001 : 0,0 '' + IL_002c: ldc.i4.m1 + IL_002d: ret + + .line 100001,100001 : 0,0 '' + IL_002e: ldc.i4.0 + IL_002f: ret + } // end of method Discr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any SteppingMatch07/Discr + IL_0007: callvirt instance int32 SteppingMatch07/Discr::CompareTo(class SteppingMatch07/Discr) + IL_000c: ret + } // end of method Discr::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 65 (0x41) + .maxstack 4 + .locals init ([0] class SteppingMatch07/Discr V_0, + [1] int32 V_1, + [2] int32 V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any SteppingMatch07/Discr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.1 + IL_000e: unbox.any SteppingMatch07/Discr + IL_0013: ldnull + IL_0014: cgt.un + IL_0016: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: ldfld int32 SteppingMatch07/Discr::_tag + IL_001e: stloc.1 + IL_001f: ldloc.0 + IL_0020: ldfld int32 SteppingMatch07/Discr::_tag + IL_0025: stloc.2 + .line 100001,100001 : 0,0 '' + IL_0026: ldloc.1 + IL_0027: ldloc.2 + IL_0028: bne.un.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_002a: ldc.i4.0 + IL_002b: ret + + .line 100001,100001 : 0,0 '' + IL_002c: ldloc.1 + IL_002d: ldloc.2 + IL_002e: sub + IL_002f: ret + + .line 100001,100001 : 0,0 '' + IL_0030: ldc.i4.1 + IL_0031: ret + + .line 100001,100001 : 0,0 '' + IL_0032: ldarg.1 + IL_0033: unbox.any SteppingMatch07/Discr + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: brfalse.s IL_003f + + .line 100001,100001 : 0,0 '' + IL_003d: ldc.i4.m1 + IL_003e: ret + + .line 100001,100001 : 0,0 '' + IL_003f: ldc.i4.0 + IL_0040: ret + } // end of method Discr::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 17 (0x11) + .maxstack 3 + .locals init ([0] int32 V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_000f + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: ldfld int32 SteppingMatch07/Discr::_tag + IL_000e: ret + + .line 100001,100001 : 0,0 '' + IL_000f: ldc.i4.0 + IL_0010: ret + } // end of method Discr::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Discr::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 47 (0x2f) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst SteppingMatch07/Discr + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0025 + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + IL_0012: ldarg.0 + IL_0013: ldfld int32 SteppingMatch07/Discr::_tag + IL_0018: stloc.2 + IL_0019: ldloc.1 + IL_001a: ldfld int32 SteppingMatch07/Discr::_tag + IL_001f: stloc.3 + .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_0025: ldc.i4.0 + IL_0026: ret + + .line 100001,100001 : 0,0 '' + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } // end of method Discr::Equals + + .method public hidebysig virtual final + instance bool Equals(class SteppingMatch07/Discr obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 41 (0x29) + .maxstack 4 + .locals init ([0] int32 V_0, + [1] int32 V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0021 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_001f + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: ldfld int32 SteppingMatch07/Discr::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 SteppingMatch07/Discr::_tag + IL_0019: stloc.1 + .line 100001,100001 : 0,0 '' + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: ceq + IL_001e: ret + + .line 100001,100001 : 0,0 '' + IL_001f: ldc.i4.0 + IL_0020: ret + + .line 100001,100001 : 0,0 '' + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: cgt.un + IL_0025: ldc.i4.0 + IL_0026: ceq + IL_0028: ret + } // end of method Discr::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class SteppingMatch07/Discr V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst SteppingMatch07/Discr + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool SteppingMatch07/Discr::Equals(class SteppingMatch07/Discr) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method Discr::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 SteppingMatch07/Discr::get_Tag() + } // end of property Discr::Tag + .property class SteppingMatch07/Discr + CaseA() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get class SteppingMatch07/Discr SteppingMatch07/Discr::get_CaseA() + } // end of property Discr::CaseA + .property instance bool IsCaseA() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance bool SteppingMatch07/Discr::get_IsCaseA() + } // end of property Discr::IsCaseA + .property class SteppingMatch07/Discr + CaseB() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get class SteppingMatch07/Discr SteppingMatch07/Discr::get_CaseB() + } // end of property Discr::CaseB + .property instance bool IsCaseB() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance bool SteppingMatch07/Discr::get_IsCaseB() + } // end of property Discr::IsCaseB + } // end of class Discr + + .method public static void funcE(class SteppingMatch07/Discr n) cil managed + { + // Code size 34 (0x22) + .maxstack 8 + .line 6,6 : 9,21 '' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: call instance int32 SteppingMatch07/Discr::get_Tag() + IL_0007: ldc.i4.1 + IL_0008: bne.un.s IL_000c + + IL_000a: br.s IL_0017 + + .line 8,8 : 13,35 '' + IL_000c: ldstr "A" + IL_0011: call void [mscorlib]System.Console::WriteLine(string) + IL_0016: ret + + .line 10,10 : 13,35 '' + IL_0017: ldstr "B" + IL_001c: call void [mscorlib]System.Console::WriteLine(string) + IL_0021: ret + } // end of method SteppingMatch07::funcE + +} // end of class SteppingMatch07 + +.class private abstract auto ansi sealed ''.$SteppingMatch07 + extends [mscorlib]System.Object +{ +} // end of class ''.$SteppingMatch07 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch08.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch08.fs new file mode 100644 index 00000000000..a9aaadc4fa2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch08.fs @@ -0,0 +1,10 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module SteppingMatch08 // Regression test for FSHARP1.0:5099 +let test(x) = + let b = + match x with + | 0 -> 2 + | _ -> 0 + + System.Diagnostics.Debug.Write(b) + System.Diagnostics.Debug.Write(b) diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch08.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch08.il.bsl new file mode 100644 index 00000000000..53a1dcd156f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch08.il.bsl @@ -0,0 +1,94 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly SteppingMatch08 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SteppingMatch08 +{ + // Offset: 0x00000000 Length: 0x000001DB +} +.mresource public FSharpOptimizationData.SteppingMatch08 +{ + // Offset: 0x000001E0 Length: 0x00000079 +} +.module SteppingMatch08.dll +// MVID: {611C4D99-F238-BA3A-A745-0383994D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05A00000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SteppingMatch08 + extends [mscorlib]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static void test(int32 x) cil managed + { + // Code size 21 (0x15) + .maxstack 3 + .locals init ([0] int32 b) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch08.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: switch ( + IL_000d) + IL_000b: br.s IL_0011 + + .line 6,6 : 16,17 '' + IL_000d: ldc.i4.2 + .line 100001,100001 : 0,0 '' + IL_000e: nop + IL_000f: br.s IL_0013 + + .line 7,7 : 18,19 '' + IL_0011: ldc.i4.0 + .line 100001,100001 : 0,0 '' + IL_0012: nop + .line 100001,100001 : 0,0 '' + IL_0013: stloc.0 + .line 10,10 : 5,38 '' + IL_0014: ret + } // end of method SteppingMatch08::test + +} // end of class SteppingMatch08 + +.class private abstract auto ansi sealed ''.$SteppingMatch08 + extends [mscorlib]System.Object +{ +} // end of class ''.$SteppingMatch08 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch09.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch09.fs new file mode 100644 index 00000000000..b1cca3856b1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch09.fs @@ -0,0 +1,43 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +module SteppingMatch09 +open System +let public funcA n = + match n with + | 1 -> + Some(10) // debug range should cover all of "Some(10)" + | 2 -> + None + | _ -> + Some( 22 ) // debug range should cover all of "Some( 22 )" + +// Test case from https://github.com/Microsoft/visualfsharp/issues/105 +let OuterWithGenericInner list = + let GenericInner (list: 'T list) = + match list with + | [] -> 1 + | _ -> 2 + + GenericInner list + +// Test case from https://github.com/Microsoft/visualfsharp/issues/105 +let OuterWithNonGenericInner list = + let NonGenericInner (list: int list) = + match list with + | [] -> 1 + | _ -> 2 + + NonGenericInner list + +// Test case from https://github.com/Microsoft/visualfsharp/issues/105 +let OuterWithNonGenericInnerWithCapture x list = + let NonGenericInnerWithCapture (list: int list) = + match list with + | [] -> 1 + | _ -> x + + NonGenericInnerWithCapture list + +//let _ = OuterWithGenericInner [1;2;3;4;5;6] +//let _ = OuterWithNonGenericInner [1;2;3;4;5;6] +//let _ = OuterWithNonGenericInnerWithCapture 5 [1;2;3;4;5;6] + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl new file mode 100644 index 00000000000..0a66e664385 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl @@ -0,0 +1,338 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly SteppingMatch09 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.SteppingMatch09 +{ + // Offset: 0x00000000 Length: 0x0000030C +} +.mresource public FSharpOptimizationData.SteppingMatch09 +{ + // Offset: 0x00000310 Length: 0x000000EB +} +.module SteppingMatch09.dll +// MVID: {611C4D99-4935-D6AC-A745-0383994D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07080000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed SteppingMatch09 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit GenericInner@15 + extends [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc + { + .field static assembly initonly class SteppingMatch09/GenericInner@15 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc::.ctor() + IL_0006: ret + } // end of method GenericInner@15::.ctor + + .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 ) + // Code size 12 (0xc) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void class SteppingMatch09/GenericInner@15T::.ctor(class SteppingMatch09/GenericInner@15) + IL_0006: box class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32> + IL_000b: ret + } // end of method GenericInner@15::Specialize + + .method private specialname rtspecialname static + void .cctor() 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 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void SteppingMatch09/GenericInner@15::.ctor() + IL_0005: stsfld class SteppingMatch09/GenericInner@15 SteppingMatch09/GenericInner@15::@_instance + IL_000a: ret + } // end of method GenericInner@15::.cctor + + } // end of class GenericInner@15 + + .class auto ansi serializable sealed nested assembly beforefieldinit GenericInner@15T + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32> + { + .field public class SteppingMatch09/GenericInner@15 self0@ + .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 SteppingMatch09/GenericInner@15 self0@) 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,int32>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class SteppingMatch09/GenericInner@15 class SteppingMatch09/GenericInner@15T::self0@ + IL_000d: ret + } // end of method GenericInner@15T::.ctor + + .method public strict virtual instance int32 + Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + // Code size 20 (0x14) + .maxstack 6 + .locals init ([0] class SteppingMatch09/GenericInner@15 V_0) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 16,16 : 6,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch09.fs' + IL_0000: ldarg.0 + IL_0001: ldfld class SteppingMatch09/GenericInner@15 class SteppingMatch09/GenericInner@15T::self0@ + IL_0006: stloc.0 + IL_0007: nop + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.1 + IL_0009: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000e: brtrue.s IL_0012 + + .line 17,17 : 14,15 '' + IL_0010: ldc.i4.1 + IL_0011: ret + + .line 18,18 : 13,14 '' + IL_0012: ldc.i4.2 + IL_0013: ret + } // end of method GenericInner@15T::Invoke + + } // end of class GenericInner@15T + + .class auto ansi serializable sealed nested assembly beforefieldinit NonGenericInner@25 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32> + { + .field static assembly initonly class SteppingMatch09/NonGenericInner@25 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>::.ctor() + IL_0006: ret + } // end of method NonGenericInner@25::.ctor + + .method public strict virtual instance int32 + Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + // Code size 13 (0xd) + .maxstack 8 + .line 25,25 : 6,21 '' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.1 + IL_0002: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0007: brtrue.s IL_000b + + .line 26,26 : 14,15 '' + IL_0009: ldc.i4.1 + IL_000a: ret + + .line 27,27 : 13,14 '' + IL_000b: ldc.i4.2 + IL_000c: ret + } // end of method NonGenericInner@25::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void SteppingMatch09/NonGenericInner@25::.ctor() + IL_0005: stsfld class SteppingMatch09/NonGenericInner@25 SteppingMatch09/NonGenericInner@25::@_instance + IL_000a: ret + } // end of method NonGenericInner@25::.cctor + + } // end of class NonGenericInner@25 + + .class auto ansi serializable sealed nested assembly beforefieldinit NonGenericInnerWithCapture@34 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32> + { + .field public int32 x + .method assembly specialname rtspecialname + instance void .ctor(int32 x) 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,int32>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 SteppingMatch09/NonGenericInnerWithCapture@34::x + IL_000d: ret + } // end of method NonGenericInnerWithCapture@34::.ctor + + .method public strict virtual instance int32 + Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + // Code size 18 (0x12) + .maxstack 8 + .line 34,34 : 6,21 '' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.1 + IL_0002: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0007: brtrue.s IL_000b + + .line 35,35 : 14,15 '' + IL_0009: ldc.i4.1 + IL_000a: ret + + .line 36,36 : 13,14 '' + IL_000b: ldarg.0 + IL_000c: ldfld int32 SteppingMatch09/NonGenericInnerWithCapture@34::x + IL_0011: ret + } // end of method NonGenericInnerWithCapture@34::Invoke + + } // end of class NonGenericInnerWithCapture@34 + + .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 + funcA(int32 n) cil managed + { + // Code size 37 (0x25) + .maxstack 8 + .line 5,5 : 9,21 '' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldc.i4.1 + IL_0003: sub + IL_0004: switch ( + IL_0013, + IL_001b) + IL_0011: br.s IL_001d + + .line 7,7 : 13,21 '' + IL_0013: ldc.i4.s 10 + IL_0015: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) + IL_001a: ret + + .line 9,9 : 13,17 '' + IL_001b: ldnull + IL_001c: ret + + .line 11,11 : 20,34 '' + IL_001d: ldc.i4.s 22 + IL_001f: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) + IL_0024: ret + } // end of method SteppingMatch09::funcA + + .method public static int32 OuterWithGenericInner(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + // Code size 28 (0x1c) + .maxstack 4 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc GenericInner, + [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldsfld class SteppingMatch09/GenericInner@15 SteppingMatch09/GenericInner@15::@_instance + IL_0005: stloc.0 + .line 20,20 : 3,20 '' + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: callvirt instance object [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc::Specialize() + IL_000e: unbox.any class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32> + IL_0013: ldloc.1 + IL_0014: tail. + IL_0016: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>::Invoke(!0) + IL_001b: ret + } // end of method SteppingMatch09::OuterWithGenericInner + + .method public static int32 OuterWithNonGenericInner(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + // Code size 16 (0x10) + .maxstack 4 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32> NonGenericInner) + .line 100001,100001 : 0,0 '' + IL_0000: ldsfld class SteppingMatch09/NonGenericInner@25 SteppingMatch09/NonGenericInner@25::@_instance + IL_0005: stloc.0 + .line 29,29 : 3,23 '' + IL_0006: ldloc.0 + IL_0007: ldarg.0 + IL_0008: tail. + IL_000a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>::Invoke(!0) + IL_000f: ret + } // end of method SteppingMatch09::OuterWithNonGenericInner + + .method public static int32 OuterWithNonGenericInnerWithCapture(int32 x, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + // Code size 17 (0x11) + .maxstack 4 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32> NonGenericInnerWithCapture) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: newobj instance void SteppingMatch09/NonGenericInnerWithCapture@34::.ctor(int32) + IL_0006: stloc.0 + .line 38,38 : 3,34 '' + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>::Invoke(!0) + IL_0010: ret + } // end of method SteppingMatch09::OuterWithNonGenericInnerWithCapture + +} // end of class SteppingMatch09 + +.class private abstract auto ansi sealed ''.$SteppingMatch09 + extends [mscorlib]System.Object +{ +} // end of class ''.$SteppingMatch09 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/env.lst new file mode 100644 index 00000000000..21b4f7403f3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/env.lst @@ -0,0 +1,14 @@ + + SOURCE=SteppingMatch01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch01.dll" # SteppingMatch01.fs + SOURCE=SteppingMatch02.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch02.dll" # SteppingMatch02.fs + SOURCE=SteppingMatch03.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch03.dll" # SteppingMatch03.fs + SOURCE=SteppingMatch04.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch04.dll" # SteppingMatch04.fs +Retry SOURCE=SteppingMatch05.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch05.dll" # SteppingMatch05.fs + + SOURCE=SteppingMatch06.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch06.dll" # SteppingMatch06.fs - + + SOURCE=SteppingMatch07.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch07.dll" # SteppingMatch07.fs - + + SOURCE=SteppingMatch08.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch08.dll" # SteppingMatch08.fs + + SOURCE=SteppingMatch09.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch09.dll" # SteppingMatch09.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/keep.lst new file mode 100644 index 00000000000..f59ec20aabf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/SteppingMatch/keep.lst @@ -0,0 +1 @@ +* \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction1.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction1.fs new file mode 100644 index 00000000000..5ca8603d910 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction1.fs @@ -0,0 +1,7 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction1() = + printfn "Hello"; + printfn "World"; + 3+4 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction1.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction1.il.bsl new file mode 100644 index 00000000000..f50ff82be7f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction1.il.bsl @@ -0,0 +1,94 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction1 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction1 +{ + // Offset: 0x00000000 Length: 0x000001C6 +} +.mresource public FSharpOptimizationData.TestFunction1 +{ + // Offset: 0x000001D0 Length: 0x00000070 +} +.module TestFunction1.exe +// MVID: {60B68B97-65FC-8929-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x054C0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction1 + extends [mscorlib]System.Object +{ + .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 TestFunction1() cil managed + { + // Code size 36 (0x24) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction1.fs' + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + .line 6,6 : 5,20 '' + IL_0010: ldstr "World" + IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001f: pop + .line 7,7 : 5,8 '' + IL_0020: ldc.i4.3 + IL_0021: ldc.i4.4 + IL_0022: add + IL_0023: ret + } // end of method TestFunction1::TestFunction1 + +} // end of class TestFunction1 + +.class private abstract auto ansi sealed ''.$TestFunction1 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction1::main@ + +} // end of class ''.$TestFunction1 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction10.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction10.fs new file mode 100644 index 00000000000..cb666295e3c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction10.fs @@ -0,0 +1,6 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction10(p) = + let (x,y) = p + x+y diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction10.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction10.il.bsl new file mode 100644 index 00000000000..d25fd60cf44 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction10.il.bsl @@ -0,0 +1,104 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction10 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction10 +{ + // Offset: 0x00000000 Length: 0x000001C5 +} +.mresource public FSharpOptimizationData.TestFunction10 +{ + // Offset: 0x000001D0 Length: 0x00000072 +} +.module TestFunction10.exe +// MVID: {60B68B97-A624-44FB-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x066D0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction10 + extends [mscorlib]System.Object +{ + .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 TestFunction10(int32 p_0, + int32 p_1) cil managed + { + // Code size 28 (0x1c) + .maxstack 4 + .locals init ([0] class [mscorlib]System.Tuple`2 p, + [1] class [mscorlib]System.Tuple`2 V_1, + [2] int32 y, + [3] int32 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\\TestFunctions\\TestFunction10.fs' + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0007: stloc.0 + .line 5,5 : 5,18 '' + IL_0008: ldloc.0 + IL_0009: stloc.1 + IL_000a: ldloc.1 + IL_000b: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0010: stloc.2 + IL_0011: ldloc.1 + IL_0012: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0017: stloc.3 + .line 6,6 : 5,8 '' + IL_0018: ldloc.3 + IL_0019: ldloc.2 + IL_001a: add + IL_001b: ret + } // end of method TestFunction10::TestFunction10 + +} // end of class TestFunction10 + +.class private abstract auto ansi sealed ''.$TestFunction10 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction10::main@ + +} // end of class ''.$TestFunction10 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction11.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction11.fs new file mode 100644 index 00000000000..9f60e6db6f8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction11.fs @@ -0,0 +1,5 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction11(p) = + [p; p + p; p + p + p ] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction12.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction12.fs new file mode 100644 index 00000000000..0b7471233b2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction12.fs @@ -0,0 +1,5 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction12(p) = + { contents = p+p } diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction13.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction13.fs new file mode 100644 index 00000000000..a13c4c2fd61 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction13.fs @@ -0,0 +1,5 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction13(x) = + [x;x+x], [] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction13.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction13.il.bsl new file mode 100644 index 00000000000..b3bb8d0a49b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction13.il.bsl @@ -0,0 +1,94 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction13 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction13 +{ + // Offset: 0x00000000 Length: 0x00000203 +} +.mresource public FSharpOptimizationData.TestFunction13 +{ + // Offset: 0x00000208 Length: 0x00000072 +} +.module TestFunction13.exe +// MVID: {60B68B97-A624-451C-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00EC0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction13 + extends [mscorlib]System.Object +{ + .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 class [mscorlib]System.Tuple`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + TestFunction13(int32 x) cil managed + { + // Code size 30 (0x1e) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,16 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction13.fs' + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: ldarg.0 + IL_0003: add + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_000e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0013: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0018: newobj instance void class [mscorlib]System.Tuple`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(!0, + !1) + IL_001d: ret + } // end of method TestFunction13::TestFunction13 + +} // end of class TestFunction13 + +.class private abstract auto ansi sealed ''.$TestFunction13 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction13::main@ + +} // end of class ''.$TestFunction13 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction14.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction14.fs new file mode 100644 index 00000000000..13bc70b2e41 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction14.fs @@ -0,0 +1,5 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction14() = + List.map (fun f -> f 2) [(fun x -> x + 1)] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction14.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction14.il.bsl new file mode 100644 index 00000000000..b849fc36afb --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction14.il.bsl @@ -0,0 +1,171 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction14 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction14 +{ + // Offset: 0x00000000 Length: 0x000001E6 +} +.mresource public FSharpOptimizationData.TestFunction14 +{ + // Offset: 0x000001F0 Length: 0x00000072 +} +.module TestFunction14.exe +// MVID: {60B68B97-A624-4587-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00F10000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction14 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit TestFunction14@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32> + { + .field static assembly initonly class TestFunction14/TestFunction14@5 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>::.ctor() + IL_0006: ret + } // end of method TestFunction14@5::.ctor + + .method public strict virtual instance int32 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + { + // Code size 10 (0xa) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 24,27 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction14.fs' + IL_0000: ldarg.1 + IL_0001: ldc.i4.2 + IL_0002: tail. + IL_0004: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0009: ret + } // end of method TestFunction14@5::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void TestFunction14/TestFunction14@5::.ctor() + IL_0005: stsfld class TestFunction14/TestFunction14@5 TestFunction14/TestFunction14@5::@_instance + IL_000a: ret + } // end of method TestFunction14@5::.cctor + + } // end of class TestFunction14@5 + + .class auto ansi serializable sealed nested assembly beforefieldinit 'TestFunction14@5-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class TestFunction14/'TestFunction14@5-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method 'TestFunction14@5-1'::.ctor + + .method public strict virtual instance int32 + Invoke(int32 x) cil managed + { + // Code size 4 (0x4) + .maxstack 8 + .line 5,5 : 40,45 '' + IL_0000: ldarg.1 + IL_0001: ldc.i4.1 + IL_0002: add + IL_0003: ret + } // end of method 'TestFunction14@5-1'::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void TestFunction14/'TestFunction14@5-1'::.ctor() + IL_0005: stsfld class TestFunction14/'TestFunction14@5-1' TestFunction14/'TestFunction14@5-1'::@_instance + IL_000a: ret + } // end of method 'TestFunction14@5-1'::.cctor + + } // end of class 'TestFunction14@5-1' + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + TestFunction14() cil managed + { + // Code size 28 (0x1c) + .maxstack 8 + .line 5,5 : 5,47 '' + IL_0000: ldsfld class TestFunction14/TestFunction14@5 TestFunction14/TestFunction14@5::@_instance + IL_0005: ldsfld class TestFunction14/'TestFunction14@5-1' TestFunction14/'TestFunction14@5-1'::@_instance + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::get_Empty() + IL_000f: 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_0014: tail. + IL_0016: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_001b: ret + } // end of method TestFunction14::TestFunction14 + +} // end of class TestFunction14 + +.class private abstract auto ansi sealed ''.$TestFunction14 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction14::main@ + +} // end of class ''.$TestFunction14 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction15.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction15.fs new file mode 100644 index 00000000000..6bd0bdae601 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction15.fs @@ -0,0 +1,6 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction15(inp) = + let x = inp+1 + [1;2;3] |> List.map (fun x -> x + 1) diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction16.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction16.fs new file mode 100644 index 00000000000..7e8d84a8ab3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction16.fs @@ -0,0 +1,8 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +type U = U of int * int + +let TestFunction16(inp) = + let x = U(inp,inp) + x,x diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction16.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction16.il.bsl new file mode 100644 index 00000000000..92e53fdc94f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction16.il.bsl @@ -0,0 +1,744 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction16 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction16 +{ + // Offset: 0x00000000 Length: 0x00000683 +} +.mresource public FSharpOptimizationData.TestFunction16 +{ + // Offset: 0x00000688 Length: 0x000001CD +} +.module TestFunction16.exe +// MVID: {61EFEE1F-A624-45C5-A745-03831FEEEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x069E0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction16 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested public beforefieldinit U + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly int32 item1 + .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 assembly initonly int32 item2 + .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 public static class TestFunction16/U + NewU(int32 item1, + int32 item2) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void TestFunction16/U::.ctor(int32, + int32) + IL_0007: ret + } // end of method U::NewU + + .method assembly specialname rtspecialname + instance void .ctor(int32 item1, + int32 item2) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 TestFunction16/U::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 TestFunction16/U::item2 + IL_0014: ret + } // end of method U::.ctor + + .method public hidebysig instance int32 + get_Item1() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction16/U::item1 + IL_0006: ret + } // end of method U::get_Item1 + + .method public hidebysig instance int32 + get_Item2() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction16/U::item2 + IL_0006: ret + } // end of method U::get_Item2 + + .method public hidebysig instance int32 + get_Tag() 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 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } // end of method U::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method U::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestFunction16/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method U::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class TestFunction16/U obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 120 (0x78) + .maxstack 4 + .locals init ([0] class TestFunction16/U V_0, + [1] class TestFunction16/U V_1, + [2] int32 V_2, + [3] class [mscorlib]System.Collections.IComparer V_3, + [4] int32 V_4, + [5] int32 V_5, + [6] class [mscorlib]System.Collections.IComparer V_6, + [7] int32 V_7, + [8] int32 V_8) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction16.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_006e + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.3 + IL_0018: ldloc.0 + IL_0019: ldfld int32 TestFunction16/U::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.1 + IL_0021: ldfld int32 TestFunction16/U::item1 + IL_0026: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 + + .line 100001,100001 : 0,0 '' + IL_002e: ldc.i4.m1 + .line 100001,100001 : 0,0 '' + IL_002f: nop + IL_0030: br.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + .line 100001,100001 : 0,0 '' + IL_0038: nop + .line 100001,100001 : 0,0 '' + IL_0039: stloc.2 + .line 100001,100001 : 0,0 '' + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_003e: ldloc.2 + IL_003f: ret + + .line 100001,100001 : 0,0 '' + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 + + .line 100001,100001 : 0,0 '' + IL_0044: ldloc.2 + IL_0045: ret + + .line 100001,100001 : 0,0 '' + IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004b: stloc.s V_6 + IL_004d: ldloc.0 + IL_004e: ldfld int32 TestFunction16/U::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.1 + IL_0056: ldfld int32 TestFunction16/U::item2 + IL_005b: stloc.s V_8 + .line 100001,100001 : 0,0 '' + IL_005d: ldloc.s V_7 + IL_005f: ldloc.s V_8 + IL_0061: bge.s IL_0065 + + .line 100001,100001 : 0,0 '' + IL_0063: ldc.i4.m1 + IL_0064: ret + + .line 100001,100001 : 0,0 '' + IL_0065: ldloc.s V_7 + IL_0067: ldloc.s V_8 + IL_0069: cgt + IL_006b: ret + + .line 100001,100001 : 0,0 '' + IL_006c: ldc.i4.1 + IL_006d: ret + + .line 100001,100001 : 0,0 '' + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0074: ldc.i4.m1 + IL_0075: ret + + .line 100001,100001 : 0,0 '' + IL_0076: ldc.i4.0 + IL_0077: ret + } // end of method U::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any TestFunction16/U + IL_0007: callvirt instance int32 TestFunction16/U::CompareTo(class TestFunction16/U) + IL_000c: ret + } // end of method U::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 130 (0x82) + .maxstack 4 + .locals init ([0] class TestFunction16/U V_0, + [1] class TestFunction16/U V_1, + [2] class TestFunction16/U V_2, + [3] int32 V_3, + [4] class [mscorlib]System.Collections.IComparer V_4, + [5] int32 V_5, + [6] int32 V_6, + [7] class [mscorlib]System.Collections.IComparer V_7, + [8] int32 V_8, + [9] int32 V_9) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any TestFunction16/U + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0073 + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.1 + IL_000e: unbox.any TestFunction16/U + IL_0013: ldnull + IL_0014: cgt.un + IL_0016: brfalse.s IL_0071 + + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 100001,100001 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldarg.2 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 TestFunction16/U::item1 + IL_0027: stloc.s V_5 + IL_0029: ldloc.2 + IL_002a: ldfld int32 TestFunction16/U::item1 + IL_002f: stloc.s V_6 + .line 100001,100001 : 0,0 '' + IL_0031: ldloc.s V_5 + IL_0033: ldloc.s V_6 + IL_0035: bge.s IL_003b + + .line 100001,100001 : 0,0 '' + IL_0037: ldc.i4.m1 + .line 100001,100001 : 0,0 '' + IL_0038: nop + IL_0039: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003b: ldloc.s V_5 + IL_003d: ldloc.s V_6 + IL_003f: cgt + .line 100001,100001 : 0,0 '' + IL_0041: nop + .line 100001,100001 : 0,0 '' + IL_0042: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0043: ldloc.3 + IL_0044: ldc.i4.0 + IL_0045: bge.s IL_0049 + + .line 100001,100001 : 0,0 '' + IL_0047: ldloc.3 + IL_0048: ret + + .line 100001,100001 : 0,0 '' + IL_0049: ldloc.3 + IL_004a: ldc.i4.0 + IL_004b: ble.s IL_004f + + .line 100001,100001 : 0,0 '' + IL_004d: ldloc.3 + IL_004e: ret + + .line 100001,100001 : 0,0 '' + IL_004f: ldarg.2 + IL_0050: stloc.s V_7 + IL_0052: ldloc.1 + IL_0053: ldfld int32 TestFunction16/U::item2 + IL_0058: stloc.s V_8 + IL_005a: ldloc.2 + IL_005b: ldfld int32 TestFunction16/U::item2 + IL_0060: stloc.s V_9 + .line 100001,100001 : 0,0 '' + IL_0062: ldloc.s V_8 + IL_0064: ldloc.s V_9 + IL_0066: bge.s IL_006a + + .line 100001,100001 : 0,0 '' + IL_0068: ldc.i4.m1 + IL_0069: ret + + .line 100001,100001 : 0,0 '' + IL_006a: ldloc.s V_8 + IL_006c: ldloc.s V_9 + IL_006e: cgt + IL_0070: ret + + .line 100001,100001 : 0,0 '' + IL_0071: ldc.i4.1 + IL_0072: ret + + .line 100001,100001 : 0,0 '' + IL_0073: ldarg.1 + IL_0074: unbox.any TestFunction16/U + IL_0079: ldnull + IL_007a: cgt.un + IL_007c: brfalse.s IL_0080 + + .line 100001,100001 : 0,0 '' + IL_007e: ldc.i4.m1 + IL_007f: ret + + .line 100001,100001 : 0,0 '' + IL_0080: ldc.i4.0 + IL_0081: ret + } // end of method U::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 64 (0x40) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003e + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.0 + IL_0009: pop + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: stloc.1 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: ldc.i4 0x9e3779b9 + IL_0013: ldarg.1 + IL_0014: stloc.2 + IL_0015: ldloc.1 + IL_0016: ldfld int32 TestFunction16/U::item2 + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr + IL_0021: add + IL_0022: add + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldc.i4 0x9e3779b9 + IL_002a: ldarg.1 + IL_002b: stloc.3 + IL_002c: ldloc.1 + IL_002d: ldfld int32 TestFunction16/U::item1 + IL_0032: ldloc.0 + IL_0033: ldc.i4.6 + IL_0034: shl + IL_0035: ldloc.0 + IL_0036: ldc.i4.2 + IL_0037: shr + IL_0038: add + IL_0039: add + IL_003a: add + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldc.i4.0 + IL_003f: ret + } // end of method U::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method U::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 73 (0x49) + .maxstack 4 + .locals init ([0] class TestFunction16/U V_0, + [1] class TestFunction16/U V_1, + [2] class TestFunction16/U V_2, + [3] class TestFunction16/U V_3, + [4] class [mscorlib]System.Collections.IEqualityComparer V_4, + [5] class [mscorlib]System.Collections.IEqualityComparer V_5) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst TestFunction16/U + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_003f + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.2 + IL_001c: ldfld int32 TestFunction16/U::item1 + IL_0021: ldloc.3 + IL_0022: ldfld int32 TestFunction16/U::item1 + IL_0027: ceq + IL_0029: brfalse.s IL_003d + + .line 100001,100001 : 0,0 '' + IL_002b: ldarg.2 + IL_002c: stloc.s V_5 + IL_002e: ldloc.2 + IL_002f: ldfld int32 TestFunction16/U::item2 + IL_0034: ldloc.3 + IL_0035: ldfld int32 TestFunction16/U::item2 + IL_003a: ceq + IL_003c: ret + + .line 100001,100001 : 0,0 '' + IL_003d: ldc.i4.0 + IL_003e: ret + + .line 100001,100001 : 0,0 '' + IL_003f: ldc.i4.0 + IL_0040: ret + + .line 100001,100001 : 0,0 '' + IL_0041: ldarg.1 + IL_0042: ldnull + IL_0043: cgt.un + IL_0045: ldc.i4.0 + IL_0046: ceq + IL_0048: ret + } // end of method U::Equals + + .method public hidebysig virtual final + instance bool Equals(class TestFunction16/U obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 59 (0x3b) + .maxstack 4 + .locals init ([0] class TestFunction16/U V_0, + [1] class TestFunction16/U V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + 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_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_002f: ldc.i4.0 + IL_0030: ret + + .line 100001,100001 : 0,0 '' + IL_0031: ldc.i4.0 + IL_0032: ret + + .line 100001,100001 : 0,0 '' + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret + } // end of method U::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class TestFunction16/U V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst TestFunction16/U + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool TestFunction16/U::Equals(class TestFunction16/U) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method U::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 TestFunction16/U::get_Tag() + } // end of property U::Tag + .property instance int32 Item1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 00 00 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 ) + .get instance int32 TestFunction16/U::get_Item1() + } // end of property U::Item1 + .property instance int32 Item2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 00 00 00 01 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 ) + .get instance int32 TestFunction16/U::get_Item2() + } // end of property U::Item2 + } // end of class U + + .method public static class [mscorlib]System.Tuple`2 + TestFunction16(int32 inp) cil managed + { + // Code size 16 (0x10) + .maxstack 4 + .locals init ([0] class TestFunction16/U x) + .line 7,7 : 5,23 '' + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: call class TestFunction16/U TestFunction16/U::NewU(int32, + int32) + IL_0007: stloc.0 + .line 8,8 : 5,8 '' + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_000f: ret + } // end of method TestFunction16::TestFunction16 + +} // end of class TestFunction16 + +.class private abstract auto ansi sealed ''.$TestFunction16 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction16::main@ + +} // end of class ''.$TestFunction16 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction17.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction17.fs new file mode 100644 index 00000000000..0527a295ed3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction17.fs @@ -0,0 +1,8 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +type R = { x:int; y:int } + +let TestFunction17(inp) = + let x = {x=3;y=inp} + x,x diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction17.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction17.il.bsl new file mode 100644 index 00000000000..cadb6fe4694 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction17.il.bsl @@ -0,0 +1,632 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction17 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction17 +{ + // Offset: 0x00000000 Length: 0x0000066E +} +.mresource public FSharpOptimizationData.TestFunction17 +{ + // Offset: 0x00000678 Length: 0x000001CD +} +.module TestFunction17.exe +// MVID: {61EFEE1F-A624-45A8-A745-03831FEEEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06AF0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction17 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested public R + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 x@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 y@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname + instance int32 get_x() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction17/R::x@ + IL_0006: ret + } // end of method R::get_x + + .method public hidebysig specialname + instance int32 get_y() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction17/R::y@ + IL_0006: ret + } // end of method R::get_y + + .method public specialname rtspecialname + instance void .ctor(int32 x, + int32 y) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 TestFunction17/R::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 TestFunction17/R::y@ + IL_0014: ret + } // end of method R::.ctor + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestFunction17/R>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method R::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class TestFunction17/R obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 108 (0x6c) + .maxstack 4 + .locals init ([0] int32 V_0, + [1] class [mscorlib]System.Collections.IComparer V_1, + [2] int32 V_2, + [3] int32 V_3, + [4] class [mscorlib]System.Collections.IComparer V_4, + [5] int32 V_5, + [6] int32 V_6) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction17.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0062 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0060 + + .line 100001,100001 : 0,0 '' + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.1 + IL_0012: ldarg.0 + IL_0013: ldfld int32 TestFunction17/R::x@ + IL_0018: stloc.2 + IL_0019: ldarg.1 + IL_001a: ldfld int32 TestFunction17/R::x@ + IL_001f: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 + + .line 100001,100001 : 0,0 '' + IL_0024: ldc.i4.m1 + .line 100001,100001 : 0,0 '' + IL_0025: nop + IL_0026: br.s IL_002d + + .line 100001,100001 : 0,0 '' + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt + .line 100001,100001 : 0,0 '' + IL_002c: nop + .line 100001,100001 : 0,0 '' + IL_002d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 + + .line 100001,100001 : 0,0 '' + IL_0032: ldloc.0 + IL_0033: ret + + .line 100001,100001 : 0,0 '' + IL_0034: ldloc.0 + IL_0035: ldc.i4.0 + IL_0036: ble.s IL_003a + + .line 100001,100001 : 0,0 '' + IL_0038: ldloc.0 + IL_0039: ret + + .line 100001,100001 : 0,0 '' + IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_003f: stloc.s V_4 + IL_0041: ldarg.0 + IL_0042: ldfld int32 TestFunction17/R::y@ + IL_0047: stloc.s V_5 + IL_0049: ldarg.1 + IL_004a: ldfld int32 TestFunction17/R::y@ + IL_004f: stloc.s V_6 + .line 100001,100001 : 0,0 '' + IL_0051: ldloc.s V_5 + IL_0053: ldloc.s V_6 + IL_0055: bge.s IL_0059 + + .line 100001,100001 : 0,0 '' + IL_0057: ldc.i4.m1 + IL_0058: ret + + .line 100001,100001 : 0,0 '' + IL_0059: ldloc.s V_5 + IL_005b: ldloc.s V_6 + IL_005d: cgt + IL_005f: ret + + .line 100001,100001 : 0,0 '' + IL_0060: ldc.i4.1 + IL_0061: ret + + .line 100001,100001 : 0,0 '' + IL_0062: ldarg.1 + IL_0063: ldnull + IL_0064: cgt.un + IL_0066: brfalse.s IL_006a + + .line 100001,100001 : 0,0 '' + IL_0068: ldc.i4.m1 + IL_0069: ret + + .line 100001,100001 : 0,0 '' + IL_006a: ldc.i4.0 + IL_006b: ret + } // end of method R::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any TestFunction17/R + IL_0007: callvirt instance int32 TestFunction17/R::CompareTo(class TestFunction17/R) + IL_000c: ret + } // end of method R::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 125 (0x7d) + .maxstack 4 + .locals init ([0] class TestFunction17/R V_0, + [1] class TestFunction17/R V_1, + [2] int32 V_2, + [3] class [mscorlib]System.Collections.IComparer V_3, + [4] int32 V_4, + [5] int32 V_5, + [6] class [mscorlib]System.Collections.IComparer V_6, + [7] int32 V_7, + [8] int32 V_8) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any TestFunction17/R + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: ldnull + IL_000b: cgt.un + IL_000d: brfalse.s IL_006e + + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.1 + IL_0010: unbox.any TestFunction17/R + IL_0015: ldnull + IL_0016: cgt.un + IL_0018: brfalse.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_001a: ldarg.2 + IL_001b: stloc.3 + IL_001c: ldarg.0 + IL_001d: ldfld int32 TestFunction17/R::x@ + IL_0022: stloc.s V_4 + IL_0024: ldloc.1 + IL_0025: ldfld int32 TestFunction17/R::x@ + IL_002a: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: bge.s IL_0036 + + .line 100001,100001 : 0,0 '' + IL_0032: ldc.i4.m1 + .line 100001,100001 : 0,0 '' + IL_0033: nop + IL_0034: br.s IL_003d + + .line 100001,100001 : 0,0 '' + IL_0036: ldloc.s V_4 + IL_0038: ldloc.s V_5 + IL_003a: cgt + .line 100001,100001 : 0,0 '' + IL_003c: nop + .line 100001,100001 : 0,0 '' + IL_003d: stloc.2 + .line 100001,100001 : 0,0 '' + IL_003e: ldloc.2 + IL_003f: ldc.i4.0 + IL_0040: bge.s IL_0044 + + .line 100001,100001 : 0,0 '' + IL_0042: ldloc.2 + IL_0043: ret + + .line 100001,100001 : 0,0 '' + IL_0044: ldloc.2 + IL_0045: ldc.i4.0 + IL_0046: ble.s IL_004a + + .line 100001,100001 : 0,0 '' + IL_0048: ldloc.2 + IL_0049: ret + + .line 100001,100001 : 0,0 '' + IL_004a: ldarg.2 + IL_004b: stloc.s V_6 + IL_004d: ldarg.0 + IL_004e: ldfld int32 TestFunction17/R::y@ + IL_0053: stloc.s V_7 + IL_0055: ldloc.1 + IL_0056: ldfld int32 TestFunction17/R::y@ + IL_005b: stloc.s V_8 + .line 100001,100001 : 0,0 '' + IL_005d: ldloc.s V_7 + IL_005f: ldloc.s V_8 + IL_0061: bge.s IL_0065 + + .line 100001,100001 : 0,0 '' + IL_0063: ldc.i4.m1 + IL_0064: ret + + .line 100001,100001 : 0,0 '' + IL_0065: ldloc.s V_7 + IL_0067: ldloc.s V_8 + IL_0069: cgt + IL_006b: ret + + .line 100001,100001 : 0,0 '' + IL_006c: ldc.i4.1 + IL_006d: ret + + .line 100001,100001 : 0,0 '' + IL_006e: ldarg.1 + IL_006f: unbox.any TestFunction17/R + IL_0074: ldnull + IL_0075: cgt.un + IL_0077: brfalse.s IL_007b + + .line 100001,100001 : 0,0 '' + IL_0079: ldc.i4.m1 + IL_007a: ret + + .line 100001,100001 : 0,0 '' + IL_007b: ldc.i4.0 + IL_007c: ret + } // end of method R::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 58 (0x3a) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class [mscorlib]System.Collections.IEqualityComparer V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0038 + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldc.i4 0x9e3779b9 + IL_000d: ldarg.1 + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldfld int32 TestFunction17/R::y@ + IL_0015: ldloc.0 + IL_0016: ldc.i4.6 + IL_0017: shl + IL_0018: ldloc.0 + IL_0019: ldc.i4.2 + IL_001a: shr + IL_001b: add + IL_001c: add + IL_001d: add + IL_001e: stloc.0 + IL_001f: ldc.i4 0x9e3779b9 + IL_0024: ldarg.1 + IL_0025: stloc.2 + IL_0026: ldarg.0 + IL_0027: ldfld int32 TestFunction17/R::x@ + IL_002c: ldloc.0 + IL_002d: ldc.i4.6 + IL_002e: shl + IL_002f: ldloc.0 + IL_0030: ldc.i4.2 + IL_0031: shr + IL_0032: add + IL_0033: add + IL_0034: add + IL_0035: stloc.0 + IL_0036: ldloc.0 + IL_0037: ret + + .line 100001,100001 : 0,0 '' + IL_0038: ldc.i4.0 + IL_0039: ret + } // end of method R::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method R::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + 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) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst TestFunction17/R + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0037 + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldarg.2 + IL_0013: stloc.2 + IL_0014: ldarg.0 + IL_0015: ldfld int32 TestFunction17/R::x@ + IL_001a: ldloc.1 + IL_001b: ldfld int32 TestFunction17/R::x@ + IL_0020: ceq + IL_0022: brfalse.s IL_0035 + + .line 100001,100001 : 0,0 '' + IL_0024: ldarg.2 + IL_0025: stloc.3 + IL_0026: ldarg.0 + IL_0027: ldfld int32 TestFunction17/R::y@ + IL_002c: ldloc.1 + IL_002d: ldfld int32 TestFunction17/R::y@ + IL_0032: ceq + IL_0034: ret + + .line 100001,100001 : 0,0 '' + IL_0035: ldc.i4.0 + IL_0036: ret + + .line 100001,100001 : 0,0 '' + IL_0037: ldc.i4.0 + IL_0038: ret + + .line 100001,100001 : 0,0 '' + IL_0039: ldarg.1 + IL_003a: ldnull + IL_003b: cgt.un + IL_003d: ldc.i4.0 + IL_003e: ceq + IL_0040: ret + } // end of method R::Equals + + .method public hidebysig virtual final + instance bool Equals(class TestFunction17/R obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 53 (0x35) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002d + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_002b + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: ldfld int32 TestFunction17/R::x@ + IL_0012: ldarg.1 + IL_0013: ldfld int32 TestFunction17/R::x@ + IL_0018: bne.un.s IL_0029 + + .line 100001,100001 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: ldfld int32 TestFunction17/R::y@ + IL_0020: ldarg.1 + IL_0021: ldfld int32 TestFunction17/R::y@ + IL_0026: ceq + IL_0028: ret + + .line 100001,100001 : 0,0 '' + IL_0029: ldc.i4.0 + IL_002a: ret + + .line 100001,100001 : 0,0 '' + IL_002b: ldc.i4.0 + IL_002c: 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 + } // end of method R::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class TestFunction17/R V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst TestFunction17/R + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool TestFunction17/R::Equals(class TestFunction17/R) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method R::Equals + + .property instance int32 x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 TestFunction17/R::get_x() + } // end of property R::x + .property instance int32 y() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 TestFunction17/R::get_y() + } // end of property R::y + } // end of class R + + .method public static class [mscorlib]System.Tuple`2 + TestFunction17(int32 inp) cil managed + { + // Code size 16 (0x10) + .maxstack 4 + .locals init ([0] class TestFunction17/R x) + .line 7,7 : 5,24 '' + IL_0000: ldc.i4.3 + IL_0001: ldarg.0 + IL_0002: newobj instance void TestFunction17/R::.ctor(int32, + int32) + IL_0007: stloc.0 + .line 8,8 : 5,8 '' + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_000f: ret + } // end of method TestFunction17::TestFunction17 + +} // end of class TestFunction17 + +.class private abstract auto ansi sealed ''.$TestFunction17 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction17::main@ + +} // end of class ''.$TestFunction17 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction18.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction18.fs new file mode 100644 index 00000000000..cbf582c89db --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction18.fs @@ -0,0 +1,5 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction18(inp) = + System.Console.WriteLine("hello") diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction19.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction19.fs new file mode 100644 index 00000000000..ab43011cd1d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction19.fs @@ -0,0 +1,11 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +type C(x:int,y:int) = + member this.X = x + member this.Y = y + +let TestFunction19(inp) = + let c1 = C(inp,inp) + let c2 = C(inp,inp) + printfn "c1 = %A, c2 = %A" c1 c2 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction19.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction19.il.bsl new file mode 100644 index 00000000000..59c76dae6fa --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction19.il.bsl @@ -0,0 +1,243 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction19 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction19 +{ + // Offset: 0x00000000 Length: 0x0000034E +} +.mresource public FSharpOptimizationData.TestFunction19 +{ + // Offset: 0x00000358 Length: 0x00000100 +} +.module TestFunction19.exe +// MVID: {61F2D6A5-A624-46AE-A745-0383A5D6F261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06B00000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction19 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable nested public C + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly int32 y + .field assembly int32 x + .method public specialname rtspecialname + instance void .ctor(int32 x, + int32 y) cil managed + { + // 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 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld int32 TestFunction19/C::x + IL_000f: ldarg.0 + IL_0010: ldarg.2 + IL_0011: stfld int32 TestFunction19/C::y + IL_0016: ret + } // end of method C::.ctor + + .method public hidebysig specialname + instance int32 get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 5,5 : 21,22 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction19/C::x + IL_0006: ret + } // end of method C::get_X + + .method public hidebysig specialname + instance int32 get_Y() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 6,6 : 21,22 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction19/C::y + IL_0006: ret + } // end of method C::get_Y + + .property instance int32 X() + { + .get instance int32 TestFunction19/C::get_X() + } // end of property C::X + .property instance int32 Y() + { + .get instance int32 TestFunction19/C::get_Y() + } // end of property C::Y + } // end of class C + + .class auto ansi serializable sealed nested assembly beforefieldinit 'TestFunction19@11-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 clo2 + .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 clo2) 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 TestFunction19/'TestFunction19@11-1'::clo2 + IL_000d: ret + } // end of method 'TestFunction19@11-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit + Invoke(class TestFunction19/C arg20) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 TestFunction19/'TestFunction19@11-1'::clo2 + IL_0006: ldarg.1 + IL_0007: tail. + IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000e: ret + } // end of method 'TestFunction19@11-1'::Invoke + + } // end of class 'TestFunction19@11-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit TestFunction19@11 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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> clo1) 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> TestFunction19/TestFunction19@11::clo1 + IL_000d: ret + } // end of method TestFunction19@11::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + Invoke(class TestFunction19/C arg10) cil managed + { + // Code size 20 (0x14) + .maxstack 6 + .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 + IL_0007: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::Invoke(!0) + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: newobj instance void TestFunction19/'TestFunction19@11-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } // end of method TestFunction19@11::Invoke + + } // end of class TestFunction19@11 + + .method public static void TestFunction19(int32 inp) cil managed + { + // Code size 47 (0x2f) + .maxstack 5 + .locals init ([0] class TestFunction19/C c1, + [1] class TestFunction19/C c2, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) + .line 9,9 : 5,24 '' + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: newobj instance void TestFunction19/C::.ctor(int32, + int32) + IL_0007: stloc.0 + .line 10,10 : 5,24 '' + IL_0008: ldarg.0 + IL_0009: ldarg.0 + IL_000a: newobj instance void TestFunction19/C::.ctor(int32, + int32) + IL_000f: stloc.1 + .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) + IL_001f: stloc.2 + IL_0020: ldloc.2 + IL_0021: newobj instance void TestFunction19/TestFunction19@11::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0026: ldloc.0 + IL_0027: ldloc.1 + IL_0028: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !0, + !1) + IL_002d: pop + IL_002e: ret + } // end of method TestFunction19::TestFunction19 + +} // end of class TestFunction19 + +.class private abstract auto ansi sealed ''.$TestFunction19 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction19::main@ + +} // end of class ''.$TestFunction19 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction2.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction2.fs new file mode 100644 index 00000000000..5e243555924 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction2.fs @@ -0,0 +1,13 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction1() = + printfn "Hello"; + printfn "World"; + 3+4 + +let TestFunction2() = + let x = TestFunction1() + printfn "Hello"; + printfn "World" + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction20.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction20.fs new file mode 100644 index 00000000000..116218435b2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction20.fs @@ -0,0 +1,14 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +type D(x:int,y:int) = + let z = x + y + let f a = x + a + let w = f z + z + member this.X = x + member this.Y = y + +let TestFunction20(inp) = + let d1 = D(inp,inp) + let d2 = D(inp,inp) + printfn "d1 = %A, d2 = %A" d1 d2 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction20.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction20.il.bsl new file mode 100644 index 00000000000..ffddfd77ac5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction20.il.bsl @@ -0,0 +1,273 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction20 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction20 +{ + // Offset: 0x00000000 Length: 0x0000038F +} +.mresource public FSharpOptimizationData.TestFunction20 +{ + // Offset: 0x00000398 Length: 0x00000100 +} +.module TestFunction20.exe +// MVID: {61FD32BA-A643-44FB-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06C20000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction20 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable nested public D + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly int32 y + .field assembly int32 x + .method public specialname rtspecialname + instance void .ctor(int32 x, + int32 y) cil managed + { + // Code size 47 (0x2f) + .maxstack 4 + .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' + IL_0000: ldarg.0 + IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld int32 TestFunction20/D::x + IL_000f: ldarg.0 + IL_0010: ldarg.2 + IL_0011: stfld int32 TestFunction20/D::y + .line 5,5 : 5,18 '' + IL_0016: ldarg.0 + IL_0017: ldfld int32 TestFunction20/D::x + IL_001c: ldarg.0 + IL_001d: ldfld int32 TestFunction20/D::y + IL_0022: add + IL_0023: stloc.0 + .line 7,7 : 5,20 '' + IL_0024: ldarg.0 + IL_0025: ldloc.0 + IL_0026: callvirt instance int32 TestFunction20/D::f(int32) + IL_002b: ldloc.0 + IL_002c: add + IL_002d: stloc.1 + IL_002e: ret + } // end of method D::.ctor + + .method public hidebysig specialname + instance int32 get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 8,8 : 21,22 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction20/D::x + IL_0006: ret + } // end of method D::get_X + + .method public hidebysig specialname + instance int32 get_Y() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 9,9 : 21,22 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction20/D::y + IL_0006: ret + } // end of method D::get_Y + + .method assembly hidebysig instance int32 + f(int32 a) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 9 (0x9) + .maxstack 8 + .line 6,6 : 15,20 '' + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction20/D::x + IL_0006: ldarg.1 + IL_0007: add + IL_0008: ret + } // end of method D::f + + .property instance int32 X() + { + .get instance int32 TestFunction20/D::get_X() + } // end of property D::X + .property instance int32 Y() + { + .get instance int32 TestFunction20/D::get_Y() + } // end of property D::Y + } // end of class D + + .class auto ansi serializable sealed nested assembly beforefieldinit 'TestFunction20@14-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 clo2 + .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 clo2) 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 TestFunction20/'TestFunction20@14-1'::clo2 + IL_000d: ret + } // end of method 'TestFunction20@14-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit + Invoke(class TestFunction20/D arg20) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 TestFunction20/'TestFunction20@14-1'::clo2 + IL_0006: ldarg.1 + IL_0007: tail. + IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000e: ret + } // end of method 'TestFunction20@14-1'::Invoke + + } // end of class 'TestFunction20@14-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit TestFunction20@14 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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> clo1) 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> TestFunction20/TestFunction20@14::clo1 + IL_000d: ret + } // end of method TestFunction20@14::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + Invoke(class TestFunction20/D arg10) cil managed + { + // Code size 20 (0x14) + .maxstack 6 + .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 + IL_0007: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::Invoke(!0) + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: newobj instance void TestFunction20/'TestFunction20@14-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } // end of method TestFunction20@14::Invoke + + } // end of class TestFunction20@14 + + .method public static void TestFunction20(int32 inp) cil managed + { + // Code size 47 (0x2f) + .maxstack 5 + .locals init ([0] class TestFunction20/D d1, + [1] class TestFunction20/D d2, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) + .line 12,12 : 5,24 '' + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: newobj instance void TestFunction20/D::.ctor(int32, + int32) + IL_0007: stloc.0 + .line 13,13 : 5,24 '' + IL_0008: ldarg.0 + IL_0009: ldarg.0 + IL_000a: newobj instance void TestFunction20/D::.ctor(int32, + int32) + IL_000f: stloc.1 + .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) + IL_001f: stloc.2 + IL_0020: ldloc.2 + IL_0021: newobj instance void TestFunction20/TestFunction20@14::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0026: ldloc.0 + IL_0027: ldloc.1 + IL_0028: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !0, + !1) + IL_002d: pop + IL_002e: ret + } // end of method TestFunction20::TestFunction20 + +} // end of class TestFunction20 + +.class private abstract auto ansi sealed ''.$TestFunction20 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction20::main@ + +} // end of class ''.$TestFunction20 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction21.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction21.fs new file mode 100644 index 00000000000..5f11c8459b5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction21.fs @@ -0,0 +1,7 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +type U = U of int * int + +let TestFunction21(U(a,b)) = + printfn "a = %A, a = %A" a b diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction21.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction21.il.bsl new file mode 100644 index 00000000000..26fad449662 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction21.il.bsl @@ -0,0 +1,834 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction21 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction21 +{ + // Offset: 0x00000000 Length: 0x00000675 +} +.mresource public FSharpOptimizationData.TestFunction21 +{ + // Offset: 0x00000680 Length: 0x000001CD +} +.module TestFunction21.exe +// MVID: {61EFEE1F-A643-45E6-A745-03831FEEEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x069B0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction21 + extends [mscorlib]System.Object +{ + .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 ) + .class auto autochar serializable sealed nested public beforefieldinit U + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C // ...{__DebugDispl + 61 79 28 29 2C 6E 71 7D 00 00 ) // ay(),nq}.. + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly int32 item1 + .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 assembly initonly int32 item2 + .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 public static class TestFunction21/U + NewU(int32 item1, + int32 item2) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void TestFunction21/U::.ctor(int32, + int32) + IL_0007: ret + } // end of method U::NewU + + .method assembly specialname rtspecialname + instance void .ctor(int32 item1, + int32 item2) 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 [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 TestFunction21/U::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 TestFunction21/U::item2 + IL_0014: ret + } // end of method U::.ctor + + .method public hidebysig instance int32 + get_Item1() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction21/U::item1 + IL_0006: ret + } // end of method U::get_Item1 + + .method public hidebysig instance int32 + get_Item2() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction21/U::item2 + IL_0006: ret + } // end of method U::get_Item2 + + .method public hidebysig instance int32 + get_Tag() 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 4 (0x4) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } // end of method U::get_Tag + + .method assembly hidebysig specialname + instance object __DebugDisplay() 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 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method U::__DebugDisplay + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestFunction21/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method U::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class TestFunction21/U obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 120 (0x78) + .maxstack 4 + .locals init ([0] class TestFunction21/U V_0, + [1] class TestFunction21/U V_1, + [2] int32 V_2, + [3] class [mscorlib]System.Collections.IComparer V_3, + [4] int32 V_4, + [5] int32 V_5, + [6] class [mscorlib]System.Collections.IComparer V_6, + [7] int32 V_7, + [8] int32 V_8) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction21.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_006e + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006c + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.3 + IL_0018: ldloc.0 + IL_0019: ldfld int32 TestFunction21/U::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.1 + IL_0021: ldfld int32 TestFunction21/U::item1 + IL_0026: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 + + .line 100001,100001 : 0,0 '' + IL_002e: ldc.i4.m1 + .line 100001,100001 : 0,0 '' + IL_002f: nop + IL_0030: br.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + .line 100001,100001 : 0,0 '' + IL_0038: nop + .line 100001,100001 : 0,0 '' + IL_0039: stloc.2 + .line 100001,100001 : 0,0 '' + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 + + .line 100001,100001 : 0,0 '' + IL_003e: ldloc.2 + IL_003f: ret + + .line 100001,100001 : 0,0 '' + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 + + .line 100001,100001 : 0,0 '' + IL_0044: ldloc.2 + IL_0045: ret + + .line 100001,100001 : 0,0 '' + IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004b: stloc.s V_6 + IL_004d: ldloc.0 + IL_004e: ldfld int32 TestFunction21/U::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.1 + IL_0056: ldfld int32 TestFunction21/U::item2 + IL_005b: stloc.s V_8 + .line 100001,100001 : 0,0 '' + IL_005d: ldloc.s V_7 + IL_005f: ldloc.s V_8 + IL_0061: bge.s IL_0065 + + .line 100001,100001 : 0,0 '' + IL_0063: ldc.i4.m1 + IL_0064: ret + + .line 100001,100001 : 0,0 '' + IL_0065: ldloc.s V_7 + IL_0067: ldloc.s V_8 + IL_0069: cgt + IL_006b: ret + + .line 100001,100001 : 0,0 '' + IL_006c: ldc.i4.1 + IL_006d: ret + + .line 100001,100001 : 0,0 '' + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 + + .line 100001,100001 : 0,0 '' + IL_0074: ldc.i4.m1 + IL_0075: ret + + .line 100001,100001 : 0,0 '' + IL_0076: ldc.i4.0 + IL_0077: ret + } // end of method U::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any TestFunction21/U + IL_0007: callvirt instance int32 TestFunction21/U::CompareTo(class TestFunction21/U) + IL_000c: ret + } // end of method U::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 130 (0x82) + .maxstack 4 + .locals init ([0] class TestFunction21/U V_0, + [1] class TestFunction21/U V_1, + [2] class TestFunction21/U V_2, + [3] int32 V_3, + [4] class [mscorlib]System.Collections.IComparer V_4, + [5] int32 V_5, + [6] int32 V_6, + [7] class [mscorlib]System.Collections.IComparer V_7, + [8] int32 V_8, + [9] int32 V_9) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any TestFunction21/U + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0073 + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.1 + IL_000e: unbox.any TestFunction21/U + IL_0013: ldnull + IL_0014: cgt.un + IL_0016: brfalse.s IL_0071 + + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 100001,100001 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldarg.2 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 TestFunction21/U::item1 + IL_0027: stloc.s V_5 + IL_0029: ldloc.2 + IL_002a: ldfld int32 TestFunction21/U::item1 + IL_002f: stloc.s V_6 + .line 100001,100001 : 0,0 '' + IL_0031: ldloc.s V_5 + IL_0033: ldloc.s V_6 + IL_0035: bge.s IL_003b + + .line 100001,100001 : 0,0 '' + IL_0037: ldc.i4.m1 + .line 100001,100001 : 0,0 '' + IL_0038: nop + IL_0039: br.s IL_0042 + + .line 100001,100001 : 0,0 '' + IL_003b: ldloc.s V_5 + IL_003d: ldloc.s V_6 + IL_003f: cgt + .line 100001,100001 : 0,0 '' + IL_0041: nop + .line 100001,100001 : 0,0 '' + IL_0042: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0043: ldloc.3 + IL_0044: ldc.i4.0 + IL_0045: bge.s IL_0049 + + .line 100001,100001 : 0,0 '' + IL_0047: ldloc.3 + IL_0048: ret + + .line 100001,100001 : 0,0 '' + IL_0049: ldloc.3 + IL_004a: ldc.i4.0 + IL_004b: ble.s IL_004f + + .line 100001,100001 : 0,0 '' + IL_004d: ldloc.3 + IL_004e: ret + + .line 100001,100001 : 0,0 '' + IL_004f: ldarg.2 + IL_0050: stloc.s V_7 + IL_0052: ldloc.1 + IL_0053: ldfld int32 TestFunction21/U::item2 + IL_0058: stloc.s V_8 + IL_005a: ldloc.2 + IL_005b: ldfld int32 TestFunction21/U::item2 + IL_0060: stloc.s V_9 + .line 100001,100001 : 0,0 '' + IL_0062: ldloc.s V_8 + IL_0064: ldloc.s V_9 + IL_0066: bge.s IL_006a + + .line 100001,100001 : 0,0 '' + IL_0068: ldc.i4.m1 + IL_0069: ret + + .line 100001,100001 : 0,0 '' + IL_006a: ldloc.s V_8 + IL_006c: ldloc.s V_9 + IL_006e: cgt + IL_0070: ret + + .line 100001,100001 : 0,0 '' + IL_0071: ldc.i4.1 + IL_0072: ret + + .line 100001,100001 : 0,0 '' + IL_0073: ldarg.1 + IL_0074: unbox.any TestFunction21/U + IL_0079: ldnull + IL_007a: cgt.un + IL_007c: brfalse.s IL_0080 + + .line 100001,100001 : 0,0 '' + IL_007e: ldc.i4.m1 + IL_007f: ret + + .line 100001,100001 : 0,0 '' + IL_0080: ldc.i4.0 + IL_0081: ret + } // end of method U::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 64 (0x40) + .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 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003e + + .line 100001,100001 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.0 + IL_0009: pop + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: stloc.1 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: ldc.i4 0x9e3779b9 + IL_0013: ldarg.1 + IL_0014: stloc.2 + IL_0015: ldloc.1 + IL_0016: ldfld int32 TestFunction21/U::item2 + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr + IL_0021: add + IL_0022: add + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldc.i4 0x9e3779b9 + IL_002a: ldarg.1 + IL_002b: stloc.3 + IL_002c: ldloc.1 + IL_002d: ldfld int32 TestFunction21/U::item1 + IL_0032: ldloc.0 + IL_0033: ldc.i4.6 + IL_0034: shl + IL_0035: ldloc.0 + IL_0036: ldc.i4.2 + IL_0037: shr + IL_0038: add + IL_0039: add + IL_003a: add + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldc.i4.0 + IL_003f: ret + } // end of method U::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method U::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 73 (0x49) + .maxstack 4 + .locals init ([0] class TestFunction21/U V_0, + [1] class TestFunction21/U V_1, + [2] class TestFunction21/U V_2, + [3] class TestFunction21/U V_3, + [4] class [mscorlib]System.Collections.IEqualityComparer V_4, + [5] class [mscorlib]System.Collections.IEqualityComparer V_5) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst TestFunction21/U + IL_000c: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_003f + + .line 100001,100001 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.2 + IL_001c: ldfld int32 TestFunction21/U::item1 + IL_0021: ldloc.3 + IL_0022: ldfld int32 TestFunction21/U::item1 + IL_0027: ceq + IL_0029: brfalse.s IL_003d + + .line 100001,100001 : 0,0 '' + IL_002b: ldarg.2 + IL_002c: stloc.s V_5 + IL_002e: ldloc.2 + IL_002f: ldfld int32 TestFunction21/U::item2 + IL_0034: ldloc.3 + IL_0035: ldfld int32 TestFunction21/U::item2 + IL_003a: ceq + IL_003c: ret + + .line 100001,100001 : 0,0 '' + IL_003d: ldc.i4.0 + IL_003e: ret + + .line 100001,100001 : 0,0 '' + IL_003f: ldc.i4.0 + IL_0040: ret + + .line 100001,100001 : 0,0 '' + IL_0041: ldarg.1 + IL_0042: ldnull + IL_0043: cgt.un + IL_0045: ldc.i4.0 + IL_0046: ceq + IL_0048: ret + } // end of method U::Equals + + .method public hidebysig virtual final + instance bool Equals(class TestFunction21/U obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 59 (0x3b) + .maxstack 4 + .locals init ([0] class TestFunction21/U V_0, + [1] class TestFunction21/U V_1) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 + + .line 100001,100001 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 + + .line 100001,100001 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: pop + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + .line 100001,100001 : 0,0 '' + 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_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_002f: ldc.i4.0 + IL_0030: ret + + .line 100001,100001 : 0,0 '' + IL_0031: ldc.i4.0 + IL_0032: ret + + .line 100001,100001 : 0,0 '' + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret + } // end of method U::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class TestFunction21/U V_0) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst TestFunction21/U + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 100001,100001 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool TestFunction21/U::Equals(class TestFunction21/U) + IL_0011: ret + + .line 100001,100001 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method U::Equals + + .property instance int32 Tag() + { + .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.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 TestFunction21/U::get_Tag() + } // end of property U::Tag + .property instance int32 Item1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 00 00 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 ) + .get instance int32 TestFunction21/U::get_Item1() + } // end of property U::Item1 + .property instance int32 Item2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 00 00 00 01 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 ) + .get instance int32 TestFunction21/U::get_Item2() + } // end of property U::Item2 + } // end of class U + + .class auto ansi serializable sealed nested assembly beforefieldinit 'TestFunction21@7-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 clo2 + .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 clo2) 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 TestFunction21/'TestFunction21@7-1'::clo2 + IL_000d: ret + } // end of method 'TestFunction21@7-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit + Invoke(int32 arg20) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 TestFunction21/'TestFunction21@7-1'::clo2 + IL_0006: ldarg.1 + IL_0007: tail. + IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000e: ret + } // end of method 'TestFunction21@7-1'::Invoke + + } // end of class 'TestFunction21@7-1' + + .class auto ansi serializable sealed nested assembly beforefieldinit TestFunction21@7 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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> clo1) 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> TestFunction21/TestFunction21@7::clo1 + IL_000d: ret + } // end of method TestFunction21@7::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + Invoke(int32 arg10) cil managed + { + // Code size 20 (0x14) + .maxstack 6 + .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 + IL_0007: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::Invoke(!0) + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: newobj instance void TestFunction21/'TestFunction21@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } // end of method TestFunction21@7::Invoke + + } // end of class TestFunction21@7 + + .method public static void TestFunction21(class TestFunction21/U _arg1) cil managed + { + // Code size 47 (0x2f) + .maxstack 5 + .locals init ([0] class TestFunction21/U V_0, + [1] int32 b, + [2] int32 a, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldfld int32 TestFunction21/U::item2 + IL_0008: stloc.1 + IL_0009: ldloc.0 + IL_000a: ldfld int32 TestFunction21/U::item1 + IL_000f: stloc.2 + .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) + IL_001f: stloc.3 + IL_0020: ldloc.3 + IL_0021: newobj instance void TestFunction21/TestFunction21@7::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0026: ldloc.2 + IL_0027: ldloc.1 + IL_0028: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !0, + !1) + IL_002d: pop + IL_002e: ret + } // end of method TestFunction21::TestFunction21 + +} // end of class TestFunction21 + +.class private abstract auto ansi sealed ''.$TestFunction21 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction21::main@ + +} // end of class ''.$TestFunction21 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction23.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction23.il.bsl new file mode 100644 index 00000000000..25c7d5cba86 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction23.il.bsl @@ -0,0 +1,200 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction23 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction23 +{ + // Offset: 0x00000000 Length: 0x0000033A +} +.mresource public FSharpOptimizationData.TestFunction23 +{ + // Offset: 0x00000340 Length: 0x000000E3 +} +.module TestFunction23.exe +// MVID: {61FD32BA-A643-451C-A745-0383BA32FD61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07260000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction23 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable nested public C + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly string x + .field assembly string x@8 + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // 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 + IL_001e: ret + } // end of method C::.ctor + + .method public hidebysig instance string + M() cil managed + { + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class TestFunction23/C self) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 9,9 : 23,30 '' + IL_0002: ldarg.0 + IL_0003: ldfld string TestFunction23/C::x@8 + IL_0008: ldarg.0 + IL_0009: callvirt instance string TestFunction23/C::g() + IL_000e: call string [mscorlib]System.String::Concat(string, + string) + IL_0013: ret + } // end of method C::M + + .method assembly hidebysig instance string + g() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + .line 7,7 : 15,16 '' + IL_0000: ldarg.0 + IL_0001: ldfld string TestFunction23/C::x + IL_0006: ret + } // end of method C::g + + } // end of class C + + .class auto ansi serializable sealed nested assembly beforefieldinit g@13 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class TestFunction23/g@13 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method g@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 34 (0x22) + .maxstack 8 + .line 13,13 : 9,24 '' + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + .line 14,14 : 9,24 '' + IL_0010: ldstr "Hello" + IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001a: tail. + IL_001c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0021: ret + } // end of method g@13::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void TestFunction23/g@13::.ctor() + IL_0005: stsfld class TestFunction23/g@13 TestFunction23/g@13::@_instance + IL_000a: ret + } // end of method g@13::.cctor + + } // end of class g@13 + + .method public static class [mscorlib]System.Tuple`2 + f(!!a x) cil managed + { + // Code size 26 (0x1a) + .maxstack 5 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) + .line 100001,100001 : 0,0 '' + IL_0000: ldsfld class TestFunction23/g@13 TestFunction23/g@13::@_instance + IL_0005: stloc.0 + .line 15,15 : 5,13 '' + IL_0006: ldloc.0 + IL_0007: ldnull + IL_0008: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000d: ldloc.0 + IL_000e: ldnull + IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0014: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0019: ret + } // end of method TestFunction23::f + +} // end of class TestFunction23 + +.class private abstract auto ansi sealed ''.$TestFunction23 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction23::main@ + +} // end of class ''.$TestFunction23 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction24.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction24.il.bsl new file mode 100644 index 00000000000..ba28389fd7d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction24.il.bsl @@ -0,0 +1,957 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction24 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction24 +{ + // Offset: 0x00000000 Length: 0x00000742 +} +.mresource public FSharpOptimizationData.TestFunction24 +{ + // Offset: 0x00000748 Length: 0x00000228 +} +.module TestFunction24.exe +// MVID: {61EFEE1F-A643-4587-A745-03831FEEEF61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07110000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction24 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested public Point + extends [mscorlib]System.Object + implements class [mscorlib]System.IEquatable`1, + [mscorlib]System.Collections.IStructuralEquatable, + class [mscorlib]System.IComparable`1, + [mscorlib]System.IComparable, + [mscorlib]System.Collections.IStructuralComparable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field public int32 x@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field public int32 y@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname + instance int32 get_x() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction24/Point::x@ + IL_0006: ret + } // end of method Point::get_x + + .method public hidebysig specialname + instance int32 get_y() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 TestFunction24/Point::y@ + IL_0006: ret + } // end of method Point::get_y + + .method public hidebysig specialname + instance void set_x(int32 'value') cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 TestFunction24/Point::x@ + IL_0007: ret + } // end of method Point::set_x + + .method public hidebysig specialname + instance void set_y(int32 'value') cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 TestFunction24/Point::y@ + IL_0007: ret + } // end of method Point::set_y + + .method public specialname rtspecialname + instance void .ctor(int32 x, + int32 y) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 TestFunction24/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 TestFunction24/Point::y@ + IL_0014: ret + } // end of method Point::.ctor + + .method public strict virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestFunction24/Point>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } // end of method Point::ToString + + .method public hidebysig virtual final + instance int32 CompareTo(class TestFunction24/Point obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 108 (0x6c) + .maxstack 4 + .locals init ([0] int32 V_0, + [1] class [mscorlib]System.Collections.IComparer V_1, + [2] int32 V_2, + [3] int32 V_3, + [4] class [mscorlib]System.Collections.IComparer V_4, + [5] int32 V_5, + [6] int32 V_6) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction24.fs' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0062 + + .line 16707566,16707566 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0060 + + .line 16707566,16707566 : 0,0 '' + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.1 + IL_0012: ldarg.0 + IL_0013: ldfld int32 TestFunction24/Point::x@ + IL_0018: stloc.2 + IL_0019: ldarg.1 + IL_001a: ldfld int32 TestFunction24/Point::x@ + IL_001f: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 + + .line 16707566,16707566 : 0,0 '' + IL_0024: ldc.i4.m1 + .line 16707566,16707566 : 0,0 '' + IL_0025: nop + IL_0026: br.s IL_002d + + .line 16707566,16707566 : 0,0 '' + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt + .line 16707566,16707566 : 0,0 '' + IL_002c: nop + .line 16707566,16707566 : 0,0 '' + IL_002d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 + + .line 16707566,16707566 : 0,0 '' + IL_0032: ldloc.0 + IL_0033: ret + + .line 16707566,16707566 : 0,0 '' + IL_0034: ldloc.0 + IL_0035: ldc.i4.0 + IL_0036: ble.s IL_003a + + .line 16707566,16707566 : 0,0 '' + IL_0038: ldloc.0 + IL_0039: ret + + .line 16707566,16707566 : 0,0 '' + IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_003f: stloc.s V_4 + IL_0041: ldarg.0 + IL_0042: ldfld int32 TestFunction24/Point::y@ + IL_0047: stloc.s V_5 + IL_0049: ldarg.1 + IL_004a: ldfld int32 TestFunction24/Point::y@ + IL_004f: stloc.s V_6 + .line 16707566,16707566 : 0,0 '' + IL_0051: ldloc.s V_5 + IL_0053: ldloc.s V_6 + IL_0055: bge.s IL_0059 + + .line 16707566,16707566 : 0,0 '' + IL_0057: ldc.i4.m1 + IL_0058: ret + + .line 16707566,16707566 : 0,0 '' + IL_0059: ldloc.s V_5 + IL_005b: ldloc.s V_6 + IL_005d: cgt + IL_005f: ret + + .line 16707566,16707566 : 0,0 '' + IL_0060: ldc.i4.1 + IL_0061: ret + + .line 16707566,16707566 : 0,0 '' + IL_0062: ldarg.1 + IL_0063: ldnull + IL_0064: cgt.un + IL_0066: brfalse.s IL_006a + + .line 16707566,16707566 : 0,0 '' + IL_0068: ldc.i4.m1 + IL_0069: ret + + .line 16707566,16707566 : 0,0 '' + IL_006a: ldc.i4.0 + IL_006b: ret + } // end of method Point::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any TestFunction24/Point + IL_0007: callvirt instance int32 TestFunction24/Point::CompareTo(class TestFunction24/Point) + IL_000c: ret + } // end of method Point::CompareTo + + .method public hidebysig virtual final + instance int32 CompareTo(object obj, + class [mscorlib]System.Collections.IComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 125 (0x7d) + .maxstack 4 + .locals init ([0] class TestFunction24/Point V_0, + [1] class TestFunction24/Point V_1, + [2] int32 V_2, + [3] class [mscorlib]System.Collections.IComparer V_3, + [4] int32 V_4, + [5] int32 V_5, + [6] class [mscorlib]System.Collections.IComparer V_6, + [7] int32 V_7, + [8] int32 V_8) + .line 16707566,16707566 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: unbox.any TestFunction24/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: ldnull + IL_000b: cgt.un + IL_000d: brfalse.s IL_006e + + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.1 + IL_0010: unbox.any TestFunction24/Point + IL_0015: ldnull + IL_0016: cgt.un + IL_0018: brfalse.s IL_006c + + .line 16707566,16707566 : 0,0 '' + IL_001a: ldarg.2 + IL_001b: stloc.3 + IL_001c: ldarg.0 + IL_001d: ldfld int32 TestFunction24/Point::x@ + IL_0022: stloc.s V_4 + IL_0024: ldloc.1 + IL_0025: ldfld int32 TestFunction24/Point::x@ + IL_002a: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: bge.s IL_0036 + + .line 16707566,16707566 : 0,0 '' + IL_0032: ldc.i4.m1 + .line 16707566,16707566 : 0,0 '' + IL_0033: nop + IL_0034: br.s IL_003d + + .line 16707566,16707566 : 0,0 '' + IL_0036: ldloc.s V_4 + IL_0038: ldloc.s V_5 + IL_003a: cgt + .line 16707566,16707566 : 0,0 '' + IL_003c: nop + .line 16707566,16707566 : 0,0 '' + IL_003d: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003e: ldloc.2 + IL_003f: ldc.i4.0 + IL_0040: bge.s IL_0044 + + .line 16707566,16707566 : 0,0 '' + IL_0042: ldloc.2 + IL_0043: ret + + .line 16707566,16707566 : 0,0 '' + IL_0044: ldloc.2 + IL_0045: ldc.i4.0 + IL_0046: ble.s IL_004a + + .line 16707566,16707566 : 0,0 '' + IL_0048: ldloc.2 + IL_0049: ret + + .line 16707566,16707566 : 0,0 '' + IL_004a: ldarg.2 + IL_004b: stloc.s V_6 + IL_004d: ldarg.0 + IL_004e: ldfld int32 TestFunction24/Point::y@ + IL_0053: stloc.s V_7 + IL_0055: ldloc.1 + IL_0056: ldfld int32 TestFunction24/Point::y@ + IL_005b: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' + IL_005d: ldloc.s V_7 + IL_005f: ldloc.s V_8 + IL_0061: bge.s IL_0065 + + .line 16707566,16707566 : 0,0 '' + IL_0063: ldc.i4.m1 + IL_0064: ret + + .line 16707566,16707566 : 0,0 '' + IL_0065: ldloc.s V_7 + IL_0067: ldloc.s V_8 + IL_0069: cgt + IL_006b: ret + + .line 16707566,16707566 : 0,0 '' + IL_006c: ldc.i4.1 + IL_006d: ret + + .line 16707566,16707566 : 0,0 '' + IL_006e: ldarg.1 + IL_006f: unbox.any TestFunction24/Point + IL_0074: ldnull + IL_0075: cgt.un + IL_0077: brfalse.s IL_007b + + .line 16707566,16707566 : 0,0 '' + IL_0079: ldc.i4.m1 + IL_007a: ret + + .line 16707566,16707566 : 0,0 '' + IL_007b: ldc.i4.0 + IL_007c: ret + } // end of method Point::CompareTo + + .method public hidebysig virtual final + instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 58 (0x3a) + .maxstack 7 + .locals init ([0] int32 V_0, + [1] class [mscorlib]System.Collections.IEqualityComparer V_1, + [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 16707566,16707566 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0038 + + .line 16707566,16707566 : 0,0 '' + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldc.i4 0x9e3779b9 + IL_000d: ldarg.1 + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldfld int32 TestFunction24/Point::y@ + IL_0015: ldloc.0 + IL_0016: ldc.i4.6 + IL_0017: shl + IL_0018: ldloc.0 + IL_0019: ldc.i4.2 + IL_001a: shr + IL_001b: add + IL_001c: add + IL_001d: add + IL_001e: stloc.0 + IL_001f: ldc.i4 0x9e3779b9 + IL_0024: ldarg.1 + IL_0025: stloc.2 + IL_0026: ldarg.0 + IL_0027: ldfld int32 TestFunction24/Point::x@ + IL_002c: ldloc.0 + IL_002d: ldc.i4.6 + IL_002e: shl + IL_002f: ldloc.0 + IL_0030: ldc.i4.2 + IL_0031: shr + IL_0032: add + IL_0033: add + IL_0034: add + IL_0035: stloc.0 + IL_0036: ldloc.0 + IL_0037: ret + + .line 16707566,16707566 : 0,0 '' + IL_0038: ldc.i4.0 + IL_0039: ret + } // end of method Point::GetHashCode + + .method public hidebysig virtual final + instance int32 GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 8 + 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) + IL_000b: ret + } // end of method Point::GetHashCode + + .method public hidebysig virtual final + instance bool Equals(object obj, + 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) + .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 16707566,16707566 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0039 + + .line 16707566,16707566 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: isinst TestFunction24/Point + IL_000c: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0037 + + .line 16707566,16707566 : 0,0 '' + IL_0010: ldloc.0 + IL_0011: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0012: ldarg.2 + IL_0013: stloc.2 + IL_0014: ldarg.0 + IL_0015: ldfld int32 TestFunction24/Point::x@ + IL_001a: ldloc.1 + IL_001b: ldfld int32 TestFunction24/Point::x@ + IL_0020: ceq + IL_0022: brfalse.s IL_0035 + + .line 16707566,16707566 : 0,0 '' + IL_0024: ldarg.2 + IL_0025: stloc.3 + IL_0026: ldarg.0 + IL_0027: ldfld int32 TestFunction24/Point::y@ + IL_002c: ldloc.1 + IL_002d: ldfld int32 TestFunction24/Point::y@ + IL_0032: ceq + IL_0034: ret + + .line 16707566,16707566 : 0,0 '' + IL_0035: ldc.i4.0 + IL_0036: ret + + .line 16707566,16707566 : 0,0 '' + IL_0037: ldc.i4.0 + IL_0038: ret + + .line 16707566,16707566 : 0,0 '' + IL_0039: ldarg.1 + IL_003a: ldnull + IL_003b: cgt.un + IL_003d: ldc.i4.0 + IL_003e: ceq + IL_0040: ret + } // end of method Point::Equals + + .method public hidebysig virtual final + instance bool Equals(class TestFunction24/Point obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 53 (0x35) + .maxstack 8 + .line 16707566,16707566 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002d + + .line 16707566,16707566 : 0,0 '' + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_002b + + .line 16707566,16707566 : 0,0 '' + IL_000c: ldarg.0 + IL_000d: ldfld int32 TestFunction24/Point::x@ + IL_0012: ldarg.1 + IL_0013: ldfld int32 TestFunction24/Point::x@ + IL_0018: bne.un.s IL_0029 + + .line 16707566,16707566 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: ldfld int32 TestFunction24/Point::y@ + IL_0020: ldarg.1 + IL_0021: ldfld int32 TestFunction24/Point::y@ + IL_0026: ceq + IL_0028: ret + + .line 16707566,16707566 : 0,0 '' + IL_0029: ldc.i4.0 + IL_002a: ret + + .line 16707566,16707566 : 0,0 '' + IL_002b: ldc.i4.0 + IL_002c: ret + + .line 16707566,16707566 : 0,0 '' + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } // end of method Point::Equals + + .method public hidebysig virtual final + instance bool Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 20 (0x14) + .maxstack 4 + .locals init ([0] class TestFunction24/Point V_0) + .line 16707566,16707566 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: isinst TestFunction24/Point + IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + .line 16707566,16707566 : 0,0 '' + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool TestFunction24/Point::Equals(class TestFunction24/Point) + IL_0011: ret + + .line 16707566,16707566 : 0,0 '' + IL_0012: ldc.i4.0 + IL_0013: ret + } // end of method Point::Equals + + .property instance int32 x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .set instance void TestFunction24/Point::set_x(int32) + .get instance int32 TestFunction24/Point::get_x() + } // end of property Point::x + .property instance int32 y() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .set instance void TestFunction24/Point::set_y(int32) + .get instance int32 TestFunction24/Point::get_y() + } // end of property Point::y + } // end of class Point + + .method public static int32 pinObject() cil managed + { + // Code size 66 (0x42) + .maxstack 6 + .locals init ([0] class TestFunction24/Point point, + [1] native int p1, + [2] int32& pinned V_2, + [3] native int V_3, + [4] int32 V_4, + [5] native int V_5, + [6] int32 V_6) + .line 7,7 : 5,33 '' + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void TestFunction24/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + .line 8,8 : 5,28 '' + IL_0008: ldloc.0 + IL_0009: ldflda int32 TestFunction24/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + .line 9,9 : 5,44 '' + IL_0012: ldloc.1 + IL_0013: stloc.3 + IL_0014: ldc.i4.0 + IL_0015: stloc.s V_4 + IL_0017: ldloc.3 + IL_0018: ldloc.s V_4 + IL_001a: conv.i + IL_001b: sizeof [mscorlib]System.Int32 + IL_0021: mul + IL_0022: add + IL_0023: ldobj [mscorlib]System.Int32 + IL_0028: ldloc.1 + IL_0029: stloc.s V_5 + IL_002b: ldc.i4.1 + IL_002c: stloc.s V_6 + IL_002e: ldloc.s V_5 + IL_0030: ldloc.s V_6 + IL_0032: conv.i + IL_0033: sizeof [mscorlib]System.Int32 + IL_0039: mul + IL_003a: add + IL_003b: ldobj [mscorlib]System.Int32 + IL_0040: add + IL_0041: ret + } // end of method TestFunction24::pinObject + + .method public static int32 pinRef() cil managed + { + // Code size 32 (0x20) + .maxstack 4 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 point, + [1] native int p1, + [2] int32& pinned V_2) + .line 12,12 : 5,23 '' + IL_0000: ldc.i4.s 17 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.0 + .line 13,13 : 5,35 '' + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + .line 14,14 : 5,42 '' + IL_0012: ldloc.1 + IL_0013: ldobj [mscorlib]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [mscorlib]System.Int32 + IL_001e: add + IL_001f: ret + } // end of method TestFunction24::pinRef + + .method public static float64 pinArray1() cil managed + { + // Code size 188 (0xbc) + .maxstack 6 + .locals init ([0] float64[] arr, + [1] native int p1, + [2] float64[] V_2, + [3] float64& pinned V_3, + [4] native int V_4, + [5] int32 V_5, + [6] native int V_6, + [7] int32 V_7) + .line 17,17 : 5,49 '' + IL_0000: ldc.i4.6 + IL_0001: newarr [mscorlib]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [mscorlib]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [mscorlib]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [mscorlib]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [mscorlib]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4. + IL_0051: stelem [mscorlib]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [mscorlib]System.Double + IL_0066: stloc.0 + .line 18,18 : 5,23 '' + IL_0067: ldloc.0 + IL_0068: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0069: ldloc.2 + IL_006a: brfalse.s IL_0086 + + .line 16707566,16707566 : 0,0 '' + IL_006c: ldloc.2 + IL_006d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0072: brfalse.s IL_0081 + + .line 16707566,16707566 : 0,0 '' + IL_0074: ldloc.2 + IL_0075: ldc.i4.0 + IL_0076: ldelema [mscorlib]System.Double + IL_007b: stloc.3 + IL_007c: ldloc.3 + IL_007d: conv.i + .line 16707566,16707566 : 0,0 '' + IL_007e: nop + IL_007f: br.s IL_0089 + + .line 16707566,16707566 : 0,0 '' + IL_0081: ldc.i4.0 + IL_0082: conv.i + .line 16707566,16707566 : 0,0 '' + IL_0083: nop + IL_0084: br.s IL_0089 + + .line 16707566,16707566 : 0,0 '' + IL_0086: ldc.i4.0 + IL_0087: conv.i + .line 16707566,16707566 : 0,0 '' + IL_0088: nop + .line 16707566,16707566 : 0,0 '' + IL_0089: stloc.1 + .line 19,19 : 5,44 '' + IL_008a: ldloc.1 + IL_008b: stloc.s V_4 + IL_008d: ldc.i4.0 + IL_008e: stloc.s V_5 + IL_0090: ldloc.s V_4 + IL_0092: ldloc.s V_5 + IL_0094: conv.i + IL_0095: sizeof [mscorlib]System.Double + IL_009b: mul + IL_009c: add + IL_009d: ldobj [mscorlib]System.Double + IL_00a2: ldloc.1 + IL_00a3: stloc.s V_6 + IL_00a5: ldc.i4.1 + IL_00a6: stloc.s V_7 + IL_00a8: ldloc.s V_6 + IL_00aa: ldloc.s V_7 + IL_00ac: conv.i + IL_00ad: sizeof [mscorlib]System.Double + IL_00b3: mul + IL_00b4: add + IL_00b5: ldobj [mscorlib]System.Double + IL_00ba: add + IL_00bb: ret + } // end of method TestFunction24::pinArray1 + + .method public static float64 pinArray2() cil managed + { + // Code size 162 (0xa2) + .maxstack 6 + .locals init ([0] float64[] arr, + [1] native int p, + [2] float64& pinned V_2, + [3] native int V_3, + [4] int32 V_4, + [5] native int V_5, + [6] int32 V_6) + .line 22,22 : 5,49 '' + IL_0000: ldc.i4.6 + IL_0001: newarr [mscorlib]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [mscorlib]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [mscorlib]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [mscorlib]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [mscorlib]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4. + IL_0051: stelem [mscorlib]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [mscorlib]System.Double + IL_0066: stloc.0 + .line 24,24 : 5,27 '' + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [mscorlib]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + .line 25,25 : 5,42 '' + IL_0072: ldloc.1 + IL_0073: stloc.3 + IL_0074: ldc.i4.0 + IL_0075: stloc.s V_4 + IL_0077: ldloc.3 + IL_0078: ldloc.s V_4 + IL_007a: conv.i + IL_007b: sizeof [mscorlib]System.Double + IL_0081: mul + IL_0082: add + IL_0083: ldobj [mscorlib]System.Double + IL_0088: ldloc.1 + IL_0089: stloc.s V_5 + IL_008b: ldc.i4.1 + IL_008c: stloc.s V_6 + IL_008e: ldloc.s V_5 + IL_0090: ldloc.s V_6 + IL_0092: conv.i + IL_0093: sizeof [mscorlib]System.Double + IL_0099: mul + IL_009a: add + IL_009b: ldobj [mscorlib]System.Double + IL_00a0: add + IL_00a1: ret + } // end of method TestFunction24::pinArray2 + + .method public static class [mscorlib]System.Tuple`2 + pinString() cil managed + { + // Code size 77 (0x4d) + .maxstack 6 + .locals init ([0] string str, + [1] native int pChar, + [2] string pinned V_2, + [3] native int V_3, + [4] int32 V_4, + [5] native int V_5, + [6] int32 V_6) + .line 28,28 : 5,28 '' + IL_0000: ldstr "Hello World" + IL_0005: stloc.0 + .line 30,30 : 5,26 '' + IL_0006: ldloc.0 + IL_0007: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0008: ldloc.2 + IL_0009: brfalse.s IL_0016 + + .line 16707566,16707566 : 0,0 '' + IL_000b: ldloc.2 + IL_000c: conv.i + IL_000d: call int32 [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + .line 16707566,16707566 : 0,0 '' + IL_0013: nop + IL_0014: br.s IL_0018 + + .line 16707566,16707566 : 0,0 '' + IL_0016: ldloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0017: nop + .line 16707566,16707566 : 0,0 '' + IL_0018: stloc.1 + .line 31,31 : 5,50 '' + IL_0019: ldloc.1 + IL_001a: stloc.3 + IL_001b: ldc.i4.0 + IL_001c: stloc.s V_4 + IL_001e: ldloc.3 + IL_001f: ldloc.s V_4 + IL_0021: conv.i + IL_0022: sizeof [mscorlib]System.Char + IL_0028: mul + IL_0029: add + IL_002a: ldobj [mscorlib]System.Char + IL_002f: ldloc.1 + IL_0030: stloc.s V_5 + IL_0032: ldc.i4.1 + IL_0033: stloc.s V_6 + IL_0035: ldloc.s V_5 + IL_0037: ldloc.s V_6 + IL_0039: conv.i + IL_003a: sizeof [mscorlib]System.Char + IL_0040: mul + IL_0041: add + IL_0042: ldobj [mscorlib]System.Char + IL_0047: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_004c: ret + } // end of method TestFunction24::pinString + +} // end of class TestFunction24 + +.class private abstract auto ansi sealed ''.$TestFunction24 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction24::main@ + +} // end of class ''.$TestFunction24 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3.fs new file mode 100644 index 00000000000..8523e4af661 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3.fs @@ -0,0 +1,15 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction1() = + printfn "Hello"; + printfn "World"; + 3+4 + +let TestFunction3() = + try + let x = TestFunction1() + printfn "Hello"; + with _ -> + printfn "World" + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3b.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3b.fs new file mode 100644 index 00000000000..718fcad9f2e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3b.fs @@ -0,0 +1,15 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction1() = + printfn "Hello"; + printfn "World"; + 3+4 + +let TestFunction3b() = + try + let x = TestFunction1() + failwith "hello" + with Failure _ -> + printfn "World" + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3b.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3b.il.bsl new file mode 100644 index 00000000000..605bb5ca37b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3b.il.bsl @@ -0,0 +1,148 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction3b +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction3b +{ + // Offset: 0x00000000 Length: 0x000001FC +} +.mresource public FSharpOptimizationData.TestFunction3b +{ + // Offset: 0x00000200 Length: 0x0000008A +} +.module TestFunction3b.exe +// MVID: {611C4D9E-A662-4FC9-A745-03839E4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x053D0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction3b + extends [mscorlib]System.Object +{ + .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 TestFunction1() cil managed + { + // Code size 36 (0x24) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction3b.fs' + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + .line 6,6 : 5,20 '' + IL_0010: ldstr "World" + IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001f: pop + .line 7,7 : 5,8 '' + IL_0020: ldc.i4.3 + IL_0021: ldc.i4.4 + IL_0022: add + IL_0023: ret + } // end of method TestFunction3b::TestFunction1 + + .method public static void TestFunction3b() cil managed + { + // Code size 66 (0x42) + .maxstack 3 + .locals init ([0] int32 x, + [1] string V_1, + [2] class [mscorlib]System.Exception V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3) + .line 10,10 : 5,8 '' + .try + { + IL_0000: nop + .line 11,11 : 8,31 '' + IL_0001: call int32 TestFunction3b::TestFunction1() + IL_0006: stloc.0 + .line 12,12 : 8,24 '' + IL_0007: ldstr "hello" + IL_000c: stloc.1 + IL_000d: ldloc.1 + IL_000e: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_0013: throw + + .line 13,13 : 5,9 '' + } // end .try + catch [mscorlib]System.Object + { + IL_0014: castclass [mscorlib]System.Exception + IL_0019: stloc.2 + IL_001a: ldloc.2 + IL_001b: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [mscorlib]System.Exception) + IL_0020: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0021: ldloc.3 + IL_0022: brfalse.s IL_0036 + + .line 14,14 : 8,23 '' + IL_0024: ldstr "World" + IL_0029: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0033: pop + IL_0034: leave.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_0036: rethrow + IL_0038: ldnull + IL_0039: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_003e: pop + IL_003f: leave.s IL_0041 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0041: ret + } // end of method TestFunction3b::TestFunction3b + +} // end of class TestFunction3b + +.class private abstract auto ansi sealed ''.$TestFunction3b + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction3b::main@ + +} // end of class ''.$TestFunction3b + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3c.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3c.fs new file mode 100644 index 00000000000..6ac75909fd4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3c.fs @@ -0,0 +1,15 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction1() = + printfn "Hello"; + printfn "World"; + 3+4 + +let TestFunction3c() = + try + let x = TestFunction1() + failwith "hello" + with Failure msg when msg = "hello" -> + printfn "World" + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3c.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3c.il.bsl new file mode 100644 index 00000000000..4db042320d2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction3c.il.bsl @@ -0,0 +1,170 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .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 TestFunction3c +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction3c +{ + // Offset: 0x00000000 Length: 0x000001FC +} +.mresource public FSharpOptimizationData.TestFunction3c +{ + // Offset: 0x00000200 Length: 0x0000008A +} +.module TestFunction3c.exe +// MVID: {61F2AFF9-A662-4FAC-A745-0383F9AFF261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07520000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction3c + extends [mscorlib]System.Object +{ + .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 TestFunction1() cil managed + { + // Code size 36 (0x24) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction3c.fs' + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + .line 6,6 : 5,20 '' + IL_0010: ldstr "World" + IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001f: pop + .line 7,7 : 5,8 '' + IL_0020: ldc.i4.3 + IL_0021: ldc.i4.4 + IL_0022: add + IL_0023: ret + } // end of method TestFunction3c::TestFunction1 + + .method public static void TestFunction3c() cil managed + { + // Code size 96 (0x60) + .maxstack 4 + .locals init ([0] int32 x, + [1] string V_1, + [2] class [mscorlib]System.Exception V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3, + [4] string msg, + [5] string V_5) + .line 10,10 : 5,8 '' + .try + { + IL_0000: nop + .line 11,11 : 8,31 '' + IL_0001: call int32 TestFunction3c::TestFunction1() + IL_0006: stloc.0 + .line 12,12 : 8,24 '' + IL_0007: ldstr "hello" + IL_000c: stloc.1 + IL_000d: ldloc.1 + IL_000e: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_0013: throw + + .line 13,13 : 5,9 '' + } // end .try + catch [mscorlib]System.Object + { + IL_0014: castclass [mscorlib]System.Exception + IL_0019: stloc.2 + IL_001a: ldloc.2 + IL_001b: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [mscorlib]System.Exception) + IL_0020: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0021: ldloc.3 + IL_0022: brfalse.s IL_0054 + + .line 100001,100001 : 0,0 '' + 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_002c: ldloc.s msg + IL_002e: ldstr "hello" + IL_0033: call bool [netstandard]System.String::Equals(string, + string) + IL_0038: brfalse.s IL_0054 + + .line 100001,100001 : 0,0 '' + 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_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_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_005f: ret + } // end of method TestFunction3c::TestFunction3c + +} // end of class TestFunction3c + +.class private abstract auto ansi sealed ''.$TestFunction3c + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction3c::main@ + +} // end of class ''.$TestFunction3c + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction4.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction4.fs new file mode 100644 index 00000000000..8dd2053fc92 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction4.fs @@ -0,0 +1,14 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction1() = + printfn "Hello"; + printfn "World"; + 3+4 + +let TestFunction4() = + try + let x = TestFunction1() + printfn "Hello"; + finally + printfn "World" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction5.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction5.fs new file mode 100644 index 00000000000..1381ac748bf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction5.fs @@ -0,0 +1,15 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction1() = + printfn "Hello"; + printfn "World"; + 3+4 + +let TestFunction5() = + let x = + let y = TestFunction1() + printfn "Hello"; + y + y + x + x + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction6.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction6.fs new file mode 100644 index 00000000000..c4d2e3c30d0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction6.fs @@ -0,0 +1,15 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction1() = + printfn "Hello"; + printfn "World"; + 3+4 + +let TestFunction6() = + let f() = + let y = TestFunction1() + printfn "Hello"; + y + y + f() + f() + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction7.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction7.fs new file mode 100644 index 00000000000..f926ade1046 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction7.fs @@ -0,0 +1,7 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction7() = + let mutable r = 0 + while r < 3 do + r <- r + 1 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction8.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction8.fs new file mode 100644 index 00000000000..6a8cbe53af2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction8.fs @@ -0,0 +1,7 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction8(x) = + if x > 3 then + x+4 + else x-4 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9.fs new file mode 100644 index 00000000000..ec0cec8af86 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9.fs @@ -0,0 +1,8 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction9(x) = + match x with + | 3 -> "three" + | 4 -> "four" + | _ -> "five" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b.fs new file mode 100644 index 00000000000..5231635ca80 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b.fs @@ -0,0 +1,9 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction9b(x) = + match x with + | [1;2] -> "three" + | [3;4] -> "seven" + | [a;b] when a+b = 4 -> "four" + | _ -> "big" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b1.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b1.fs new file mode 100644 index 00000000000..5231635ca80 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b1.fs @@ -0,0 +1,9 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction9b(x) = + match x with + | [1;2] -> "three" + | [3;4] -> "seven" + | [a;b] when a+b = 4 -> "four" + | _ -> "big" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b2.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b2.fs new file mode 100644 index 00000000000..5231635ca80 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b2.fs @@ -0,0 +1,9 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction9b(x) = + match x with + | [1;2] -> "three" + | [3;4] -> "seven" + | [a;b] when a+b = 4 -> "four" + | _ -> "big" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b3.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b3.fs new file mode 100644 index 00000000000..5231635ca80 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b3.fs @@ -0,0 +1,9 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light + +let TestFunction9b(x) = + match x with + | [1;2] -> "three" + | [3;4] -> "seven" + | [a;b] when a+b = 4 -> "four" + | _ -> "big" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b4.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b4.fs new file mode 100644 index 00000000000..e2cd598647c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b4.fs @@ -0,0 +1,14 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:2484 +// Note: we might see changes related to another bug +// related to spans +#light + +[] +let Null = null + +let x = 5 + +match box x with // bp here + | Null -> printfn "Is null" // bp here + | _ -> () diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl new file mode 100644 index 00000000000..0a73ff703ff --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl @@ -0,0 +1,128 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction9b4 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction9b4 +{ + // Offset: 0x00000000 Length: 0x00000240 +} +.mresource public FSharpOptimizationData.TestFunction9b4 +{ + // Offset: 0x00000248 Length: 0x00000085 +} +.module TestFunction9b4.exe +// MVID: {61E07031-A091-56C1-A745-03833170E061} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x068D0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction9b4 + extends [mscorlib]System.Object +{ + .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 !!a Null() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 3 + .locals init (!!a V_0) + IL_0000: ldloc.0 + IL_0001: ret + } // end of method TestFunction9b4::Null + + .method public specialname static int32 + get_x() 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 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.5 + IL_0001: ret + } // end of method TestFunction9b4::get_x + + .property int32 x() + { + .get int32 TestFunction9b4::get_x() + } // end of property TestFunction9b4::x +} // end of class TestFunction9b4 + +.class private abstract auto ansi sealed ''.$TestFunction9b4 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 43 (0x2b) + .maxstack 3 + .locals init ([0] int32 x) + .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 '' + IL_0006: nop + .line 100001,100001 : 0,0 '' + IL_0007: call int32 TestFunction9b4::get_x() + IL_000c: box [mscorlib]System.Int32 + IL_0011: brfalse.s IL_0015 + + IL_0013: br.s IL_0028 + + .line 13,13 : 13,30 '' + IL_0015: ldstr "Is null" + IL_001a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0024: pop + .line 100001,100001 : 0,0 '' + IL_0025: nop + IL_0026: br.s IL_002a + + .line 14,14 : 10,12 '' + IL_0028: nop + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ret + } // end of method $TestFunction9b4::main@ + +} // end of class ''.$TestFunction9b4 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction11.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction11.il.bsl new file mode 100644 index 00000000000..98835e2b7b8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction11.il.bsl @@ -0,0 +1,98 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction11 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction11 +{ + // Offset: 0x00000000 Length: 0x000001E4 +} +.mresource public FSharpOptimizationData.TestFunction11 +{ + // Offset: 0x000001E8 Length: 0x00000072 +} +.module TestFunction11.exe +// MVID: {60B68B97-A624-45E6-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x064D0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction11 + extends [mscorlib]System.Object +{ + .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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + TestFunction11(int32 p) cil managed + { + // Code size 30 (0x1e) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,27 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction11.fs' + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: ldarg.0 + IL_0003: add + IL_0004: ldarg.0 + IL_0005: ldarg.0 + IL_0006: add + IL_0007: ldarg.0 + IL_0008: add + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0013: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0018: 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_001d: ret + } // end of method TestFunction11::TestFunction11 + +} // end of class TestFunction11 + +.class private abstract auto ansi sealed ''.$TestFunction11 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction11::main@ + +} // end of class ''.$TestFunction11 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction12.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction12.il.bsl new file mode 100644 index 00000000000..2a841ada06d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction12.il.bsl @@ -0,0 +1,86 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction12 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction12 +{ + // Offset: 0x00000000 Length: 0x000001D7 +} +.mresource public FSharpOptimizationData.TestFunction12 +{ + // Offset: 0x000001E0 Length: 0x00000072 +} +.module TestFunction12.exe +// MVID: {60B68B97-A624-4539-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x070C0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction12 + extends [mscorlib]System.Object +{ + .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 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 + TestFunction12(int32 p) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction12.fs' + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: add + IL_0003: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0008: ret + } // end of method TestFunction12::TestFunction12 + +} // end of class TestFunction12 + +.class private abstract auto ansi sealed ''.$TestFunction12 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction12::main@ + +} // end of class ''.$TestFunction12 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction15.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction15.il.bsl new file mode 100644 index 00000000000..19ecc6f1b00 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction15.il.bsl @@ -0,0 +1,146 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction15 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction15 +{ + // Offset: 0x00000000 Length: 0x000001E6 +} +.mresource public FSharpOptimizationData.TestFunction15 +{ + // Offset: 0x000001F0 Length: 0x00000072 +} +.module TestFunction15.exe +// MVID: {6197D1F9-A624-4662-A745-0383F9D19761} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06AD0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction15 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit TestFunction15@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class TestFunction15/TestFunction15@6 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method TestFunction15@6::.ctor + + .method public strict virtual instance int32 + Invoke(int32 x) cil managed + { + // Code size 4 (0x4) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 6,6 : 35,40 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction15.fs' + IL_0000: ldarg.1 + IL_0001: ldc.i4.1 + IL_0002: add + IL_0003: ret + } // end of method TestFunction15@6::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void TestFunction15/TestFunction15@6::.ctor() + IL_0005: stsfld class TestFunction15/TestFunction15@6 TestFunction15/TestFunction15@6::@_instance + IL_000a: ret + } // end of method TestFunction15@6::.cctor + + } // end of class TestFunction15@6 + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + TestFunction15(int32 inp) cil managed + { + // Code size 42 (0x2a) + .maxstack 6 + .locals init ([0] int32 x, + [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'Pipe #1 input at line 6') + .line 5,5 : 5,18 '' + IL_0000: ldarg.0 + IL_0001: ldc.i4.1 + IL_0002: add + IL_0003: stloc.0 + .line 6,6 : 5,12 '' + IL_0004: ldc.i4.1 + IL_0005: ldc.i4.2 + IL_0006: ldc.i4.3 + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000c: 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_0011: 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_0016: 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_001b: stloc.1 + .line 6,6 : 16,41 '' + IL_001c: ldsfld class TestFunction15/TestFunction15@6 TestFunction15/TestFunction15@6::@_instance + IL_0021: ldloc.1 + IL_0022: tail. + IL_0024: 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_0029: ret + } // end of method TestFunction15::TestFunction15 + +} // end of class TestFunction15 + +.class private abstract auto ansi sealed ''.$TestFunction15 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction15::main@ + +} // end of class ''.$TestFunction15 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction18.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction18.il.bsl new file mode 100644 index 00000000000..17e117dad82 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction18.il.bsl @@ -0,0 +1,83 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction18 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction18 +{ + // Offset: 0x00000000 Length: 0x000001E1 +} +.mresource public FSharpOptimizationData.TestFunction18 +{ + // Offset: 0x000001E8 Length: 0x00000072 +} +.module TestFunction18.exe +// MVID: {60B68B97-A624-4603-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x09850000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction18 + extends [mscorlib]System.Object +{ + .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 TestFunction18(!!a inp) cil managed + { + // Code size 11 (0xb) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,38 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction18.fs' + IL_0000: ldstr "hello" + IL_0005: call void [mscorlib]System.Console::WriteLine(string) + IL_000a: ret + } // end of method TestFunction18::TestFunction18 + +} // end of class TestFunction18 + +.class private abstract auto ansi sealed ''.$TestFunction18 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction18::main@ + +} // end of class ''.$TestFunction18 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction2.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction2.il.bsl new file mode 100644 index 00000000000..21e84cf567b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction2.il.bsl @@ -0,0 +1,115 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction2 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction2 +{ + // Offset: 0x00000000 Length: 0x000001F9 +} +.mresource public FSharpOptimizationData.TestFunction2 +{ + // Offset: 0x00000200 Length: 0x00000088 +} +.module TestFunction2.exe +// MVID: {60B68B97-661D-8929-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x071A0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction2 + extends [mscorlib]System.Object +{ + .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 TestFunction1() cil managed + { + // Code size 36 (0x24) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction2.fs' + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + .line 6,6 : 5,20 '' + IL_0010: ldstr "World" + IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001f: pop + .line 7,7 : 5,8 '' + IL_0020: ldc.i4.3 + IL_0021: ldc.i4.4 + IL_0022: add + IL_0023: ret + } // end of method TestFunction2::TestFunction1 + + .method public static void TestFunction2() cil managed + { + // Code size 39 (0x27) + .maxstack 3 + .locals init ([0] int32 x) + .line 10,10 : 5,28 '' + IL_0000: call int32 TestFunction2::TestFunction1() + IL_0005: stloc.0 + .line 11,11 : 5,20 '' + IL_0006: ldstr "Hello" + IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0015: pop + .line 12,12 : 5,20 '' + IL_0016: ldstr "World" + IL_001b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0020: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0025: pop + IL_0026: ret + } // end of method TestFunction2::TestFunction2 + +} // end of class TestFunction2 + +.class private abstract auto ansi sealed ''.$TestFunction2 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction2::main@ + +} // end of class ''.$TestFunction2 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22.fs new file mode 100644 index 00000000000..0a15c1e7f3e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22.il.bsl new file mode 100644 index 00000000000..23600d9913f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22.il.bsl @@ -0,0 +1,79 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Testfunction22 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Testfunction22 +{ + // Offset: 0x00000000 Length: 0x00000157 +} +.mresource public FSharpOptimizationData.Testfunction22 +{ + // Offset: 0x00000160 Length: 0x00000055 +} +.module Testfunction22.exe +// MVID: {60B68B97-5AA3-4518-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05220000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Testfunction22 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Testfunction22 + +.class private abstract auto ansi sealed ''.$Testfunction22 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 : 1,27 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22.fs' + IL_0000: call void [mscorlib]System.Console::WriteLine() + IL_0005: ret + } // end of method $Testfunction22::main@ + +} // end of class ''.$Testfunction22 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22b.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22b.fs new file mode 100644 index 00000000000..b0bb870e52c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22b.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +let _ = System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22b.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22b.il.bsl new file mode 100644 index 00000000000..aea4e753718 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22b.il.bsl @@ -0,0 +1,79 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Testfunction22b +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Testfunction22b +{ + // Offset: 0x00000000 Length: 0x00000159 +} +.mresource public FSharpOptimizationData.Testfunction22b +{ + // Offset: 0x00000160 Length: 0x00000056 +} +.module Testfunction22b.exe +// MVID: {60B68B97-8504-18B7-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00AF0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Testfunction22b + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Testfunction22b + +.class private abstract auto ansi sealed ''.$Testfunction22b + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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@ + +} // end of class ''.$Testfunction22b + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22c.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22c.fs new file mode 100644 index 00000000000..107a0547a4c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22c.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +let () = System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22c.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22c.il.bsl new file mode 100644 index 00000000000..19f08efe5bf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22c.il.bsl @@ -0,0 +1,79 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Testfunction22c +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Testfunction22c +{ + // Offset: 0x00000000 Length: 0x00000159 +} +.mresource public FSharpOptimizationData.Testfunction22c +{ + // Offset: 0x00000160 Length: 0x00000056 +} +.module Testfunction22c.exe +// MVID: {60B68B97-459D-3DF8-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00F10000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Testfunction22c + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Testfunction22c + +.class private abstract auto ansi sealed ''.$Testfunction22c + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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@ + +} // end of class ''.$Testfunction22c + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22d.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22d.fs new file mode 100644 index 00000000000..9e9cf22b6dd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22d.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +do System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22d.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22d.il.bsl new file mode 100644 index 00000000000..1621b79b127 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22d.il.bsl @@ -0,0 +1,79 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Testfunction22d +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Testfunction22d +{ + // Offset: 0x00000000 Length: 0x00000159 +} +.mresource public FSharpOptimizationData.Testfunction22d +{ + // Offset: 0x00000160 Length: 0x00000056 +} +.module Testfunction22d.exe +// MVID: {60B68B97-FDCA-89B1-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00E60000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Testfunction22d + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Testfunction22d + +.class private abstract auto ansi sealed ''.$Testfunction22d + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 : 4,30 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22d.fs' + IL_0000: call void [mscorlib]System.Console::WriteLine() + IL_0005: ret + } // end of method $Testfunction22d::main@ + +} // end of class ''.$Testfunction22d + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22e.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22e.fs new file mode 100644 index 00000000000..ef4a3242125 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22e.fs @@ -0,0 +1,4 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +while true do + System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22e.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22e.il.bsl new file mode 100644 index 00000000000..d3e72f97117 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22e.il.bsl @@ -0,0 +1,87 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Testfunction22e +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Testfunction22e +{ + // Offset: 0x00000000 Length: 0x00000159 +} +.mresource public FSharpOptimizationData.Testfunction22e +{ + // Offset: 0x00000160 Length: 0x00000056 +} +.module Testfunction22e.exe +// MVID: {60B68B97-C83B-1CB9-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05440000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Testfunction22e + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Testfunction22e + +.class private abstract auto ansi sealed ''.$Testfunction22e + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 : 1,11 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22e.fs' + IL_0000: ldc.i4.1 + IL_0001: brfalse.s IL_000b + + .line 4,4 : 4,30 '' + IL_0003: call void [mscorlib]System.Console::WriteLine() + .line 100001,100001 : 0,0 '' + IL_0008: nop + IL_0009: br.s IL_0000 + + IL_000b: ret + } // end of method $Testfunction22e::main@ + +} // end of class ''.$Testfunction22e + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22f.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22f.fs new file mode 100644 index 00000000000..6fd7e43ade2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22f.fs @@ -0,0 +1,5 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +match "A" with + | "A" -> System.Console.WriteLine() + | _ -> System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22f.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22f.il.bsl new file mode 100644 index 00000000000..1d17863b463 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22f.il.bsl @@ -0,0 +1,103 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} +.assembly Testfunction22f +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Testfunction22f +{ + // Offset: 0x00000000 Length: 0x00000159 +} +.mresource public FSharpOptimizationData.Testfunction22f +{ + // Offset: 0x00000160 Length: 0x00000056 +} +.module Testfunction22f.exe +// MVID: {611C4D9E-C040-2523-A745-03839E4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x04D20000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Testfunction22f + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Testfunction22f + +.class private abstract auto ansi sealed ''.$Testfunction22f + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 34 (0x22) + .maxstack 4 + .locals init ([0] string V_0) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 1,15 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22f.fs' + IL_0000: ldstr "A" + IL_0005: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0006: ldloc.0 + IL_0007: ldstr "A" + IL_000c: call bool [netstandard]System.String::Equals(string, + string) + IL_0011: brfalse.s IL_001b + + .line 4,4 : 12,38 '' + IL_0013: call void [mscorlib]System.Console::WriteLine() + .line 100001,100001 : 0,0 '' + IL_0018: nop + IL_0019: br.s IL_0021 + + .line 5,5 : 10,36 '' + IL_001b: call void [mscorlib]System.Console::WriteLine() + .line 100001,100001 : 0,0 '' + IL_0020: nop + IL_0021: ret + } // end of method $Testfunction22f::main@ + +} // end of class ''.$Testfunction22f + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22g.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22g.fs new file mode 100644 index 00000000000..4a90531ba66 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22g.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +if true then System.Console.WriteLine() else System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22g.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22g.il.bsl new file mode 100644 index 00000000000..67305e6544f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22g.il.bsl @@ -0,0 +1,93 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Testfunction22g +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Testfunction22g +{ + // Offset: 0x00000000 Length: 0x00000159 +} +.mresource public FSharpOptimizationData.Testfunction22g +{ + // Offset: 0x00000160 Length: 0x00000056 +} +.module Testfunction22g.exe +// MVID: {611C4D9E-CA89-74DB-A745-03839E4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x04D30000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Testfunction22g + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Testfunction22g + +.class private abstract auto ansi sealed ''.$Testfunction22g + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 19 (0x13) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 1,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22g.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldc.i4.1 + IL_0002: brfalse.s IL_000c + + .line 3,3 : 14,40 '' + IL_0004: call void [mscorlib]System.Console::WriteLine() + .line 100001,100001 : 0,0 '' + IL_0009: nop + IL_000a: br.s IL_0012 + + .line 3,3 : 46,72 '' + IL_000c: call void [mscorlib]System.Console::WriteLine() + .line 100001,100001 : 0,0 '' + IL_0011: nop + IL_0012: ret + } // end of method $Testfunction22g::main@ + +} // end of class ''.$Testfunction22g + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22h.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22h.fs new file mode 100644 index 00000000000..348e1e058da --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22h.fs @@ -0,0 +1,6 @@ +// #NoMono #NoMT #CodeGen #EmittedIL +#light +try + System.Console.WriteLine() +with + | _ -> System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22h.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22h.il.bsl new file mode 100644 index 00000000000..48655e7bedf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction22h.il.bsl @@ -0,0 +1,98 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Testfunction22h +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Testfunction22h +{ + // Offset: 0x00000000 Length: 0x00000159 +} +.mresource public FSharpOptimizationData.Testfunction22h +{ + // Offset: 0x00000160 Length: 0x00000056 +} +.module Testfunction22h.exe +// MVID: {611C4D9E-0266-39F6-A745-03839E4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x066F0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Testfunction22h + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Testfunction22h + +.class private abstract auto ansi sealed ''.$Testfunction22h + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 22 (0x16) + .maxstack 3 + .locals init ([0] class [mscorlib]System.Exception V_0) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 1,4 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22h.fs' + .try + { + IL_0000: nop + .line 4,4 : 4,30 '' + IL_0001: call void [mscorlib]System.Console::WriteLine() + IL_0006: leave.s IL_0015 + + .line 5,5 : 1,5 '' + } // end .try + catch [mscorlib]System.Object + { + IL_0008: castclass [mscorlib]System.Exception + IL_000d: stloc.0 + .line 6,6 : 11,37 '' + IL_000e: call void [mscorlib]System.Console::WriteLine() + IL_0013: leave.s IL_0015 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0015: ret + } // end of method $Testfunction22h::main@ + +} // end of class ''.$Testfunction22h + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction23.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction23.fs new file mode 100644 index 00000000000..828cb3f1fe9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction23.fs @@ -0,0 +1,15 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSHARP1.0:4400 - Improve codegen to use "natural" names for let-bound fields in classes +// Regression test for FSHARP1.0:432 - Name cleanup needed for TLR generated methods + +type C() = + let x = System.Console.ReadLine() + let g() = x + let x = System.Console.ReadLine() + member self.M() = x + g() + +let f(x) = + let g() = + printfn "Hello" + printfn "Hello" + g(), g() diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction24.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction24.fs new file mode 100644 index 00000000000..eb297d2f636 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction24.fs @@ -0,0 +1,32 @@ +open FSharp.NativeInterop +// Assume that the following class exists. + +type Point = { mutable x : int; mutable y : int } + +let pinObject() = + let point = { x = 1; y = 2 } + use p1 = fixed &point.x // note, fixed is a keyword and would be highlighted + NativePtr.get p1 0 + NativePtr.get p1 1 + +let pinRef() = + let point = ref 17 + use p1 = fixed &point.contents // note, fixed is a keyword and would be highlighted + NativePtr.read p1 + NativePtr.read p1 + +let pinArray1() = + let arr = [| 0.0; 1.5; 2.3; 3.4; 4.0; 5.9 |] + use p1 = fixed arr + NativePtr.get p1 0 + NativePtr.get p1 1 + +let pinArray2() = + let arr = [| 0.0; 1.5; 2.3; 3.4; 4.0; 5.9 |] + // You can initialize a pointer by using the address of a variable. + use p = fixed &arr.[0] + NativePtr.get p 0 + NativePtr.get p 1 + +let pinString() = + let str = "Hello World" + // The following assignment initializes p by using a string. + use pChar = fixed str + NativePtr.get pChar 0, NativePtr.get pChar 1 + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction3.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction3.il.bsl new file mode 100644 index 00000000000..35c8295e14c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction3.il.bsl @@ -0,0 +1,132 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction3 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction3 +{ + // Offset: 0x00000000 Length: 0x000001F9 +} +.mresource public FSharpOptimizationData.TestFunction3 +{ + // Offset: 0x00000200 Length: 0x00000088 +} +.module TestFunction3.exe +// MVID: {611C4D9E-663A-8929-A745-03839E4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07360000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction3 + extends [mscorlib]System.Object +{ + .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 TestFunction1() cil managed + { + // Code size 36 (0x24) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction3.fs' + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + .line 6,6 : 5,20 '' + IL_0010: ldstr "World" + IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001f: pop + .line 7,7 : 5,8 '' + IL_0020: ldc.i4.3 + IL_0021: ldc.i4.4 + IL_0022: add + IL_0023: ret + } // end of method TestFunction3::TestFunction1 + + .method public static void TestFunction3() cil managed + { + // Code size 50 (0x32) + .maxstack 3 + .locals init ([0] int32 x, + [1] class [mscorlib]System.Exception V_1) + .line 10,10 : 5,8 '' + .try + { + IL_0000: nop + .line 11,11 : 8,31 '' + IL_0001: call int32 TestFunction3::TestFunction1() + IL_0006: stloc.0 + .line 12,12 : 8,23 '' + IL_0007: ldstr "Hello" + IL_000c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: leave.s IL_0031 + + .line 13,13 : 5,9 '' + } // end .try + catch [mscorlib]System.Object + { + IL_0019: castclass [mscorlib]System.Exception + IL_001e: stloc.1 + .line 14,14 : 8,23 '' + IL_001f: ldstr "World" + IL_0024: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0029: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002e: pop + IL_002f: leave.s IL_0031 + + .line 100001,100001 : 0,0 '' + } // end handler + IL_0031: ret + } // end of method TestFunction3::TestFunction3 + +} // end of class TestFunction3 + +.class private abstract auto ansi sealed ''.$TestFunction3 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction3::main@ + +} // end of class ''.$TestFunction3 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction4.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction4.il.bsl new file mode 100644 index 00000000000..d2e49c8e9de --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction4.il.bsl @@ -0,0 +1,129 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction4 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction4 +{ + // Offset: 0x00000000 Length: 0x000001F9 +} +.mresource public FSharpOptimizationData.TestFunction4 +{ + // Offset: 0x00000200 Length: 0x00000088 +} +.module TestFunction4.exe +// MVID: {611C4D9E-665B-8929-A745-03839E4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x067E0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction4 + extends [mscorlib]System.Object +{ + .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 TestFunction1() cil managed + { + // Code size 36 (0x24) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction4.fs' + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + .line 6,6 : 5,20 '' + IL_0010: ldstr "World" + IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001f: pop + .line 7,7 : 5,8 '' + IL_0020: ldc.i4.3 + IL_0021: ldc.i4.4 + IL_0022: add + IL_0023: ret + } // end of method TestFunction4::TestFunction1 + + .method public static void TestFunction4() cil managed + { + // Code size 44 (0x2c) + .maxstack 3 + .locals init ([0] int32 x) + .line 10,10 : 5,8 '' + .try + { + IL_0000: nop + .line 11,11 : 8,31 '' + IL_0001: call int32 TestFunction4::TestFunction1() + IL_0006: stloc.0 + .line 12,12 : 8,23 '' + IL_0007: ldstr "Hello" + IL_000c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: leave.s IL_002b + + .line 13,13 : 5,12 '' + } // end .try + finally + { + IL_0019: nop + .line 14,14 : 8,23 '' + IL_001a: ldstr "World" + IL_001f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0029: pop + IL_002a: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_002b: ret + } // end of method TestFunction4::TestFunction4 + +} // end of class TestFunction4 + +.class private abstract auto ansi sealed ''.$TestFunction4 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction4::main@ + +} // end of class ''.$TestFunction4 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction5.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction5.il.bsl new file mode 100644 index 00000000000..f03b113a1f8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction5.il.bsl @@ -0,0 +1,120 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction5 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction5 +{ + // Offset: 0x00000000 Length: 0x000001F9 +} +.mresource public FSharpOptimizationData.TestFunction5 +{ + // Offset: 0x00000200 Length: 0x00000088 +} +.module TestFunction5.exe +// MVID: {60B68B97-6570-8929-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00AB0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction5 + extends [mscorlib]System.Object +{ + .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 TestFunction1() cil managed + { + // Code size 36 (0x24) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction5.fs' + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + .line 6,6 : 5,20 '' + IL_0010: ldstr "World" + IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001f: pop + .line 7,7 : 5,8 '' + IL_0020: ldc.i4.3 + IL_0021: ldc.i4.4 + IL_0022: add + IL_0023: ret + } // end of method TestFunction5::TestFunction1 + + .method public static int32 TestFunction5() cil managed + { + // Code size 30 (0x1e) + .maxstack 4 + .locals init ([0] int32 x, + [1] int32 y) + .line 11,11 : 8,31 '' + IL_0000: call int32 TestFunction5::TestFunction1() + IL_0005: stloc.1 + .line 12,12 : 8,23 '' + IL_0006: ldstr "Hello" + IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0015: pop + .line 13,13 : 8,13 '' + IL_0016: ldloc.1 + IL_0017: ldloc.1 + IL_0018: add + IL_0019: stloc.0 + .line 14,14 : 5,10 '' + IL_001a: ldloc.0 + IL_001b: ldloc.0 + IL_001c: add + IL_001d: ret + } // end of method TestFunction5::TestFunction5 + +} // end of class TestFunction5 + +.class private abstract auto ansi sealed ''.$TestFunction5 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction5::main@ + +} // end of class ''.$TestFunction5 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction6.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction6.il.bsl new file mode 100644 index 00000000000..90d8b294ee0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction6.il.bsl @@ -0,0 +1,162 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction6 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction6 +{ + // Offset: 0x00000000 Length: 0x000001F9 +} +.mresource public FSharpOptimizationData.TestFunction6 +{ + // Offset: 0x00000200 Length: 0x00000088 +} +.module TestFunction6.exe +// MVID: {60B68B97-6591-8929-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x072D0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction6 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f@11 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class TestFunction6/f@11 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } // end of method f@11::.ctor + + .method public strict virtual instance int32 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + // Code size 26 (0x1a) + .maxstack 6 + .locals init ([0] int32 y) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 11,11 : 8,31 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction6.fs' + IL_0000: call int32 TestFunction6::TestFunction1() + IL_0005: stloc.0 + .line 12,12 : 8,23 '' + IL_0006: ldstr "Hello" + IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0015: pop + .line 13,13 : 8,13 '' + IL_0016: ldloc.0 + IL_0017: ldloc.0 + IL_0018: add + IL_0019: ret + } // end of method f@11::Invoke + + .method private specialname rtspecialname static + void .cctor() cil managed + { + // Code size 11 (0xb) + .maxstack 10 + IL_0000: newobj instance void TestFunction6/f@11::.ctor() + IL_0005: stsfld class TestFunction6/f@11 TestFunction6/f@11::@_instance + IL_000a: ret + } // end of method f@11::.cctor + + } // end of class f@11 + + .method public static int32 TestFunction1() cil managed + { + // Code size 36 (0x24) + .maxstack 8 + .line 5,5 : 5,20 '' + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + .line 6,6 : 5,20 '' + IL_0010: ldstr "World" + IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001f: pop + .line 7,7 : 5,8 '' + IL_0020: ldc.i4.3 + IL_0021: ldc.i4.4 + IL_0022: add + IL_0023: ret + } // end of method TestFunction6::TestFunction1 + + .method public static int32 TestFunction6() cil managed + { + // Code size 22 (0x16) + .maxstack 5 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) + .line 100001,100001 : 0,0 '' + IL_0000: ldsfld class TestFunction6/f@11 TestFunction6/f@11::@_instance + IL_0005: stloc.0 + .line 14,14 : 5,14 '' + IL_0006: ldloc.0 + IL_0007: ldnull + IL_0008: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000d: ldloc.0 + IL_000e: ldnull + IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0014: add + IL_0015: ret + } // end of method TestFunction6::TestFunction6 + +} // end of class TestFunction6 + +.class private abstract auto ansi sealed ''.$TestFunction6 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction6::main@ + +} // end of class ''.$TestFunction6 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction7.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction7.il.bsl new file mode 100644 index 00000000000..be6eb321a0b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction7.il.bsl @@ -0,0 +1,98 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction7 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction7 +{ + // Offset: 0x00000000 Length: 0x000001BB +} +.mresource public FSharpOptimizationData.TestFunction7 +{ + // Offset: 0x000001C0 Length: 0x00000070 +} +.module TestFunction7.exe +// MVID: {60B68B97-65AE-8929-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x051F0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction7 + extends [mscorlib]System.Object +{ + .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 TestFunction7() cil managed + { + // Code size 14 (0xe) + .maxstack 4 + .locals init ([0] int32 r) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction7.fs' + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + .line 6,6 : 5,16 '' + IL_0002: ldloc.0 + IL_0003: ldc.i4.3 + IL_0004: bge.s IL_000d + + .line 7,7 : 8,18 '' + IL_0006: ldloc.0 + IL_0007: ldc.i4.1 + IL_0008: add + IL_0009: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000a: nop + IL_000b: br.s IL_0002 + + IL_000d: ret + } // end of method TestFunction7::TestFunction7 + +} // end of class TestFunction7 + +.class private abstract auto ansi sealed ''.$TestFunction7 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction7::main@ + +} // end of class ''.$TestFunction7 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction8.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction8.il.bsl new file mode 100644 index 00000000000..4cb5c39cf67 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction8.il.bsl @@ -0,0 +1,97 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction8 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction8 +{ + // Offset: 0x00000000 Length: 0x000001C4 +} +.mresource public FSharpOptimizationData.TestFunction8 +{ + // Offset: 0x000001C8 Length: 0x00000070 +} +.module TestFunction8.exe +// MVID: {611C4D9E-65CF-8929-A745-03839E4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06DC0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction8 + extends [mscorlib]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static int32 TestFunction8(int32 x) cil managed + { + // Code size 13 (0xd) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,18 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction8.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldc.i4.3 + IL_0003: ble.s IL_0009 + + .line 6,6 : 9,12 '' + IL_0005: ldarg.0 + IL_0006: ldc.i4.4 + IL_0007: add + IL_0008: ret + + .line 7,7 : 10,13 '' + IL_0009: ldarg.0 + IL_000a: ldc.i4.4 + IL_000b: sub + IL_000c: ret + } // end of method TestFunction8::TestFunction8 + +} // end of class TestFunction8 + +.class private abstract auto ansi sealed ''.$TestFunction8 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction8::main@ + +} // end of class ''.$TestFunction8 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9.il.bsl new file mode 100644 index 00000000000..85f0521e674 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9.il.bsl @@ -0,0 +1,101 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly TestFunction9 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction9 +{ + // Offset: 0x00000000 Length: 0x000001D2 +} +.mresource public FSharpOptimizationData.TestFunction9 +{ + // Offset: 0x000001D8 Length: 0x00000070 +} +.module TestFunction9.exe +// MVID: {611C4D9E-64F4-8929-A745-03839E4D1C61} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05890000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction9 + extends [mscorlib]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static string TestFunction9(int32 x) cil managed + { + // Code size 37 (0x25) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldc.i4.3 + IL_0003: sub + IL_0004: switch ( + IL_0013, + IL_0019) + IL_0011: br.s IL_001f + + .line 6,6 : 12,19 '' + IL_0013: ldstr "three" + IL_0018: ret + + .line 7,7 : 12,18 '' + IL_0019: ldstr "four" + IL_001e: ret + + .line 8,8 : 12,18 '' + IL_001f: ldstr "five" + IL_0024: ret + } // end of method TestFunction9::TestFunction9 + +} // end of class TestFunction9 + +.class private abstract auto ansi sealed ''.$TestFunction9 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction9::main@ + +} // end of class ''.$TestFunction9 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b.il.bsl new file mode 100644 index 00000000000..08f18e70431 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b.il.bsl @@ -0,0 +1,276 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction9b +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction9b +{ + // Offset: 0x00000000 Length: 0x000001F2 +} +.mresource public FSharpOptimizationData.TestFunction9b +{ + // Offset: 0x000001F8 Length: 0x00000072 +} +.module TestFunction9b.exe +// MVID: {61F2AFF9-A52C-4FC9-A745-0383F9AFF261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x069F0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction9b + extends [mscorlib]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed + { + // Code size 409 (0x199) + .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] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + [3] int32 b, + [4] int32 a, + [5] int32 V_5, + [6] int32 V_6, + [7] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_7, + [8] int32 V_8, + [9] int32 V_9, + [10] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_10, + [11] int32 V_11, + [12] int32 V_12) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse IL_0193 + + IL_000d: ldloc.0 + IL_000e: stloc.1 + .line 100001,100001 : 0,0 '' + IL_000f: ldloc.1 + IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0015: ldc.i4.1 + IL_0016: sub + IL_0017: switch ( + IL_00fd) + .line 100001,100001 : 0,0 '' + IL_0020: ldloc.1 + IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0026: ldc.i4.3 + IL_0027: sub + IL_0028: switch ( + IL_0078) + .line 100001,100001 : 0,0 '' + IL_0031: ldloc.1 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003c: brfalse IL_0193 + + IL_0041: ldloc.1 + IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0047: stloc.2 + .line 100001,100001 : 0,0 '' + IL_0048: ldloc.2 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0053: brtrue IL_0193 + + .line 100001,100001 : 0,0 '' + 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_0067: ldloc.s a + IL_0069: ldloc.3 + IL_006a: add + IL_006b: ldc.i4.4 + IL_006c: ceq + IL_006e: brfalse IL_0193 + + IL_0073: br IL_017d + + .line 100001,100001 : 0,0 '' + 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_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_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 100001,100001 : 0,0 '' + 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_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_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_00e7: ldloc.s V_7 + IL_00e9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00ee: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f3: brtrue IL_0193 + + IL_00f8: br IL_0177 + + .line 100001,100001 : 0,0 '' + 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_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_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 100001,100001 : 0,0 '' + 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_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_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_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_0171: ldstr "three" + IL_0176: ret + + .line 7,7 : 16,23 '' + IL_0177: ldstr "seven" + IL_017c: ret + + .line 100001,100001 : 0,0 '' + 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_018d: ldstr "four" + IL_0192: ret + + .line 9,9 : 12,17 '' + IL_0193: ldstr "big" + IL_0198: ret + } // end of method TestFunction9b::TestFunction9b + +} // end of class TestFunction9b + +.class private abstract auto ansi sealed ''.$TestFunction9b + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction9b::main@ + +} // end of class ''.$TestFunction9b + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl new file mode 100644 index 00000000000..1d36facd4af --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl @@ -0,0 +1,276 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction9b1 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction9b1 +{ + // Offset: 0x00000000 Length: 0x00000204 +} +.mresource public FSharpOptimizationData.TestFunction9b1 +{ + // Offset: 0x00000208 Length: 0x00000083 +} +.module TestFunction9b1.exe +// MVID: {61F2AFF9-A406-DAF4-A745-0383F9AFF261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06D40000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction9b1 + extends [mscorlib]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed + { + // Code size 409 (0x199) + .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] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + [3] int32 b, + [4] int32 a, + [5] int32 V_5, + [6] int32 V_6, + [7] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_7, + [8] int32 V_8, + [9] int32 V_9, + [10] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_10, + [11] int32 V_11, + [12] int32 V_12) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b1.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse IL_0193 + + IL_000d: ldloc.0 + IL_000e: stloc.1 + .line 100001,100001 : 0,0 '' + IL_000f: ldloc.1 + IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0015: ldc.i4.1 + IL_0016: sub + IL_0017: switch ( + IL_00fd) + .line 100001,100001 : 0,0 '' + IL_0020: ldloc.1 + IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0026: ldc.i4.3 + IL_0027: sub + IL_0028: switch ( + IL_0078) + .line 100001,100001 : 0,0 '' + IL_0031: ldloc.1 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003c: brfalse IL_0193 + + IL_0041: ldloc.1 + IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0047: stloc.2 + .line 100001,100001 : 0,0 '' + IL_0048: ldloc.2 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0053: brtrue IL_0193 + + .line 100001,100001 : 0,0 '' + 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_0067: ldloc.s a + IL_0069: ldloc.3 + IL_006a: add + IL_006b: ldc.i4.4 + IL_006c: ceq + IL_006e: brfalse IL_0193 + + IL_0073: br IL_017d + + .line 100001,100001 : 0,0 '' + 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_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_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 100001,100001 : 0,0 '' + 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_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_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_00e7: ldloc.s V_7 + IL_00e9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00ee: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f3: brtrue IL_0193 + + IL_00f8: br IL_0177 + + .line 100001,100001 : 0,0 '' + 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_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_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 100001,100001 : 0,0 '' + 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_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_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_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_0171: ldstr "three" + IL_0176: ret + + .line 7,7 : 16,23 '' + IL_0177: ldstr "seven" + IL_017c: ret + + .line 100001,100001 : 0,0 '' + 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_018d: ldstr "four" + IL_0192: ret + + .line 9,9 : 12,17 '' + IL_0193: ldstr "big" + IL_0198: ret + } // end of method TestFunction9b1::TestFunction9b + +} // end of class TestFunction9b1 + +.class private abstract auto ansi sealed ''.$TestFunction9b1 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction9b1::main@ + +} // end of class ''.$TestFunction9b1 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl new file mode 100644 index 00000000000..79a7528cb60 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl @@ -0,0 +1,276 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction9b2 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction9b2 +{ + // Offset: 0x00000000 Length: 0x00000204 +} +.mresource public FSharpOptimizationData.TestFunction9b2 +{ + // Offset: 0x00000208 Length: 0x00000083 +} +.module TestFunction9b2.exe +// MVID: {61F2AFF9-9C0B-E35E-A745-0383F9AFF261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x056D0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction9b2 + extends [mscorlib]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed + { + // Code size 409 (0x199) + .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] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + [3] int32 b, + [4] int32 a, + [5] int32 V_5, + [6] int32 V_6, + [7] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_7, + [8] int32 V_8, + [9] int32 V_9, + [10] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_10, + [11] int32 V_11, + [12] int32 V_12) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b2.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse IL_0193 + + IL_000d: ldloc.0 + IL_000e: stloc.1 + .line 100001,100001 : 0,0 '' + IL_000f: ldloc.1 + IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0015: ldc.i4.1 + IL_0016: sub + IL_0017: switch ( + IL_00fd) + .line 100001,100001 : 0,0 '' + IL_0020: ldloc.1 + IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0026: ldc.i4.3 + IL_0027: sub + IL_0028: switch ( + IL_0078) + .line 100001,100001 : 0,0 '' + IL_0031: ldloc.1 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003c: brfalse IL_0193 + + IL_0041: ldloc.1 + IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0047: stloc.2 + .line 100001,100001 : 0,0 '' + IL_0048: ldloc.2 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0053: brtrue IL_0193 + + .line 100001,100001 : 0,0 '' + 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_0067: ldloc.s a + IL_0069: ldloc.3 + IL_006a: add + IL_006b: ldc.i4.4 + IL_006c: ceq + IL_006e: brfalse IL_0193 + + IL_0073: br IL_017d + + .line 100001,100001 : 0,0 '' + 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_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_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 100001,100001 : 0,0 '' + 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_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_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_00e7: ldloc.s V_7 + IL_00e9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00ee: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f3: brtrue IL_0193 + + IL_00f8: br IL_0177 + + .line 100001,100001 : 0,0 '' + 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_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_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 100001,100001 : 0,0 '' + 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_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_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_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_0171: ldstr "three" + IL_0176: ret + + .line 7,7 : 16,23 '' + IL_0177: ldstr "seven" + IL_017c: ret + + .line 100001,100001 : 0,0 '' + 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_018d: ldstr "four" + IL_0192: ret + + .line 9,9 : 12,17 '' + IL_0193: ldstr "big" + IL_0198: ret + } // end of method TestFunction9b2::TestFunction9b + +} // end of class TestFunction9b2 + +.class private abstract auto ansi sealed ''.$TestFunction9b2 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction9b2::main@ + +} // end of class ''.$TestFunction9b2 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl new file mode 100644 index 00000000000..a8219299e3f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl @@ -0,0 +1,276 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TestFunction9b3 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TestFunction9b3 +{ + // Offset: 0x00000000 Length: 0x00000204 +} +.mresource public FSharpOptimizationData.TestFunction9b3 +{ + // Offset: 0x00000208 Length: 0x00000083 +} +.module TestFunction9b3.exe +// MVID: {61F2AFF9-C1A4-612A-A745-0383F9AFF261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07370000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TestFunction9b3 + extends [mscorlib]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed + { + // Code size 409 (0x199) + .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] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + [3] int32 b, + [4] int32 a, + [5] int32 V_5, + [6] int32 V_6, + [7] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_7, + [8] int32 V_8, + [9] int32 V_9, + [10] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_10, + [11] int32 V_11, + [12] int32 V_12) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 5,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b3.fs' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse IL_0193 + + IL_000d: ldloc.0 + IL_000e: stloc.1 + .line 100001,100001 : 0,0 '' + IL_000f: ldloc.1 + IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0015: ldc.i4.1 + IL_0016: sub + IL_0017: switch ( + IL_00fd) + .line 100001,100001 : 0,0 '' + IL_0020: ldloc.1 + IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0026: ldc.i4.3 + IL_0027: sub + IL_0028: switch ( + IL_0078) + .line 100001,100001 : 0,0 '' + IL_0031: ldloc.1 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003c: brfalse IL_0193 + + IL_0041: ldloc.1 + IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0047: stloc.2 + .line 100001,100001 : 0,0 '' + IL_0048: ldloc.2 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0053: brtrue IL_0193 + + .line 100001,100001 : 0,0 '' + 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_0067: ldloc.s a + IL_0069: ldloc.3 + IL_006a: add + IL_006b: ldc.i4.4 + IL_006c: ceq + IL_006e: brfalse IL_0193 + + IL_0073: br IL_017d + + .line 100001,100001 : 0,0 '' + 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_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_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 100001,100001 : 0,0 '' + 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_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_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_00e7: ldloc.s V_7 + IL_00e9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00ee: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f3: brtrue IL_0193 + + IL_00f8: br IL_0177 + + .line 100001,100001 : 0,0 '' + 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_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_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 100001,100001 : 0,0 '' + 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_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_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_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_0171: ldstr "three" + IL_0176: ret + + .line 7,7 : 16,23 '' + IL_0177: ldstr "seven" + IL_017c: ret + + .line 100001,100001 : 0,0 '' + 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_018d: ldstr "four" + IL_0192: ret + + .line 9,9 : 12,17 '' + IL_0193: ldstr "big" + IL_0198: ret + } // end of method TestFunction9b3::TestFunction9b + +} // end of class TestFunction9b3 + +.class private abstract auto ansi sealed ''.$TestFunction9b3 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $TestFunction9b3::main@ + +} // end of class ''.$TestFunction9b3 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/env.lst new file mode 100644 index 00000000000..6278df20bb0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/env.lst @@ -0,0 +1,46 @@ + + SOURCE=TestFunction10.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction10.exe" # TestFunction10.fs - + SOURCE=TestFunction13.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction13.exe" # TestFunction13.fs - + SOURCE=TestFunction16.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction16.exe" # TestFunction16.fs - + SOURCE=TestFunction17.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction17.exe" # TestFunction17.fs - + SOURCE=TestFunction19.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction19.exe" # TestFunction19.fs - + SOURCE=TestFunction20.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction20.exe" # TestFunction20.fs - + SOURCE=TestFunction21.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction21.exe" # TestFunction21.fs - + SOURCE=TestFunction23.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction23.exe" # TestFunction23.fs - + + SOURCE=TestFunction1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction1.exe" # TestFunction1.fs + SOURCE=TestFunction2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction2.exe" # TestFunction2.fs + + SOURCE=TestFunction3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction3.exe" # TestFunction3.fs - + SOURCE=TestFunction3b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction3b.exe" # TestFunction3b.fs - + SOURCE=TestFunction3c.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction3c.exe" # TestFunction3c.fs - + + SOURCE=TestFunction4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction4.exe" # TestFunction4.fs + SOURCE=TestFunction5.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction5.exe" # TestFunction5.fs + SOURCE=TestFunction6.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction6.exe" # TestFunction6.fs + SOURCE=TestFunction7.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction7.exe" # TestFunction7.fs + SOURCE=TestFunction8.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction8.exe" # TestFunction8.fs + SOURCE=TestFunction9.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction9.exe" # TestFunction9.fs + SOURCE=TestFunction9b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction9b.exe" # TestFunction9b.fs + SOURCE=TestFunction9b1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction9b1.exe" # TestFunction9b1.fs + SOURCE=TestFunction9b2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction9b2.exe" # TestFunction9b2.fs + SOURCE=TestFunction9b3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction9b3.exe" # TestFunction9b3.fs + SOURCE=TestFunction9b4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction9b4.exe" # TestFunction9b4.fs + SOURCE=TestFunction11.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction11.exe" # TestFunction11.fs + SOURCE=TestFunction12.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction12.exe" # TestFunction12.fs + + SOURCE=TestFunction14.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction14.exe" # TestFunction14.fs - + + SOURCE=TestFunction15.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction15.exe" # TestFunction15.fs + SOURCE=TestFunction18.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction18.exe" # TestFunction18.fs + + SOURCE=Testfunction22.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22.exe" # TestFunction22.fs + SOURCE=Testfunction22b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22b.exe" # TestFunction22b.fs + SOURCE=Testfunction22c.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22c.exe" # TestFunction22c.fs + SOURCE=Testfunction22d.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22d.exe" # TestFunction22d.fs + SOURCE=Testfunction22e.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22e.exe" # TestFunction22e.fs + SOURCE=Testfunction22f.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22f.exe" # TestFunction22f.fs + SOURCE=Testfunction22g.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22g.exe" # TestFunction22g.fs + + SOURCE=Testfunction22h.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22h.exe" # TestFunction22h.fs - + SOURCE=TestFunction24.fs SCFLAGS="-g --optimize-" PEVER=/Exp_Fail COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction24.exe" # TestFunction24.fs - diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/keep.lst new file mode 100644 index 00000000000..f59ec20aabf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/TestFunctions/keep.lst @@ -0,0 +1 @@ +* \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/OptionalArg01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/OptionalArg01.fs new file mode 100644 index 00000000000..05e33058136 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/OptionalArg01.fs @@ -0,0 +1,46 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples +type A() = class end + +// A code+optimization pattern, see https://github.com/Microsoft/visualfsharp/issues/6532 +type C() = + static member inline F (?x1: A, ?x2: A) = + let count = 0 + let count = match x1 with None -> count | Some _ -> count + 1 + let count = match x2 with None -> count | Some _ -> count + 1 + let attribs = ResizeArray<_>(count) + match x1 with None -> () | Some v1 -> attribs.Add(v1) + match x2 with None -> () | Some v2 -> attribs.Add(v2) + attribs + +//Expect rough equivalent of: +// let d = ResizeArray<_>(0) +// d +let test() = + C.F () + +//Expect rough equivalent of: +// let x1 = A() +// let d = ResizeArray<_>(1) +// d.Add(x1) +// d +let test2() = + C.F (x1=A()) + +//Expect rough equivalent of: +// let x2 = A() +// let d = ResizeArray<_>(1) +// d.Add(x2) +// d +let test3() = + C.F (x2=A()) + +//Expect rough equivalent of: +// let x1 = A() +// let x2 = A() +// let d = ResizeArray<_>(2) +// d.Add(x1) +// d.Add(x2) +// d +let test4() = + C.F (x1=A(), x2=A()) + diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/OptionalArg01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/OptionalArg01.il.bsl new file mode 100644 index 00000000000..6b7f68ae539 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/OptionalArg01.il.bsl @@ -0,0 +1,308 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly OptionalArg01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 00 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.OptionalArg01 +{ + // Offset: 0x00000000 Length: 0x0000045A +} +.mresource public FSharpOptimizationData.OptionalArg01 +{ + // Offset: 0x00000460 Length: 0x00000445 +} +.module OptionalArg01.exe +// MVID: {61F2D6A5-4F48-B5AF-A745-0383A5D6F261} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06C30000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed OptionalArg01 + extends [mscorlib]System.Object +{ + .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 ) + .class auto ansi serializable nested public A + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // 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 + IL_0007: pop + IL_0008: ret + } // end of method A::.ctor + + } // end of class A + + .class auto ansi serializable nested public C + extends [mscorlib]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor() cil managed + { + // 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 + IL_0007: pop + IL_0008: ret + } // end of method C::.ctor + + .method public static class [mscorlib]System.Collections.Generic.List`1 + F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 x1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 x2) cil managed + { + .param [1] + .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 96 (0x60) + .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 7,7 : 9,22 '' + 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_0005: br.s IL_000b + + .line 8,8 : 43,48 '' + IL_0007: ldc.i4.0 + .line 16707566,16707566 : 0,0 '' + IL_0008: nop + IL_0009: br.s IL_000d + + .line 8,8 : 61,70 '' + IL_000b: ldc.i4.1 + .line 16707566,16707566 : 0,0 '' + IL_000c: nop + .line 16707566,16707566 : 0,0 '' + IL_000d: stloc.0 + .line 9,9 : 21,34 '' + IL_000e: nop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.1 + IL_0010: brfalse.s IL_0014 + + IL_0012: br.s IL_0018 + + .line 9,9 : 43,48 '' + IL_0014: ldloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0015: nop + IL_0016: br.s IL_001c + + .line 9,9 : 61,70 '' + IL_0018: ldloc.0 + IL_0019: ldc.i4.1 + IL_001a: add + .line 16707566,16707566 : 0,0 '' + IL_001b: nop + .line 16707566,16707566 : 0,0 '' + IL_001c: stloc.1 + .line 10,10 : 9,44 '' + 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_0025: ldarg.0 + IL_0026: brfalse.s IL_002a + + IL_0028: br.s IL_002e + + .line 11,11 : 31,33 '' + IL_002a: nop + .line 16707566,16707566 : 0,0 '' + IL_002b: nop + IL_002c: br.s IL_0041 + + .line 16707566,16707566 : 0,0 '' + 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_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_0040: nop + .line 12,12 : 9,22 '' + IL_0041: nop + .line 16707566,16707566 : 0,0 '' + IL_0042: ldarg.1 + IL_0043: brfalse.s IL_0047 + + IL_0045: br.s IL_004b + + .line 12,12 : 31,33 '' + IL_0047: nop + .line 16707566,16707566 : 0,0 '' + IL_0048: nop + IL_0049: br.s IL_005e + + .line 16707566,16707566 : 0,0 '' + 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_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_005d: nop + .line 13,13 : 9,16 '' + IL_005e: ldloc.2 + IL_005f: ret + } // end of method C::F + + } // end of class C + + .method public static class [mscorlib]System.Collections.Generic.List`1 + test() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 19,19 : 5,11 '' + IL_0000: ldc.i4.0 + IL_0001: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor(int32) + IL_0006: ret + } // end of method OptionalArg01::test + + .method public static class [mscorlib]System.Collections.Generic.List`1 + test2() cil managed + { + // Code size 22 (0x16) + .maxstack 4 + .locals init ([0] class OptionalArg01/A V_0, + [1] class [mscorlib]System.Collections.Generic.List`1 V_1) + .line 27,27 : 5,17 '' + IL_0000: newobj instance void OptionalArg01/A::.ctor() + IL_0005: stloc.0 + IL_0006: ldc.i4.1 + IL_0007: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor(int32) + IL_000c: stloc.1 + IL_000d: ldloc.1 + IL_000e: ldloc.0 + IL_000f: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0014: ldloc.1 + IL_0015: ret + } // end of method OptionalArg01::test2 + + .method public static class [mscorlib]System.Collections.Generic.List`1 + test3() cil managed + { + // Code size 22 (0x16) + .maxstack 4 + .locals init ([0] class OptionalArg01/A V_0, + [1] class [mscorlib]System.Collections.Generic.List`1 V_1) + .line 35,35 : 5,17 '' + IL_0000: newobj instance void OptionalArg01/A::.ctor() + IL_0005: stloc.0 + IL_0006: ldc.i4.1 + IL_0007: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor(int32) + IL_000c: stloc.1 + IL_000d: ldloc.1 + IL_000e: ldloc.0 + IL_000f: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0014: ldloc.1 + IL_0015: ret + } // end of method OptionalArg01::test3 + + .method public static class [mscorlib]System.Collections.Generic.List`1 + test4() cil managed + { + // Code size 35 (0x23) + .maxstack 4 + .locals init ([0] class OptionalArg01/A V_0, + [1] class OptionalArg01/A V_1, + [2] class [mscorlib]System.Collections.Generic.List`1 V_2) + .line 45,45 : 5,25 '' + IL_0000: newobj instance void OptionalArg01/A::.ctor() + IL_0005: stloc.0 + IL_0006: newobj instance void OptionalArg01/A::.ctor() + IL_000b: stloc.1 + IL_000c: ldc.i4.2 + IL_000d: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor(int32) + IL_0012: stloc.2 + IL_0013: ldloc.2 + IL_0014: ldloc.0 + IL_0015: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_001a: ldloc.2 + IL_001b: ldloc.1 + IL_001c: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0021: ldloc.2 + IL_0022: ret + } // end of method OptionalArg01::test4 + +} // end of class OptionalArg01 + +.class private abstract auto ansi sealed ''.$OptionalArg01 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method $OptionalArg01::main@ + +} // end of class ''.$OptionalArg01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple01.fs new file mode 100644 index 00000000000..a4a757adf72 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple01.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples +#light +let _ = 1 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple01.il.bsl new file mode 100644 index 00000000000..6b7cc9c8d49 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple01.il.bsl @@ -0,0 +1,74 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Tuple01 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Tuple01 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.Tuple01 +{ + // Offset: 0x00000140 Length: 0x0000004E +} +.module Tuple01.exe +// MVID: {60B68B97-6FDB-3E0B-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x07270000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Tuple01 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Tuple01 + +.class private abstract auto ansi sealed ''.$Tuple01 + extends [mscorlib]System.Object +{ + .method public static void main@() cil managed + { + .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@ + +} // end of class ''.$Tuple01 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple02.fs new file mode 100644 index 00000000000..45b888adebd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple02.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples +#light +let _ = 1,2 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple02.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple02.il.bsl new file mode 100644 index 00000000000..3f0835a20bc --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple02.il.bsl @@ -0,0 +1,83 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Tuple02 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Tuple02 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.Tuple02 +{ + // Offset: 0x00000140 Length: 0x0000004E +} +.module Tuple02.exe +// MVID: {60B68B97-ECCC-7D58-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x070F0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Tuple02 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Tuple02 + +.class private abstract auto ansi sealed ''.$Tuple02 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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, + !1) + IL_0007: pop + IL_0008: ret + } // end of method $Tuple02::main@ + +} // end of class ''.$Tuple02 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple03.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple03.fs new file mode 100644 index 00000000000..089bfaf6aba --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple03.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples +#light +let _ = 1,2,3 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple03.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple03.il.bsl new file mode 100644 index 00000000000..694e959cf21 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple03.il.bsl @@ -0,0 +1,85 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Tuple03 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Tuple03 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.Tuple03 +{ + // Offset: 0x00000140 Length: 0x0000004E +} +.module Tuple03.exe +// MVID: {60B68B97-AD65-A299-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05690000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Tuple03 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Tuple03 + +.class private abstract auto ansi sealed ''.$Tuple03 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + IL_0003: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_0008: pop + IL_0009: ret + } // end of method $Tuple03::main@ + +} // end of class ''.$Tuple03 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple04.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple04.fs new file mode 100644 index 00000000000..e41ebaddecf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple04.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples +#light +let _ = 1,2,3,4 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple04.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple04.il.bsl new file mode 100644 index 00000000000..67ffcf00724 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple04.il.bsl @@ -0,0 +1,87 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Tuple04 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Tuple04 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.Tuple04 +{ + // Offset: 0x00000140 Length: 0x0000004E +} +.module Tuple04.exe +// MVID: {60B68B97-6A2E-9E97-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06E90000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Tuple04 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Tuple04 + +.class private abstract auto ansi sealed ''.$Tuple04 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + IL_0003: ldc.i4.4 + IL_0004: newobj instance void class [mscorlib]System.Tuple`4::.ctor(!0, + !1, + !2, + !3) + IL_0009: pop + IL_000a: ret + } // end of method $Tuple04::main@ + +} // end of class ''.$Tuple04 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple05.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple05.fs new file mode 100644 index 00000000000..bf1f24c4027 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple05.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples +#light +let _ = 1,2,3,4,5 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple05.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple05.il.bsl new file mode 100644 index 00000000000..0626f63d7be --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple05.il.bsl @@ -0,0 +1,89 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Tuple05 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Tuple05 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.Tuple05 +{ + // Offset: 0x00000140 Length: 0x0000004E +} +.module Tuple05.exe +// MVID: {60B68B97-349F-319F-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06BA0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Tuple05 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Tuple05 + +.class private abstract auto ansi sealed ''.$Tuple05 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + IL_0003: ldc.i4.4 + IL_0004: ldc.i4.5 + IL_0005: newobj instance void class [mscorlib]System.Tuple`5::.ctor(!0, + !1, + !2, + !3, + !4) + IL_000a: pop + IL_000b: ret + } // end of method $Tuple05::main@ + +} // end of class ''.$Tuple05 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple06.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple06.fs new file mode 100644 index 00000000000..b4bebd1f438 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple06.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples +#light +let _ = 1,2,3,4,5,6 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple06.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple06.il.bsl new file mode 100644 index 00000000000..26e99d88dca --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple06.il.bsl @@ -0,0 +1,91 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Tuple06 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Tuple06 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.Tuple06 +{ + // Offset: 0x00000140 Length: 0x0000004E +} +.module Tuple06.exe +// MVID: {60B68B97-67E0-4675-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06A80000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Tuple06 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Tuple06 + +.class private abstract auto ansi sealed ''.$Tuple06 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + IL_0003: ldc.i4.4 + IL_0004: ldc.i4.5 + IL_0005: ldc.i4.6 + IL_0006: newobj instance void class [mscorlib]System.Tuple`6::.ctor(!0, + !1, + !2, + !3, + !4, + !5) + IL_000b: pop + IL_000c: ret + } // end of method $Tuple06::main@ + +} // end of class ''.$Tuple06 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple07.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple07.fs new file mode 100644 index 00000000000..9ae67768f1f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple07.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples +#light +let _ = 1,2,3,4,5,6,7 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple07.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple07.il.bsl new file mode 100644 index 00000000000..c4d97daf2ef --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple07.il.bsl @@ -0,0 +1,93 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Tuple07 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Tuple07 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.Tuple07 +{ + // Offset: 0x00000140 Length: 0x0000004E +} +.module Tuple07.exe +// MVID: {60B68B97-7229-962D-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00F10000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Tuple07 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Tuple07 + +.class private abstract auto ansi sealed ''.$Tuple07 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + IL_0003: ldc.i4.4 + IL_0004: ldc.i4.5 + IL_0005: ldc.i4.6 + IL_0006: ldc.i4.7 + IL_0007: newobj instance void class [mscorlib]System.Tuple`7::.ctor(!0, + !1, + !2, + !3, + !4, + !5, + !6) + IL_000c: pop + IL_000d: ret + } // end of method $Tuple07::main@ + +} // end of class ''.$Tuple07 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple08.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple08.fs new file mode 100644 index 00000000000..c06a17dd228 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple08.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples +#light +let _ = 1,2,3,4,5,6,7,8 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple08.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple08.il.bsl new file mode 100644 index 00000000000..72e7d3feed7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/Tuple08.il.bsl @@ -0,0 +1,96 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 5:0:0:0 +} +.assembly Tuple08 +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.Tuple08 +{ + // Offset: 0x00000000 Length: 0x0000013B +} +.mresource public FSharpOptimizationData.Tuple08 +{ + // Offset: 0x00000140 Length: 0x0000004E +} +.module Tuple08.exe +// MVID: {60B68B97-E542-67B3-A745-0383978BB660} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x00E80000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Tuple08 + extends [mscorlib]System.Object +{ + .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 ) +} // end of class Tuple08 + +.class private abstract auto ansi sealed ''.$Tuple08 + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + IL_0003: ldc.i4.4 + IL_0004: ldc.i4.5 + IL_0005: ldc.i4.6 + IL_0006: ldc.i4.7 + IL_0007: ldc.i4.8 + IL_0008: newobj instance void class [mscorlib]System.Tuple`1::.ctor(!0) + IL_000d: newobj instance void class [mscorlib]System.Tuple`8>::.ctor(!0, + !1, + !2, + !3, + !4, + !5, + !6, + !7) + IL_0012: pop + IL_0013: ret + } // end of method $Tuple08::main@ + +} // end of class ''.$Tuple08 + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleElimination.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleElimination.fs new file mode 100644 index 00000000000..741a8422343 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleElimination.fs @@ -0,0 +1,23 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples + +[] +let main argv = + let p v = printfn "%A" v + + let dic = System.Collections.Generic.Dictionary() + // Tests that the Tuple is eliminated as intended for instance methods + let (b : bool, i : int) = dic.TryGetValue 1 + p b + p i + + // Tests that the Tuple is eliminated as intended for static methods + let (b : bool, l : int64) as t = System.Int64.TryParse "123" + p b + p l + + let tt : bool*int64 = t + + // Tests that a Tuple is created as needed when calling p + p tt + + 0 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleElimination.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleElimination.il.bsl new file mode 100644 index 00000000000..2970b0c645b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleElimination.il.bsl @@ -0,0 +1,175 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .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 TupleElimination +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 00 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TupleElimination +{ + // Offset: 0x00000000 Length: 0x0000022A +} +.mresource public FSharpOptimizationData.TupleElimination +{ + // Offset: 0x00000230 Length: 0x0000007B +} +.module TupleElimination.exe +// MVID: {61F02896-DFDD-92DF-A745-03839628F061} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06990000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TupleElimination + extends [mscorlib]System.Object +{ + .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 main(string[] argv) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 206 (0xce) + .maxstack 5 + .locals init ([0] class [mscorlib]System.Collections.Generic.Dictionary`2 dic, + [1] int32 i, + [2] bool 'b (shadowed)', + [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, + [4] int32 V_4, + [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, + [6] int64 l, + [7] bool b, + [8] class [mscorlib]System.Tuple`2 t, + [9] int64 V_9, + [10] 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_10, + [11] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,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> V_11) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .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 + IL_000a: callvirt instance bool class [mscorlib]System.Collections.Generic.Dictionary`2::TryGetValue(!0, + !1&) + IL_000f: stloc.2 + .line 10,10 : 5,8 '' + IL_0010: ldstr "%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,bool>::.ctor(string) + IL_001a: stloc.3 + IL_001b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0020: ldloc.3 + IL_0021: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0026: ldloc.2 + IL_0027: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002c: pop + .line 11,11 : 5,8 '' + IL_002d: ldloc.1 + IL_002e: stloc.s V_4 + IL_0030: ldstr "%A" + IL_0035: 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_003a: stloc.s V_5 + IL_003c: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0041: ldloc.s V_5 + IL_0043: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 + IL_005e: ldloc.s b + IL_0060: ldloc.s l + IL_0062: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + !1) + IL_0067: stloc.s t + .line 15,15 : 5,8 '' + IL_0069: ldstr "%A" + IL_006e: 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,bool>::.ctor(string) + IL_0073: stloc.3 + IL_0074: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0079: ldloc.3 + IL_007a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_007f: ldloc.s b + IL_0081: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0086: pop + .line 16,16 : 5,8 '' + IL_0087: ldloc.s l + IL_0089: stloc.s V_9 + IL_008b: ldstr "%A" + IL_0090: 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,int64>::.ctor(string) + IL_0095: stloc.s V_10 + IL_0097: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_009c: ldloc.s V_10 + IL_009e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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_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_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_00cc: ldc.i4.0 + IL_00cd: ret + } // end of method TupleElimination::main + +} // end of class TupleElimination + +.class private abstract auto ansi sealed ''.$TupleElimination + extends [mscorlib]System.Object +{ +} // end of class ''.$TupleElimination + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleMonster.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleMonster.fs new file mode 100644 index 00000000000..9193f7cf054 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleMonster.fs @@ -0,0 +1,3 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Tuples +#light +let _ = 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleMonster.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleMonster.il.bsl new file mode 100644 index 00000000000..1cf266ded91 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/TupleMonster.il.bsl @@ -0,0 +1,134 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly TupleMonster +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.TupleMonster +{ + // Offset: 0x00000000 Length: 0x00000145 +} +.mresource public FSharpOptimizationData.TupleMonster +{ + // Offset: 0x00000150 Length: 0x00000053 +} +.module TupleMonster.exe +// MVID: {61F02896-1552-41D8-A745-03839628F061} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x06830000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed TupleMonster + extends [mscorlib]System.Object +{ + .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 ) +} // end of class TupleMonster + +.class private abstract auto ansi sealed ''.$TupleMonster + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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 + IL_0006: ldc.i4.s 100 + IL_0008: ldc.i4.s 101 + IL_000a: ldc.i4.s 102 + IL_000c: ldc.i4.s 103 + IL_000e: ldc.i4.s 104 + IL_0010: ldc.i4.s 105 + IL_0012: ldc.i4.s 106 + IL_0014: ldc.i4.s 107 + IL_0016: ldc.i4.s 108 + IL_0018: ldc.i4.s 109 + IL_001a: ldc.i4.s 110 + IL_001c: ldc.i4.s 111 + IL_001e: ldc.i4.s 112 + IL_0020: ldc.i4.s 113 + IL_0022: ldc.i4.s 114 + IL_0024: ldc.i4.s 115 + IL_0026: ldc.i4.s 116 + IL_0028: ldc.i4.s 117 + IL_002a: ldc.i4.s 118 + IL_002c: ldc.i4.s 119 + IL_002e: ldc.i4.s 120 + IL_0030: ldc.i4.s 121 + IL_0032: ldc.i4.s 122 + IL_0034: newobj instance void class [mscorlib]System.Tuple`5::.ctor(!0, + !1, + !2, + !3, + !4) + IL_0039: newobj instance void class [mscorlib]System.Tuple`8>::.ctor(!0, + !1, + !2, + !3, + !4, + !5, + !6, + !7) + IL_003e: newobj instance void class [mscorlib]System.Tuple`8>>::.ctor(!0, + !1, + !2, + !3, + !4, + !5, + !6, + !7) + IL_0043: newobj instance void class [mscorlib]System.Tuple`8>>>::.ctor(!0, + !1, + !2, + !3, + !4, + !5, + !6, + !7) + IL_0048: pop + IL_0049: ret + } // end of method $TupleMonster::main@ + +} // end of class ''.$TupleMonster + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.fs new file mode 100644 index 00000000000..a35f1cfef59 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.fs @@ -0,0 +1,3 @@ +open System +type Node = (struct (int* int)) +let _ = new Node(2,2) diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl new file mode 100644 index 00000000000..2aa9c8decd8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl @@ -0,0 +1,81 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 6:0:0:0 +} +.assembly ValueTupleAliasConstructor +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 00 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ValueTupleAliasConstructor +{ + // Offset: 0x00000000 Length: 0x000001E0 +} +.mresource public FSharpOptimizationData.ValueTupleAliasConstructor +{ + // Offset: 0x000001E8 Length: 0x00000061 +} +.module ValueTupleAliasConstructor.exe +// MVID: {61E07031-A8CF-BB34-A745-03833170E061} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x05930000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ValueTupleAliasConstructor + extends [mscorlib]System.Object +{ + .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 ) +} // end of class ValueTupleAliasConstructor + +.class private abstract auto ansi sealed ''.$ValueTupleAliasConstructor + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .entrypoint + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldc.i4.2 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void valuetype [mscorlib]System.ValueTuple`2::.ctor(!0, + !1) + IL_0007: pop + IL_0008: ret + } // end of method $ValueTupleAliasConstructor::main@ + +} // end of class ''.$ValueTupleAliasConstructor + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl.net47 b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl.net47 new file mode 100644 index 00000000000..0c4121676d1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl.net47 @@ -0,0 +1,83 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Copyright (c) Microsoft Corporation. All rights reserved. + + + +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly extern FSharp.Core +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 4:5:0:0 +} +.assembly ValueTupleAliasConstructor +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + // --- The following custom attribute is added automatically, do not uncomment ------- + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 00 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ValueTupleAliasConstructor +{ + // Offset: 0x00000000 Length: 0x000001EA +} +.mresource public FSharpOptimizationData.ValueTupleAliasConstructor +{ + // Offset: 0x000001F0 Length: 0x00000061 +} +.module ValueTupleAliasConstructor.exe +// MVID: {5C136441-E59F-7FAD-A745-03834164135C} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x01150000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ValueTupleAliasConstructor + extends [mscorlib]System.Object +{ + .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 ) +} // end of class ValueTupleAliasConstructor + +.class private abstract auto ansi sealed ''.$ValueTupleAliasConstructor + extends [mscorlib]System.Object +{ + .field static assembly int32 init@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 public static void main@() cil managed + { + .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:\\kevinransom\\visualfsharp\\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, + !1) + IL_0007: pop + IL_0008: ret + } // end of method $ValueTupleAliasConstructor::main@ + +} // end of class ''.$ValueTupleAliasConstructor + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/env.lst new file mode 100644 index 00000000000..76a724c4a55 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/env.lst @@ -0,0 +1,16 @@ + SOURCE=Tuple01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple01.exe" # Tuple01.fs + SOURCE=Tuple02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple02.exe" # Tuple02.fs - + SOURCE=Tuple03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple03.exe" # Tuple03.fs - + SOURCE=Tuple04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple04.exe" # Tuple04.fs - + SOURCE=Tuple05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple05.exe" # Tuple05.fs - + SOURCE=Tuple06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple06.exe" # Tuple06.fs - + SOURCE=Tuple07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple07.exe" # Tuple07.fs - + SOURCE=Tuple08.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple08.exe" # Tuple08.fs - + + SOURCE=OptionalArg01.fs SCFLAGS="-g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd OptionalArg01.exe" # OptionalArg01.fs - test optimizatons + + SOURCE=TupleMonster.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TupleMonster.exe" # TupleMonster.fs - + + SOURCE=TupleElimination.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TupleElimination.exe" # TupleElimination.fs - + + SOURCE=ValueTupleAliasConstructor.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ValueTupleAliasConstructor.exe" # ValueTupleAliasConstructor.fs - diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/keep.lst new file mode 100644 index 00000000000..f59ec20aabf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/Tuples/keep.lst @@ -0,0 +1 @@ +* \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/UpdateFSharpDataVersionAttribute.fsx b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/UpdateFSharpDataVersionAttribute.fsx new file mode 100644 index 00000000000..7f6f3efb2e6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/EmittedIL/UpdateFSharpDataVersionAttribute.fsx @@ -0,0 +1,14 @@ +let d = @"." + +System.Environment.CurrentDirectory <- d + +let sar (f : string) = + use sr = new System.IO.StreamReader(f) + let fc = sr.ReadToEnd() + let fc' = fc.Replace("int32) = ( 01 00 01 00 00 00 09 00 00 00 07 00 00 00 00 00 )", "int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 )") + fc' + +System.IO.Directory.GetFiles(d,"*.bsl") +|> Array.iter ( fun f -> let n = sar f + use sw = new System.IO.StreamWriter(f) + sw.Write(n)) diff --git a/tests/fsharpqa/Source/CodeGen/LazyNoInline01.il.bsl b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/LazyNoInline01.il.bsl similarity index 100% rename from tests/fsharpqa/Source/CodeGen/LazyNoInline01.il.bsl rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/LazyNoInline01.il.bsl diff --git a/tests/fsharpqa/Source/CodeGen/StringEncoding/.gitignore b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/.gitignore similarity index 100% rename from tests/fsharpqa/Source/CodeGen/StringEncoding/.gitignore rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/.gitignore diff --git a/tests/fsharpqa/Source/CodeGen/StringEncoding/NormalizationFormC.fsx b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/NormalizationFormC.fsx similarity index 100% rename from tests/fsharpqa/Source/CodeGen/StringEncoding/NormalizationFormC.fsx rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/NormalizationFormC.fsx diff --git a/tests/fsharpqa/Source/CodeGen/StringEncoding/NormalizationFormD.fsx b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/NormalizationFormD.fsx similarity index 100% rename from tests/fsharpqa/Source/CodeGen/StringEncoding/NormalizationFormD.fsx rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/NormalizationFormD.fsx diff --git a/tests/fsharpqa/Source/CodeGen/StringEncoding/NormalizationFormKC.fsx b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/NormalizationFormKC.fsx similarity index 100% rename from tests/fsharpqa/Source/CodeGen/StringEncoding/NormalizationFormKC.fsx rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/NormalizationFormKC.fsx diff --git a/tests/fsharpqa/Source/CodeGen/StringEncoding/NormalizationFormKD.fsx b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/NormalizationFormKD.fsx similarity index 100% rename from tests/fsharpqa/Source/CodeGen/StringEncoding/NormalizationFormKD.fsx rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/NormalizationFormKD.fsx diff --git a/tests/fsharpqa/Source/CodeGen/StringEncoding/dummy.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/dummy.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/StringEncoding/dummy.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/dummy.fs diff --git a/tests/fsharpqa/Source/CodeGen/StringEncoding/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/env.lst similarity index 100% rename from tests/fsharpqa/Source/CodeGen/StringEncoding/env.lst rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/StringEncoding/env.lst diff --git a/tests/fsharpqa/Source/CodeGen/Structure/AttributesOnLet01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnLet01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/AttributesOnLet01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnLet01.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/AttributesOnLet02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnLet02.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/AttributesOnLet02.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnLet02.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/AttributesOnProperty.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnProperty.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/AttributesOnProperty.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnProperty.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/AttributesOnPropertyGetter.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnPropertyGetter.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/AttributesOnPropertyGetter.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnPropertyGetter.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/AttributesOnPropertyGetterSetter.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnPropertyGetterSetter.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/AttributesOnPropertyGetterSetter.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnPropertyGetterSetter.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/AttributesOnPropertySetter.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnPropertySetter.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/AttributesOnPropertySetter.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/AttributesOnPropertySetter.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/BaseType.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/BaseType.fs new file mode 100644 index 00000000000..10fbd80242e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/BaseType.fs @@ -0,0 +1,31 @@ +module A + +open System.Security +open System.Security.Permissions + +type T() = + abstract TestBase : unit -> int + default x.TestBase() = +#if PASS1 + 1 +#else + 2 +#endif + //[] // this won't get inlined either + [] + member this.TestCAS() = +#if PASS1 + 10 +#else + 11 +#endif + [] // this won't get inlined either + abstract TetSecuritySafeCritical : unit -> int + default x.TetSecuritySafeCritical() = +#if PASS1 + 1 +#else + 2 +#endif + +type U() = class inherit T() end \ No newline at end of file diff --git a/tests/fsharpqa/Source/CodeGen/Structure/ClassArity01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ClassArity01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/ClassArity01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ClassArity01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/CodeGenHelper.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/CodeGenHelper.fs new file mode 100644 index 00000000000..400c02596f5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/CodeGenHelper.fs @@ -0,0 +1,222 @@ +// #NoMT #CodeGen #Interop +#light + +module CodeGenHelper + +open System +open System.Reflection + +// ---------------------------------------------------------------------------- +// Basics +// ---------------------------------------------------------------------------- + +/// Syntactic sugar, doesn't do anything +let should f x = f x + +/// Syntactic sugar, doesn't do anything +let verify f x = f x + +// ---------------------------------------------------------------------------- +// Getters +// ---------------------------------------------------------------------------- + +/// Gets the given type from the assembly (otherwise throws) +let getType typeName (asm : Assembly) = + match asm.GetType(typeName, false) with + | null -> + let allTypes = + asm.GetTypes() + |> Array.map (fun ty -> ty.Name) + |> Array.reduce (fun x y -> sprintf "%s\r%s" x y) + failwithf "Error: Assembly did not contain type %s.\nAll types in asm:\n%s" typeName allTypes + | ty -> ty + +/// Gets a type's property +let getProperty propName (ty : Type) = + match ty.GetProperty(propName) with + | null -> failwithf "Error: Type did not contain property %s" propName + | propInfo -> propInfo + +/// Gets a type's member with the given name (only search for the public members!) +let getMember memberName (ty : Type) = + match ty.GetMember(memberName) with // GetMember will never return null + | [||] -> failwithf "Error: Type did not contain member %s" memberName // - empty array (=not found) + | [| memberInfo |] -> memberInfo // - array with 1 element (=found) + | _ -> failwithf "Error: Multiple overloads. Use getMembers instead." // - array with >1 elements (=multiple overloads) + +/// Gets all of a type's PUBLIC members +let getMembers (ty : Type) = ty.GetMembers() + +/// Gets a type's method +let getMethod methodName (ty : Type) = + match ty.GetMethod(methodName) with + | null -> failwithf "Error: Type did not contain member %s" methodName + | methodInfo -> methodInfo + +/// Gets all of a type's PUBLIC methods +let getMethods (ty : Type) = ty.GetMethods() + +/// Gets a type's event with the given name +let getEvent eventName (ty : Type) = + match ty.GetEvent(eventName) with + | null -> failwithf "Error: Type did not contain event %s" eventName + | event -> event + +/// Gets all of a type's events +let getEvents (ty : Type) = ty.GetEvents() + +// ---------------------------------------------------------------------------- +// Testers +// ---------------------------------------------------------------------------- + +// Type + +/// Verify the assembly contains a type with the given name +let containType typeName (assembly : Assembly) = + match assembly.GetType(typeName, false) with + | null -> failwithf "Error: Assembly does not contain type %s" typeName + | _ -> () + +/// Verify the assembly does NOT contains a type with the given name +let notContainType typeName (assembly : Assembly) = + match assembly.GetType(typeName, false) with + | null -> () + | _ -> failwithf "Error: Assembly does, in fact, contain type %s" typeName + +// Property + +/// Verify the type contains a property with the given name +let containProp propName (ty : Type) = + match ty.GetProperty(propName) with + | null -> failwithf "Error: Type %s does not contain property %s" ty.Name propName + | _ -> () + +/// Verify the type does not contain a property with the given name +let notContainProp propName (ty : Type) = + match ty.GetProperty(propName) with + | null -> () + | _ -> failwithf "Error: Type %s does contain property %s" ty.Name propName + +// Member + +/// Verify the type contains a method with the given name +let containMember membName (ty : Type) = + match ty.GetMember(membName) with + | null -> failwithf "Error: Type %s does not contain member %s" ty.Name membName + | _ -> () + +/// Verify the type does not contain a method with the given name +let notContainMember membName (ty : Type) = + match ty.GetMember(membName) with + | null | [| |] -> () + | _ -> failwithf "Error: Type %s does contain member %s" ty.Name membName + +/// Has airity (number of arguments and types) +let takeParams (args : Type list) (methInfo : MethodInfo) = + let parameters = methInfo.GetParameters() + if parameters.Length <> List.length args then + failwithf + "Error: Method [%s] doesn't have expected airity. Method takes %d params, but expected %d" + methInfo.Name + parameters.Length + (List.length args) + + let verifyParamIsType (param : ParameterInfo) (ty : Type)= + if param.ParameterType <> ty then + failwithf + "Error: Parameter is type [%s] but expected type [%s]" + param.ParameterType.Name + ty.Name + + args |> List.iteri (fun i ty -> verifyParamIsType (parameters.[i]) ty) + +/// Assert the type is a Multicast delegate with the given signature. +let beDelegate parameters (returnType : Type) (delegateType : Type) = + // Verify the give type is, in fact, a delegate + if delegateType.BaseType.Name <> "MulticastDelegate" then + failwithf + "Error: The given type [%s] is not a MulticastDelegate, but expected to be." + delegateType.Name + + // Now make sure it has the right signature, get the method info for the 'Invoke' method + // to verify this. + let invokeMethod = getMethod "Invoke" delegateType + takeParams parameters invokeMethod + + // Check the return type too... + if invokeMethod.ReturnType <> returnType then + failwithf + "Error: Return types do not match. Expected [%s] but got [%s]" + returnType.Name + invokeMethod.ReturnType.Name + () + +/// Verifies the given event uses the specified event handler +let useEventHandler eventHandlerType (eventInfo : EventInfo) = + if eventInfo.EventHandlerType <> eventHandlerType then + failwithf + "Error: Expected event to use handler [%s] but got [%s]" + eventHandlerType.Name + eventInfo.EventHandlerType.Name + () + +/// Verify the object contains a custom attribute with the given name. E.g. "ObsoleteAttribute" +let haveAttribute attrName thingey = + let containsAttrWithName attrList = + attrList + |> Array.filter (fun att -> att.GetType().Name = attrName) + |> Array.length > 0 + let containsAttribute = + match box thingey with + | :? Type as ty + -> ty.GetCustomAttributes(false) + |> containsAttrWithName + | :? MethodInfo as mi + -> mi.GetCustomAttributes(false) + |> containsAttrWithName + | :? PropertyInfo as pi + -> pi.GetCustomAttributes(false) + |> containsAttrWithName + | :? EventInfo as ei + -> ei.GetCustomAttributes(false) + |> containsAttrWithName + | _ -> failwith "Error: Unsuported primitive type, unable to get custom attributes." + if not containsAttribute then + failwithf "Error: Unable to locate attribute %s." attrName + else + () + +/// Asserts a propety's return value +let haveType ty (propInfo : PropertyInfo) = + if propInfo.PropertyType <> ty then + failwithf + "Error: Property has type [%s] but expected[%s]" + propInfo.PropertyType.Name + ty.Name + () + +/// Verify the object does not contain any custom attributes. +let doesn'tHaveAttribute attrName thingey = + let doesn'tContainsAttrWithName attrList = + attrList + |> Array.filter (fun att -> att.GetType().Name = attrName) + |> Array.length = 0 + let containsAttribute = + match box thingey with + | :? Type as ty + -> ty.GetCustomAttributes(false) + |> doesn'tContainsAttrWithName + | :? MethodInfo as mi + -> mi.GetCustomAttributes(false) + |> doesn'tContainsAttrWithName + | :? PropertyInfo as pi + -> pi.GetCustomAttributes(false) + |> doesn'tContainsAttrWithName + | :? EventInfo as ei + -> ei.GetCustomAttributes(false) + |> doesn'tContainsAttrWithName + | _ -> failwith "Error: Unsuported primitive type, unable to get custom attributes." + if containsAttribute then + failwithf "Error: Able to locate attribute %s, didn't expect to find." attrName + else + () diff --git a/tests/fsharpqa/Source/CodeGen/Structure/CodeGenHelper.fsproj b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/CodeGenHelper.fsproj similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/CodeGenHelper.fsproj rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/CodeGenHelper.fsproj diff --git a/tests/fsharpqa/Source/CodeGen/Structure/Delegates01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Delegates01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/Delegates01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Delegates01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/DerivedType.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/DerivedType.fs new file mode 100644 index 00000000000..8d9898499a5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/DerivedType.fs @@ -0,0 +1,21 @@ +module B + +open A + +type V() = + inherit U() + override x.TestBase() = base.TestBase() + 1 + override x.TetSecuritySafeCritical() = base.TetSecuritySafeCritical() + 1 + +[] +let main (args : string[]) = + let x = V() +#if BASE_CALL + x.TestBase() +#endif +#if CAS + x.TestCAS() +#endif +#if SSC + x.TetSecuritySafeCritical() +#endif \ No newline at end of file diff --git a/tests/fsharpqa/Source/CodeGen/Structure/DiscUnionCodeGen1.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/DiscUnionCodeGen1.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/DiscUnionCodeGen1.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/DiscUnionCodeGen1.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/DoNotInlineX.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/DoNotInlineX.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/DoNotInlineX.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/DoNotInlineX.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/Equality01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Equality01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/Equality01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Equality01.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/Events01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Events01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/Events01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Events01.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/Events02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Events02.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/Events02.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Events02.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/Extensions01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Extensions01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/Extensions01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Extensions01.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/Extensions02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Extensions02.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/Extensions02.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/Extensions02.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/FunctionArity01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/FunctionArity01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/FunctionArity01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/FunctionArity01.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/LocalTypeFunctionInIf.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/LocalTypeFunctionInIf.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/LocalTypeFunctionInIf.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/LocalTypeFunctionInIf.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/ModuleArity01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ModuleArity01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/ModuleArity01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ModuleArity01.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/NativePtr01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/NativePtr01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/NativePtr01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/NativePtr01.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/ObjectExpressions01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ObjectExpressions01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/ObjectExpressions01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ObjectExpressions01.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/ReadOnlyStructFromLib.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ReadOnlyStructFromLib.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/ReadOnlyStructFromLib.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ReadOnlyStructFromLib.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ReadWriteLib.cs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ReadWriteLib.cs new file mode 100644 index 00000000000..622a9a55111 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/ReadWriteLib.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ReadWriteLib +{ + public class MyClass { public readonly int ReadonlyFoo; } + + public struct MyStruct + { + public readonly int ReadonlyFoo; + public int WriteableFoo; + } +} \ No newline at end of file diff --git a/tests/fsharpqa/Source/CodeGen/Structure/UnionTypeWithSignature01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnionTypeWithSignature01.fs similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/UnionTypeWithSignature01.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnionTypeWithSignature01.fs diff --git a/tests/fsharpqa/Source/CodeGen/Structure/UnionTypeWithSignature01.fsi b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnionTypeWithSignature01.fsi similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/UnionTypeWithSignature01.fsi rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnionTypeWithSignature01.fsi diff --git a/tests/fsharpqa/Source/CodeGen/Structure/UnionTypeWithSignature02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnionTypeWithSignature02.fs similarity index 91% rename from tests/fsharpqa/Source/CodeGen/Structure/UnionTypeWithSignature02.fs rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnionTypeWithSignature02.fs index 701da48eca5..219f7b84fed 100644 --- a/tests/fsharpqa/Source/CodeGen/Structure/UnionTypeWithSignature02.fs +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnionTypeWithSignature02.fs @@ -28,7 +28,6 @@ module M = |> Array.tryFind (fun a -> a.Name = "NewC") if res2.IsNone then - printfn "static Method N.T.NewC not found!" - exit 1 + raise (new Exception("static Method N.T.NewC not found!") - exit 0 + printfn "Finished" \ No newline at end of file diff --git a/tests/fsharpqa/Source/CodeGen/Structure/UnionTypeWithSignature02.fsi b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnionTypeWithSignature02.fsi similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/UnionTypeWithSignature02.fsi rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnionTypeWithSignature02.fsi diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure01.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure01.fs new file mode 100644 index 00000000000..25a9d755297 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure01.fs @@ -0,0 +1,54 @@ +// #NoMT #CodeGen #Interop +#light + +// Verify units of measure are dropped and types are just their +// underlying primitive values. + +namespace Test + +[] +type widget + +[] +type sprocket = + static member DoStuff() = 5 + +type AClass() = + member this.WidgetSprocketRatio = 4.25 + member this.WidgetFactor = 0.09345M + member this.SprocketFactor = 0.125f<1 / sprocket> + + + +// -------------------------------- + +module Tester = + + open CodeGenHelper + + printfn "Testing..." + + // Verify the opaque types for Units of Measure are not generated. + System.Reflection.Assembly.GetExecutingAssembly() + |> should containType "Test.widget" // see FSHARP1.0:4134 + + // Sprocket should be found since it has static methods on it + System.Reflection.Assembly.GetExecutingAssembly() + |> should containType "Test.sprocket" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClass" + |> getProperty "WidgetFactor" + |> should haveType typeof + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClass" + |> getProperty "WidgetSprocketRatio" + |> should haveType typeof + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClass" + |> getProperty "SprocketFactor" + |> should haveType typeof + + printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure02.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure02.fs new file mode 100644 index 00000000000..b26d4f625f2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure02.fs @@ -0,0 +1,34 @@ +// #NoMT #CodeGen #Interop +#light + +// Verify units of measure are dropped and types are just their +// underlying primitive values when used in functions. + +namespace Test + +[] +type widget + +[] +type sprocket + +type AClass() = + member this.DoStuff (x : float, y : float) = + let a = decimal x + let b = decimal y + a * b * 0.0M + +// -------------------------------- + +module Tester = + + open CodeGenHelper + + printfn "Testing..." + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.AClass" + |> getMethod "DoStuff" + |> should takeParams [typeof; typeof] + + printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure03.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure03.fs new file mode 100644 index 00000000000..003c07ccada --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/UnitsOfMeasure03.fs @@ -0,0 +1,55 @@ +// #NoMT #CodeGen #Interop +#light + +// Verify types which are generic WRT a unit of measure are exposed as +// standard .NET types (no funny buisness!) + +namespace Test + +[] +type widget + +[] +type sprocket + +// Generic with regard to a unit of measure +type PointG0<[] 'a>(x : float<'a>, y : float<'a>) = + member this.X = x + member this.Y = y + +type PointWidget(x, y) = + inherit PointG0(x, y) + +// Generic with regard to a unit of measure AND a typearg +type PointG2<[] 'm, 'a, 'b>() = + inherit PointG0<'m>(0.0<_>, 0.0<_>) + member this.DefaultA = Unchecked.defaultof<'a> + member this.DefaultB = Unchecked.defaultof<'b> + +// -------------------------------- + +module Tester = + + open System + open CodeGenHelper + + printfn "Testing..." + + // Regression for 3263 (we shouldn't mangle name if it isn't actually generic) + System.Reflection.Assembly.GetExecutingAssembly() + |> should containType "Test.PointG0" + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.PointG0" + |> (fun (ty : Type) -> if ty.IsGenericType then failwith "Error: Shouldn't be generic!") + + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.PointWidget" + |> (fun (ty : Type) -> if ty.BaseType.Name <> "PointG0" then failwith "Error: Not inherited properly?") + + // Truely generic type + System.Reflection.Assembly.GetExecutingAssembly() + |> getType "Test.PointG2`2" + |> (fun (ty : Type) -> if not ty.IsGenericType then failwith "Error: Should be generic!") + + printfn "Finished" diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/dummy.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/dummy.fs new file mode 100644 index 00000000000..7a4b088c373 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/dummy.fs @@ -0,0 +1 @@ +// #Regression #NoMT #CodeGen #Attributes \ No newline at end of file diff --git a/tests/fsharpqa/Source/CodeGen/Structure/env.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/env.lst similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/env.lst rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/env.lst diff --git a/tests/fsharpqa/Source/CodeGen/Structure/keep.lst b/tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/keep.lst similarity index 100% rename from tests/fsharpqa/Source/CodeGen/Structure/keep.lst rename to tests/FSharp.Compiler.ComponentTests/resources/tests/codegen/Structure/keep.lst diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj index 3c23e512471..701176f5883 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj @@ -3,7 +3,7 @@ Exe - net472;net6.0 + net472;net6.0 net6.0 $(NoWarn);44;75; true diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 1826289ae78..abbdabacd8b 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -22,47 +22,74 @@ open TestFramework open System.Reflection.Metadata module rec Compiler = - type BaselineFile = { FilePath: string; Content: string option } + type BaselineFile = + { + FilePath: string + Content: string option + } type Baseline = - { SourceFilename: string option - OutputBaseline: BaselineFile - ILBaseline: BaselineFile } + { + SourceFilename: string option + FSBaseline: BaselineFile + ILBaseline: BaselineFile + } type TestType = | Text of string | Path of string type CompilationUnit = - | FS of FSharpCompilationSource - | CS of CSharpCompilationSource - | IL of ILCompilationSource + | FS of FSharpCompilationSource + | CS of CSharpCompilationSource + | IL of ILCompilationSource override this.ToString() = match this with | FS fs -> fs.ToString() | _ -> (sprintf "%A" this ) type FSharpCompilationSource = - { Source: TestType - Baseline: Baseline option - Options: string list - OutputType: CompileOutput - OutputDirectory: DirectoryInfo option - SourceKind: SourceKind - Name: string option - IgnoreWarnings: bool - References: CompilationUnit list } + { Source: SourceCodeFileKind + AdditionalSources:SourceCodeFileKind list + Baseline: Baseline option + Options: string list + OutputType: CompileOutput + OutputDirectory: DirectoryInfo option + Name: string option + IgnoreWarnings: bool + References: CompilationUnit list } + + member this.CreateOutputDirectory() = + match this.OutputDirectory with + | Some d -> d.Create() + | None -> () + + member this.FullName = + match this.OutputDirectory, this.Name with + | Some directory, Some name -> Some(Path.Combine(directory.FullName, name)) + | None, _ -> this.Name + | _ -> None + + member this.OutputFileName = + match this.FullName, this.OutputType with + | Some fullName, CompileOutput.Library -> Some (Path.ChangeExtension(fullName, ".dll")) + | Some fullName, CompileOutput.Exe -> Some (Path.ChangeExtension(fullName, ".exe")) + | _ -> None override this.ToString() = match this.Name with | Some n -> n | _ -> (sprintf "%A" this) type CSharpCompilationSource = - { Source: TestType - LangVersion: CSharpLanguageVersion - TargetFramework: TargetFramework - OutputDirectory: DirectoryInfo option - Name: string option - References: CompilationUnit list } + { + Source: SourceCodeFileKind + LangVersion: CSharpLanguageVersion + TargetFramework: TargetFramework + OutputDirectory: DirectoryInfo option + Name: string option + References: CompilationUnit list + } type ILCompilationSource = - { Source: TestType - References: CompilationUnit list } + { + Source: TestType + References: CompilationUnit list + } type ErrorType = Error of int | Warning of int | Information of int | Hidden of int @@ -124,7 +151,7 @@ module rec Compiler = | EvalOutput of EvalOutput | ExecutionOutput of ExecutionOutput - type Output = + type CompilationOutput = { OutputPath: string option Dependencies: string list Adjust: int @@ -132,9 +159,10 @@ module rec Compiler = Output: RunOutput option Compilation: CompilationUnit } - type TestResult = - | Success of Output - | Failure of Output + [] + type CompilationResult = + | Success of CompilationOutput + | Failure of CompilationOutput let private defaultOptions : string list = [] @@ -149,30 +177,28 @@ module rec Compiler = // Load the source file from the path let loadSourceFromFile path = getSource(TestType.Path path) - let private fsFromString (source: string) (kind: SourceKind) : FSharpCompilationSource = - match source with - | null -> failwith "Source cannot be null" - | _ -> - { Source = Text source - Baseline = None - Options = defaultOptions - OutputType = Library - OutputDirectory= None - SourceKind = kind - Name = None - IgnoreWarnings = false - References = [] } - - let private csFromString (source: string) : CSharpCompilationSource = - match source with - | null -> failwith "Source cannot be null" - | _ -> - { Source = Text source - LangVersion = CSharpLanguageVersion.CSharp9 - TargetFramework = TargetFramework.Current - OutputDirectory= None - Name = None - References = [] } + let private fsFromString (source: SourceCodeFileKind): FSharpCompilationSource = + { + Source = source + AdditionalSources = [] + Baseline = None + Options = defaultOptions + OutputType = Library + OutputDirectory = None + Name = None + IgnoreWarnings = false + References = [] + } + + let private csFromString (source: SourceCodeFileKind) : CSharpCompilationSource = + { + Source = source + LangVersion = CSharpLanguageVersion.CSharp9 + TargetFramework = TargetFramework.Current + OutputDirectory= None + Name = None + References = [] + } let private fromFSharpDiagnostic (errors: FSharpDiagnostic[]) : ErrorInfo list = let toErrorInfo (e: FSharpDiagnostic) : ErrorInfo = @@ -207,23 +233,55 @@ module rec Compiler = EndLine = range.EndLine - adjust EndColumn = range.EndColumn + 1 } + + let FsxSourceCode source = + SourceCodeFileKind.Fsx({FileName="test.fsx"; SourceText=Some source}) + + let Source source = + SourceCodeFileKind.Create("test.fs", source) + + let SourceFromPath path = + SourceCodeFileKind.Create(path) + + let FsiSource source = + SourceCodeFileKind.Fsi({FileName="test.fsi"; SourceText=Some source }) + + let FsSource source = + SourceCodeFileKind.Fs({FileName="test.fs"; SourceText=Some source }) + + let CsSource source = + SourceCodeFileKind.Cs({FileName="test.cs"; SourceText=Some source }) + let Fsx (source: string) : CompilationUnit = - fsFromString source SourceKind.Fsx |> FS + fsFromString (FsxSourceCode source) |> FS + + let FsxFromPath (path: string) : CompilationUnit = + fsFromString (SourceFromPath path) |> FS + + let Fs (source: string) : CompilationUnit = + fsFromString (SourceCodeFileKind.Fs({FileName="test.fs"; SourceText=Some source })) |> FS let FSharp (source: string) : CompilationUnit = - fsFromString source SourceKind.Fs |> FS + fsFromString (SourceCodeFileKind.Fs({FileName="test.fs"; SourceText=Some source })) |> FS + + let FsFromPath (path: string) : CompilationUnit = + fsFromString (SourceFromPath path) |> FS let CSharp (source: string) : CompilationUnit = - csFromString source |> CS + csFromString (SourceCodeFileKind.Fs({FileName="test.cs"; SourceText=Some source })) |> CS + + let CSharpFromPath (path: string) : CompilationUnit = + csFromString (SourceFromPath path) |> CS + let asFsx (cUnit: CompilationUnit) : CompilationUnit = match cUnit with - | FS src -> FS { src with SourceKind = SourceKind.Fsx } + | FS src -> FS {src with Source=SourceCodeFileKind.Fsx({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} | _ -> failwith "Only F# compilation can be of type Fsx." let asFs (cUnit: CompilationUnit) : CompilationUnit = match cUnit with - | FS src -> FS { src with SourceKind = SourceKind.Fs } + | FS src -> FS {src with Source=SourceCodeFileKind.Fs({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} | _ -> failwith "Only F# compilation can be of type Fs." let withName (name: string) (cUnit: CompilationUnit) : CompilationUnit = @@ -238,6 +296,18 @@ module rec Compiler = | CS cs -> CS { cs with References = cs.References @ references } | IL _ -> failwith "References are not supported in IL" + let withAdditionalSourceFiles (additionalSources: SourceCodeFileKind list) (cUnit: CompilationUnit) : CompilationUnit = + match cUnit with + | FS fs -> FS { fs with AdditionalSources = fs.AdditionalSources @ additionalSources } + | CS _ -> failwith "References are not supported in C#" + | IL _ -> failwith "References are not supported in IL" + + let withAdditionalSourceFile (additionalSource: SourceCodeFileKind) (cUnit: CompilationUnit) : CompilationUnit = + match cUnit with + | FS fs -> FS { fs with AdditionalSources = fs.AdditionalSources @ [additionalSource]} + | CS _ -> failwith "References are not supported in C#" + | IL _ -> failwith "References are not supported in IL" + let private withOptionsHelper (options: string list) (message:string) (cUnit: CompilationUnit) : CompilationUnit = match cUnit with | FS fs -> FS { fs with Options = fs.Options @ options } @@ -246,6 +316,11 @@ module rec Compiler = let withOptions (options: string list) (cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper options "withOptions is only supported for F#" cUnit + let withOutputDirectory (path: string) (cUnit: CompilationUnit) : CompilationUnit = + match cUnit with + | FS fs -> FS { fs with OutputDirectory = Some (DirectoryInfo(path)) } + | _ -> failwith "withOutputDirectory is only supported on F#" + let withErrorRanges (cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper [ "--test:ErrorRanges" ] "withErrorRanges is only supported on F#" cUnit @@ -273,6 +348,33 @@ module rec Compiler = let withNoWarn warning (cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper [ $"--nowarn:{warning}" ] "withNoWarn is only supported for F#" cUnit + let withNoOptimize (cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--optimize-" ] "withNoOptimize is only supported for F#" cUnit + + let withOptimize (cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--optimize+" ] "withOptimize is only supported for F#" cUnit + + let withFullPdb(cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--debug:full" ] "withFullPdb is only supported for F#" cUnit + + let withPdbOnly(cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--debug:pdbonly" ] "withPdbOnly is only supported for F#" cUnit + + let withPortablePdb(cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--debug:portable" ] "withPortablePdb is only supported for F#" cUnit + + let withEmbeddedPdb(cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--debug:embedded" ] "withEmbeddedPdb is only supported for F#" cUnit + + let withEmbedAllSource(cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--embed+" ] "withEmbedAllSource is only supported for F#" cUnit + + let withEmbedNoSource(cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--embed-" ] "withEmbedNoSource is only supported for F#" cUnit + + let withEmbedSourceFiles(cUnit: CompilationUnit) files : CompilationUnit = + withOptionsHelper [ $"--embed:{files}" ] "withEmbedSourceFiles is only supported for F#" cUnit + /// Turns on checks that check integrity of XML doc comments let withXmlCommentChecking (cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper [ "--warnon:3390" ] "withXmlCommentChecking is only supported for F#" cUnit @@ -281,8 +383,13 @@ module rec Compiler = let withXmlCommentStrictParamChecking (cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper [ "--warnon:3391" ] "withXmlCommentChecking is only supported for F#" cUnit - let withPortablePdb (cUnit: CompilationUnit) : CompilationUnit = - withOptionsHelper ["--debug:portable"] "withPortablePdb is only supported for F#" cUnit + /// Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + let withNoOptimizationData (cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--nooptimizationdata" ] "withNoOptimizationData is only supported for F#" cUnit + + /// Don't add a resource to the generated assembly containing F#-specific metadata + let withNoInterfaceData (cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--nointerfacedata" ] "withNoInterfaceData is only supported for F#" cUnit let asLibrary (cUnit: CompilationUnit) : CompilationUnit = match cUnit with @@ -304,10 +411,10 @@ module rec Compiler = | CompilationReference (cmpl, _) -> let result = compileFSharpCompilation cmpl false cUnit match result with - | Failure f -> + | CompilationResult.Failure f -> let message = sprintf "Operation failed (expected to succeed).\n All errors:\n%A" (f.Diagnostics) failwith message - | Success s -> + | CompilationResult.Success s -> match s.OutputPath with | None -> failwith "Operation didn't produce any output!" | Some p -> p |> MetadataReference.CreateFromFile @@ -320,7 +427,6 @@ module rec Compiler = match x with | FS fs -> let refs = loop [] fs.References - let source = getSource fs.Source let options = fs.Options |> List.toArray let name = defaultArg fs.Name null let outDir = @@ -328,23 +434,22 @@ module rec Compiler = | Some outputDirectory -> outputDirectory | _ -> defaultOutputDirectory let cmpl = - Compilation.Create(source, fs.SourceKind, fs.OutputType, options, refs, name, outDir) |> CompilationReference.CreateFSharp + Compilation.CreateFromSources([fs.Source] @ fs.AdditionalSources, fs.OutputType, options, refs, name, outDir) |> CompilationReference.CreateFSharp loop (cmpl::acc) xs | CS cs -> let refs = loop [] cs.References - let source = getSource cs.Source let name = defaultArg cs.Name null let metadataReferences = List.map (asMetadataReference x) refs let cmpl = - CompilationUtil.CreateCSharpCompilation(source, cs.LangVersion, cs.TargetFramework, additionalReferences = metadataReferences.ToImmutableArray().As(), name = name) + CompilationUtil.CreateCSharpCompilation(cs.Source, cs.LangVersion, cs.TargetFramework, additionalReferences = metadataReferences.ToImmutableArray().As(), name = name) |> CompilationReference.Create loop (cmpl::acc) xs | IL _ -> failwith "TODO: Process references for IL" loop [] references - let private compileFSharpCompilation compilation ignoreWarnings (cUnit: CompilationUnit) : TestResult = + let private compileFSharpCompilation compilation ignoreWarnings (cUnit: CompilationUnit) : CompilationResult = let ((err: FSharpDiagnostic[], outputFilePath: string), deps) = CompilerAssert.CompileRaw(compilation, ignoreWarnings) @@ -362,14 +467,11 @@ module rec Compiler = // Treat warnings as errors if "IgnoreWarnings" is false if errors.Length > 0 || (warnings.Length > 0 && not ignoreWarnings) then - Failure result + CompilationResult.Failure result else - Success { result with OutputPath = Some outputFilePath } - - let private compileFSharp (fs: FSharpCompilationSource) : TestResult = + CompilationResult.Success { result with OutputPath = Some outputFilePath } - let source = getSource fs.Source - let sourceKind = fs.SourceKind + let private compileFSharp (fs: FSharpCompilationSource) : CompilationResult = let output = fs.OutputType let options = fs.Options |> Array.ofList let name = defaultArg fs.Name null @@ -377,24 +479,16 @@ module rec Compiler = match fs.OutputDirectory with | Some di -> di | None -> DirectoryInfo(tryCreateTemporaryDirectory()) - let references = processReferences fs.References outputDirectory - let compilation = Compilation.Create(source, sourceKind, output, options, references, name, outputDirectory) - + let compilation = Compilation.CreateFromSources([fs.Source] @ fs.AdditionalSources, output, options, references, name, outputDirectory) compileFSharpCompilation compilation fs.IgnoreWarnings (FS fs) - let private compileCSharpCompilation (compilation: CSharpCompilation) csSource : TestResult = - + let private compileCSharpCompilation (compilation: CSharpCompilation) csSource : CompilationResult = let outputPath = tryCreateTemporaryDirectory() - Directory.CreateDirectory(outputPath) |> ignore - let filename = compilation.AssemblyName - let output = Path.Combine(outputPath, Path.ChangeExtension(filename, ".dll")) - let cmplResult = compilation.Emit (output) - let result = { OutputPath = None Dependencies = [] @@ -404,13 +498,13 @@ module rec Compiler = Compilation = CS csSource } if cmplResult.Success then - Success { result with OutputPath = Some output } + CompilationResult.Success { result with OutputPath = Some output } else - Failure result + CompilationResult.Failure result - let private compileCSharp (csSource: CSharpCompilationSource) : TestResult = + let private compileCSharp (csSource: CSharpCompilationSource) : CompilationResult = - let source = getSource csSource.Source + let source = csSource.Source.GetSourceText |> Option.defaultValue "" let name = defaultArg csSource.Name (tryCreateTemporaryFileName()) let outputDirectory = @@ -439,20 +533,18 @@ module rec Compiler = compileCSharpCompilation cmpl csSource - let compile (cUnit: CompilationUnit) : TestResult = + let compile (cUnit: CompilationUnit) : CompilationResult = match cUnit with | FS fs -> compileFSharp fs | CS cs -> compileCSharp cs | _ -> failwith "TODO" - let private parseFSharp (fsSource: FSharpCompilationSource) : TestResult = - let source = getSource fsSource.Source - let fileName = if fsSource.SourceKind = SourceKind.Fsx then "test.fsx" else "test.fs" + let private parseFSharp (fsSource: FSharpCompilationSource) : CompilationResult = + let source = fsSource.Source.GetSourceText |> Option.defaultValue "" + let fileName = fsSource.Source.ChangeExtension.GetSourceFileName let parseResults = CompilerAssert.Parse(source, fileName = fileName) let failed = parseResults.ParseHadErrors - let diagnostics = parseResults.Diagnostics |> fromFSharpDiagnostic - let result = { OutputPath = None Dependencies = [] @@ -462,31 +554,27 @@ module rec Compiler = Compilation = FS fsSource } if failed then - Failure result + CompilationResult.Failure result else - Success result + CompilationResult.Success result - let parse (cUnit: CompilationUnit) : TestResult = + let parse (cUnit: CompilationUnit) : CompilationResult = match cUnit with | FS fs -> parseFSharp fs | _ -> failwith "Parsing only supported for F#." let private typecheckFSharpSourceAndReturnErrors (fsSource: FSharpCompilationSource) : FSharpDiagnostic [] = - let source = getSource fsSource.Source + let source = + match fsSource.Source.GetSourceText with + | None -> File.ReadAllText(fsSource.Source.GetSourceFileName) + | Some text -> text let options = fsSource.Options |> Array.ofList - - let name = match fsSource.Name with | None -> "test.fs" | Some n -> n - - let (err: FSharpDiagnostic []) = CompilerAssert.TypeCheckWithOptionsAndName options name source - + let (err: FSharpDiagnostic []) = CompilerAssert.TypeCheckWithOptionsAndName options (fsSource.Name |> Option.defaultValue "test.fs") source err - let private typecheckFSharpSource (fsSource: FSharpCompilationSource) : TestResult = - + let private typecheckFSharpSource (fsSource: FSharpCompilationSource) : CompilationResult = let (err: FSharpDiagnostic []) = typecheckFSharpSourceAndReturnErrors fsSource - let diagnostics = err |> fromFSharpDiagnostic - let result = { OutputPath = None Dependencies = [] @@ -494,20 +582,19 @@ module rec Compiler = Diagnostics = diagnostics Output = None Compilation = FS fsSource } - let (errors, warnings) = partitionErrors diagnostics // Treat warnings as errors if "IgnoreWarnings" is false; if errors.Length > 0 || (warnings.Length > 0 && not fsSource.IgnoreWarnings) then - Failure result + CompilationResult.Failure result else - Success result + CompilationResult.Success result - let private typecheckFSharp (fsSource: FSharpCompilationSource) : TestResult = + let private typecheckFSharp (fsSource: FSharpCompilationSource) : CompilationResult = match fsSource.Source with | _ -> typecheckFSharpSource fsSource - let typecheck (cUnit: CompilationUnit) : TestResult = + let typecheck (cUnit: CompilationUnit) : CompilationResult = match cUnit with | FS fs -> typecheckFSharp fs | _ -> failwith "Typecheck only supports F#" @@ -515,18 +602,16 @@ module rec Compiler = let typecheckResults (cUnit: CompilationUnit) : FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults = match cUnit with | FS fsSource -> - let source = getSource fsSource.Source + let source = fsSource.Source.GetSourceText |> Option.defaultValue "" + let fileName = fsSource.Source.ChangeExtension.GetSourceFileName let options = fsSource.Options |> Array.ofList - - let name = match fsSource.Name with | None -> "test.fs" | Some n -> n - - CompilerAssert.TypeCheck(options, name, source) + CompilerAssert.TypeCheck(options, fileName, source) | _ -> failwith "Typecheck only supports F#" - let run (result: TestResult) : TestResult = + let run (result: CompilationResult) : CompilationResult = match result with - | Failure f -> failwith (sprintf "Compilation should be successful in order to run.\n Errors: %A" (f.Diagnostics)) - | Success s -> + | CompilationResult.Failure f -> failwith (sprintf "Compilation should be successful in order to run.\n Errors: %A" (f.Diagnostics)) + | CompilationResult.Success s -> match s.OutputPath with | None -> failwith "Compilation didn't produce any output. Unable to run. (Did you forget to set output type to Exe?)" | Some p -> @@ -535,24 +620,21 @@ module rec Compiler = printfn "---------errors-------\n%s\n-------" errors let executionResult = { s with Output = Some (ExecutionOutput { ExitCode = exitCode; StdOut = output; StdErr = errors }) } if exitCode = 0 then - Success executionResult + CompilationResult.Success executionResult else - Failure executionResult + CompilationResult.Failure executionResult let compileAndRun = compile >> run let compileExeAndRun = asExe >> compileAndRun - let private evalFSharp (fs: FSharpCompilationSource) : TestResult = - let source = getSource fs.Source + let private evalFSharp (fs: FSharpCompilationSource) : CompilationResult = + let source = fs.Source.GetSourceText |> Option.defaultValue "" let options = fs.Options |> Array.ofList use script = new FSharpScript(additionalArgs=options) - let ((evalresult: Result), (err: FSharpDiagnostic[])) = script.Eval(source) - let diagnostics = err |> fromFSharpDiagnostic - let result = { OutputPath = None Dependencies = [] @@ -562,25 +644,23 @@ module rec Compiler = Compilation = FS fs } let (errors, warnings) = partitionErrors diagnostics - let evalError = match evalresult with Ok _ -> false | _ -> true - if evalError || errors.Length > 0 || (warnings.Length > 0 && not fs.IgnoreWarnings) then - Failure result + CompilationResult.Failure result else - Success result + CompilationResult.Success result - let eval (cUnit: CompilationUnit) : TestResult = + let eval (cUnit: CompilationUnit) : CompilationResult = match cUnit with | FS fs -> evalFSharp fs | _ -> failwith "Script evaluation is only supported for F#." - let runFsi (cUnit: CompilationUnit) : TestResult = + let runFsi (cUnit: CompilationUnit) : CompilationResult = match cUnit with | FS fs -> let disposals = ResizeArray() try - let source = getSource fs.Source + let source = fs.Source.GetSourceText |> Option.defaultValue "" let name = fs.Name |> Option.defaultValue "unnamed" let options = fs.Options |> Array.ofList let outputDirectory = @@ -591,7 +671,7 @@ module rec Compiler = disposals.Add({ new IDisposable with member _.Dispose() = outputDirectory.Delete(true) }) let references = processReferences fs.References outputDirectory - let cmpl = Compilation.Create(source, fs.SourceKind, fs.OutputType, options, references, name, outputDirectory) + let cmpl = Compilation.Create(fs.Source, fs.OutputType, options, references, name, outputDirectory) let _compilationRefs, _deps = evaluateReferences outputDirectory disposals fs.IgnoreWarnings cmpl let options = let opts = new ResizeArray(fs.Options) @@ -601,7 +681,7 @@ module rec Compiler = match reference with | CompilationReference( cmpl, _) -> match cmpl with - | Compilation(_source, _sourceKind, _outputType, _options, _references, _name, outputDirectory) -> + | Compilation(_sources, _outputType, _options, _references, _name, outputDirectory) -> if outputDirectory.IsSome then opts.Add($"-I:\"{(outputDirectory.Value.FullName)}\"") | _ -> () @@ -621,9 +701,9 @@ module rec Compiler = ExitCode = -1 StdOut = String.Empty StdErr = ((errors |> String.concat "\n").Replace("\r\n","\n")) } - Failure { result with Output = Some output } + CompilationResult.Failure { result with Output = Some output } else - Success result + CompilationResult.Success result finally disposals @@ -640,7 +720,7 @@ module rec Compiler = | None -> failwith "Baseline was not provided." | Some bsl -> let errorsExpectedBaseLine = - match bsl.OutputBaseline.Content with + match bsl.FSBaseline.Content with | Some b -> b.Replace("\r\n","\n") | None -> String.Empty @@ -649,9 +729,12 @@ module rec Compiler = let errorsActual = (typecheckDiagnostics |> Array.map (sprintf "%A") |> String.concat "\n").Replace("\r\n","\n") if errorsExpectedBaseLine <> errorsActual then - createBaselineErrors bsl.OutputBaseline errorsActual + fs.CreateOutputDirectory() + createBaselineErrors bsl.FSBaseline errorsActual + elif FileSystem.FileExistsShim(bsl.FSBaseline.FilePath) then + FileSystem.FileDeleteShim(bsl.FSBaseline.FilePath) - Assert.AreEqual(errorsExpectedBaseLine, errorsActual) + Assert.AreEqual(errorsExpectedBaseLine, errorsActual, $"\nExpected:\n{errorsExpectedBaseLine}\nActual:\n{errorsActual}") /// Check the typechecker output against the baseline, if invoked with empty baseline, will expect no error/warnings output. let verifyBaseline (cUnit: CompilationUnit) : CompilationUnit = @@ -661,15 +744,15 @@ module rec Compiler = cUnit - let verifyIL (il: string list) (result: TestResult) : unit = + let verifyIL (il: string list) (result: CompilationResult) : unit = match result with - | Success s -> + | CompilationResult.Success s -> match s.OutputPath with | None -> failwith "Operation didn't produce any output!" | Some p -> ILChecker.checkIL p il - | Failure _ -> failwith "Result should be \"Success\" in order to get IL." + | CompilationResult.Failure _ -> failwith "Result should be \"Success\" in order to get IL." - let private verifyFSILBaseline (baseline: Baseline option) (result: Output) : unit = + let private verifyFSILBaseline (baseline: Baseline option) (result: CompilationOutput) : unit = match baseline with | None -> failwith "Baseline was not provided." | Some bsl -> @@ -678,7 +761,7 @@ module rec Compiler = | Some p -> let expectedIL = match bsl.ILBaseline.Content with - | Some b -> b.Replace("\r\n","\n") + | Some b -> b | None -> String.Empty let (success, errorMsg, actualIL) = ILChecker.verifyILAndReturnActual p expectedIL @@ -689,9 +772,9 @@ module rec Compiler = let verifyILBaseline (cUnit: CompilationUnit) : CompilationUnit = match cUnit with | FS fs -> - match fs |> compileFSharp |> shouldSucceed with - | Failure _ -> failwith "Result should be \"Success\" in order to get IL." - | Success s -> verifyFSILBaseline fs.Baseline s + match fs |> compileFSharp with + | CompilationResult.Failure _ -> failwith "Result should be \"Success\" in order to get IL." + | CompilationResult.Success s -> verifyFSILBaseline fs.Baseline s | _ -> failwith "Baseline tests are only supported for F#." cUnit @@ -762,7 +845,7 @@ module rec Compiler = | VerifyImportScopes scopes -> verifyPdbImportTables reader scopes | _ -> failwith $"Unknown verification option: {option.ToString()}" - let private verifyPortablePdb (result: Output) options : unit = + let private verifyPortablePdb (result: CompilationOutput) options : unit = match result.OutputPath with | Some assemblyPath -> let pdbPath = Path.ChangeExtension(assemblyPath, ".pdb") @@ -783,9 +866,9 @@ module rec Compiler = () - let verifyPdb (options: PdbVerificationOption list) (result: TestResult) : TestResult = + let verifyPdb (options: PdbVerificationOption list) (result: CompilationResult) : CompilationResult = match result with - | Success r -> verifyPortablePdb r options + | CompilationResult.Success r -> verifyPortablePdb r options | _ -> failwith "Result should be \"Success\" in order to verify PDB." result @@ -838,15 +921,15 @@ module rec Compiler = checkEqual "Message" expectedMessage actualMessage) () - let adjust (adjust: int) (result: TestResult) : TestResult = + let adjust (adjust: int) (result: CompilationResult) : CompilationResult = match result with - | Success s -> Success { s with Adjust = adjust } - | Failure f -> Failure { f with Adjust = adjust } + | CompilationResult.Success s -> CompilationResult.Success { s with Adjust = adjust } + | CompilationResult.Failure f -> CompilationResult.Failure { f with Adjust = adjust } - let shouldSucceed (result: TestResult) : TestResult = + let shouldSucceed (result: CompilationResult) : CompilationResult = match result with - | Success _ -> result - | Failure r -> + | CompilationResult.Success _ -> result + | CompilationResult.Failure r -> let message = [ sprintf "Operation failed (expected to succeed).\n All errors:\n%A\n" r.Diagnostics match r.Output with @@ -856,24 +939,25 @@ module rec Compiler = |> String.concat "\n" failwith message - let shouldFail (result: TestResult) : TestResult = + let shouldFail (result: CompilationResult) : CompilationResult = match result with - | Success _ -> failwith "Operation was succeeded (expected to fail)." - | Failure _ -> result + | CompilationResult.Success _ -> failwith "Operation was succeeded (expected to fail)." + | CompilationResult.Failure _ -> result - let private assertResultsCategory (what: string) (selector: Output -> ErrorInfo list) (expected: ErrorInfo list) (result: TestResult) : TestResult = + let private assertResultsCategory (what: string) (selector: CompilationOutput -> ErrorInfo list) (expected: ErrorInfo list) (result: CompilationResult) : CompilationResult = match result with - | Success r | Failure r -> + | CompilationResult.Success r + | CompilationResult.Failure r -> assertErrors what r.Adjust (selector r) expected result - let withResults (expectedResults: ErrorInfo list) result : TestResult = + let withResults (expectedResults: ErrorInfo list) result : CompilationResult = assertResultsCategory "Results" (fun r -> r.Diagnostics) expectedResults result - let withResult (expectedResult: ErrorInfo ) (result: TestResult) : TestResult = + let withResult (expectedResult: ErrorInfo ) (result: CompilationResult) : CompilationResult = withResults [expectedResult] result - let withDiagnostics (expected: (ErrorType * Line * Col * Line * Col * string) list) (result: TestResult) : TestResult = + let withDiagnostics (expected: (ErrorType * Line * Col * Line * Col * string) list) (result: CompilationResult) : CompilationResult = let (expectedResults: ErrorInfo list) = expected |> List.map( @@ -888,82 +972,87 @@ module rec Compiler = Message = message }) withResults expectedResults result - let withSingleDiagnostic (expected: (ErrorType * Line * Col * Line * Col * string)) (result: TestResult) : TestResult = + let withSingleDiagnostic (expected: (ErrorType * Line * Col * Line * Col * string)) (result: CompilationResult) : CompilationResult = withDiagnostics [expected] result - let withErrors (expectedErrors: ErrorInfo list) (result: TestResult) : TestResult = + let withErrors (expectedErrors: ErrorInfo list) (result: CompilationResult) : CompilationResult = assertResultsCategory "Errors" (fun r -> getErrors r.Diagnostics) expectedErrors result - let withError (expectedError: ErrorInfo) (result: TestResult) : TestResult = + let withError (expectedError: ErrorInfo) (result: CompilationResult) : CompilationResult = withErrors [expectedError] result - let checkCodes (expected: int list) (selector: Output -> ErrorInfo list) (result: TestResult) : TestResult = + let checkCodes (expected: int list) (selector: CompilationOutput -> ErrorInfo list) (result: CompilationResult) : CompilationResult = match result with - | Success r | Failure r -> + | CompilationResult.Success r + | CompilationResult.Failure r -> assertErrorNumbers (selector r) expected result - let withErrorCodes (expectedCodes: int list) (result: TestResult) : TestResult = + let withErrorCodes (expectedCodes: int list) (result: CompilationResult) : CompilationResult = checkCodes expectedCodes (fun r -> getErrors r.Diagnostics) result - let withErrorCode (expectedCode: int) (result: TestResult) : TestResult = + let withErrorCode (expectedCode: int) (result: CompilationResult) : CompilationResult = withErrorCodes [expectedCode] result - let withWarnings (expectedWarnings: ErrorInfo list) (result: TestResult) : TestResult = + let withWarnings (expectedWarnings: ErrorInfo list) (result: CompilationResult) : CompilationResult = assertResultsCategory "Warnings" (fun r -> getWarnings r.Diagnostics) expectedWarnings result - let withWarning (expectedWarning: ErrorInfo) (result: TestResult) : TestResult = + let withWarning (expectedWarning: ErrorInfo) (result: CompilationResult) : CompilationResult = withWarnings [expectedWarning] result - let withWarningCodes (expectedCodes: int list) (result: TestResult) : TestResult = + let withWarningCodes (expectedCodes: int list) (result: CompilationResult) : CompilationResult = checkCodes expectedCodes (fun r -> getWarnings r.Diagnostics) result - let withWarningCode (expectedCode: int) (result: TestResult) : TestResult = + let withWarningCode (expectedCode: int) (result: CompilationResult) : CompilationResult = withWarningCodes [expectedCode] result - let private checkErrorMessages (messages: string list) (selector: Output -> ErrorInfo list) (result: TestResult) : TestResult = + let private checkErrorMessages (messages: string list) (selector: CompilationOutput -> ErrorInfo list) (result: CompilationResult) : CompilationResult = match result with - | Success r | Failure r -> assertErrorMessages (selector r) messages + | CompilationResult.Success r + | CompilationResult.Failure r -> assertErrorMessages (selector r) messages result let private diagnosticMatches (pattern: string) (diagnostics: ErrorInfo list) : bool = diagnostics |> List.exists (fun d -> Regex.IsMatch(d.Message, pattern)) - let withDiagnosticMessageMatches (pattern: string) (result: TestResult) : TestResult = + let withDiagnosticMessageMatches (pattern: string) (result: CompilationResult) : CompilationResult = match result with - | Success r | Failure r -> + | CompilationResult.Success r + | CompilationResult.Failure r -> if not <| diagnosticMatches pattern r.Diagnostics then failwithf "Expected diagnostic message pattern was not found in compilation diagnostics.\nDiagnostics:\n%A" r.Diagnostics result - let withDiagnosticMessageDoesntMatch (pattern: string) (result: TestResult) : TestResult = + let withDiagnosticMessageDoesntMatch (pattern: string) (result: CompilationResult) : CompilationResult = match result with - | Success r | Failure r -> + | CompilationResult.Success r + | CompilationResult.Failure r -> if diagnosticMatches pattern r.Diagnostics then failwith "Diagnostic message pattern was not expected, but was present." result - let withMessages (messages: string list) (result: TestResult) : TestResult = + let withMessages (messages: string list) (result: CompilationResult) : CompilationResult = checkErrorMessages messages (fun r -> r.Diagnostics) result - let withMessage (message: string) (result: TestResult) : TestResult = + let withMessage (message: string) (result: CompilationResult) : CompilationResult = withMessages [message] result - let withErrorMessages (messages: string list) (result: TestResult) : TestResult = + let withErrorMessages (messages: string list) (result: CompilationResult) : CompilationResult = checkErrorMessages messages (fun r -> getErrors r.Diagnostics) result - let withErrorMessage (message: string) (result: TestResult) : TestResult = + let withErrorMessage (message: string) (result: CompilationResult) : CompilationResult = withErrorMessages [message] result - let withWarningMessages (messages: string list) (result: TestResult) : TestResult = + let withWarningMessages (messages: string list) (result: CompilationResult) : CompilationResult = checkErrorMessages messages (fun r -> getWarnings r.Diagnostics) result - let withWarningMessage (message: string) (result: TestResult) : TestResult = + let withWarningMessage (message: string) (result: CompilationResult) : CompilationResult = withWarningMessages [message] result - let withExitCode (expectedExitCode: int) (result: TestResult) : TestResult = + let withExitCode (expectedExitCode: int) (result: CompilationResult) : CompilationResult = match result with - | Success r | Failure r -> + | CompilationResult.Success r + | CompilationResult.Failure r -> match r.Output with | None -> failwith "Execution output is missing, cannot check exit code." | Some o -> @@ -972,9 +1061,10 @@ module rec Compiler = | _ -> failwith "Cannot check exit code on this run result." result - let private checkOutput (category: string) (substring: string) (selector: ExecutionOutput -> string) (result: TestResult) : TestResult = + let private checkOutput (category: string) (substring: string) (selector: ExecutionOutput -> string) (result: CompilationResult) : CompilationResult = match result with - | Success r | Failure r -> + | CompilationResult.Success r + | CompilationResult.Failure r -> match r.Output with | None -> failwith (sprintf "Execution output is missing cannot check \"%A\"" category) | Some o -> @@ -986,19 +1076,20 @@ module rec Compiler = | _ -> failwith "Cannot check output on this run result." result - let withOutputContains (substring: string) (result: TestResult) : TestResult = + let withOutputContains (substring: string) (result: CompilationResult) : CompilationResult = checkOutput "STDERR/STDOUT" substring (fun o -> o.StdOut + "\n" + o.StdErr) result - let withStdOutContains (substring: string) (result: TestResult) : TestResult = + let withStdOutContains (substring: string) (result: CompilationResult) : CompilationResult = checkOutput "STDOUT" substring (fun o -> o.StdOut) result - let withStdErrContains (substring: string) (result: TestResult) : TestResult = + let withStdErrContains (substring: string) (result: CompilationResult) : CompilationResult = checkOutput "STDERR" substring (fun o -> o.StdErr) result // TODO: probably needs a bit of simplification, + need to remove that pyramid of doom. - let private assertEvalOutput (selector: FsiValue -> 'T) (value: 'T) (result: TestResult) : TestResult = + let private assertEvalOutput (selector: FsiValue -> 'T) (value: 'T) (result: CompilationResult) : CompilationResult = match result with - | Success r | Failure r -> + | CompilationResult.Success r + | CompilationResult.Failure r -> match r.Output with | None -> failwith "Execution output is missing cannot check value." | Some o -> @@ -1017,8 +1108,8 @@ module rec Compiler = // STDIN, to test completions // Contains // Cancellation - let withEvalValueEquals (value: 'T) (result: TestResult) : TestResult = + let withEvalValueEquals (value: 'T) (result: CompilationResult) : CompilationResult = assertEvalOutput (fun (x: FsiValue) -> x.ReflectionValue :?> 'T) value result - let withEvalTypeEquals t (result: TestResult) : TestResult = + let withEvalTypeEquals t (result: CompilationResult) : CompilationResult = assertEvalOutput (fun (x: FsiValue) -> x.ReflectionType) t result diff --git a/tests/FSharp.Test.Utilities/CompilerAssert.fs b/tests/FSharp.Test.Utilities/CompilerAssert.fs index 1c606fad37e..9c50d662c75 100644 --- a/tests/FSharp.Test.Utilities/CompilerAssert.fs +++ b/tests/FSharp.Test.Utilities/CompilerAssert.fs @@ -14,9 +14,12 @@ open FSharp.Compiler.Text #if FX_NO_APP_DOMAINS open System.Runtime.Loader #endif -open NUnit.Framework open FSharp.Test.Utilities +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.CSharp +open NUnit.Framework open TestFramework +open System.Collections.Immutable [] type ILVerifier (dllFilePath: string) = @@ -29,15 +32,154 @@ type PdbDebugInfo(debugInfo: string) = member _.InfoText = debugInfo -type SourceKind = - | Fs - | Fsx - type CompileOutput = | Library | Exe -type CompilationReference = +type SourceCodeFile = + { + FileName: string + SourceText: string option + } + +/// A source code file +[] +type SourceCodeFileKind = + | Fs of SourceCodeFile + | Fsx of SourceCodeFile + | Fsi of SourceCodeFile + | Cs of SourceCodeFile + + static member Create(path:string, ?source: string) = + match Path.GetExtension(path).ToLowerInvariant() with + | ".fsi" -> Fsi({FileName=path; SourceText=source}) + | ".fsx" -> Fsx({FileName=path; SourceText=source}) + | ".cs" -> Cs({FileName=path; SourceText=source}) + | ".fs" | _ -> Fs({FileName=path; SourceText=source}) + + member this.ChangeExtension = + match this with + | Fs s -> Fs({s with FileName=Path.ChangeExtension(s.FileName, ".fs")}) + | Fsx s -> Fsx({s with FileName=Path.ChangeExtension(s.FileName, ".fsx")}) + | Fsi s -> Fsi({s with FileName=Path.ChangeExtension(s.FileName, ".fsi")}) + | Cs s -> Cs({s with FileName=Path.ChangeExtension(s.FileName, ".cs")}) + + member this.IsScript = + match this with + | Fsx _ -> true + | _ -> false + + member this.WithFileName (name:string)= + match this with + | Fs s -> Fs({s with FileName=name}) + | Fsx s -> Fsx({s with FileName=name}) + | Fsi s -> Fsi({s with FileName=name}) + | Cs s -> Cs({s with FileName=name}) + + member this.GetSourceFileName = + match this with + | Fs s -> s.FileName + | Fsx s -> s.FileName + | Fsi s -> s.FileName + | Cs s -> s.FileName + + member this.GetSourceText = + match this with + | Fs s -> s.SourceText + | Fsx s -> s.SourceText + | Fsi s -> s.SourceText + | Cs s -> s.SourceText + +type RoslynLanguageVersion = LanguageVersion + +[] +type CSharpCompilationFlags = + | None = 0x0 + | InternalsVisibleTo = 0x1 + +[] +type TestCompilation = + | CSharp of CSharpCompilation + | IL of ilSource: string * result: Lazy + + member this.AssertNoErrorsOrWarnings () = + match this with + | TestCompilation.CSharp c -> + let diagnostics = c.GetDiagnostics () + + if not diagnostics.IsEmpty then + NUnit.Framework.Assert.Fail ("CSharp source diagnostics:\n" + (diagnostics |> Seq.map (fun x -> x.GetMessage () + "\n") |> Seq.reduce (+))) + + | TestCompilation.IL (_, result) -> + let errors, _ = result.Value + if errors.Length > 0 then + NUnit.Framework.Assert.Fail ("IL source errors: " + errors) + + member this.EmitAsFile (outputPath: string) = + match this with + | TestCompilation.CSharp c -> + let c = c.WithAssemblyName(Path.GetFileNameWithoutExtension outputPath) + let emitResult = c.Emit outputPath + if not emitResult.Success then + failwithf "Unable to emit C# compilation.\n%A" emitResult.Diagnostics + + | TestCompilation.IL (_, result) -> + let (_, data) = result.Value + File.WriteAllBytes (outputPath, data) + +type CSharpLanguageVersion = + | CSharp8 = 0 + | CSharp9 = 1 + +[] +type CompilationUtil private () = + + static let createCSharpCompilation (source: SourceCodeFileKind, lv, tf, additionalReferences, name) = + let lv = + match lv with + | CSharpLanguageVersion.CSharp8 -> LanguageVersion.CSharp8 + | CSharpLanguageVersion.CSharp9 -> LanguageVersion.CSharp9 + | _ -> LanguageVersion.Default + + let tf = defaultArg tf TargetFramework.NetStandard20 + let source = source.GetSourceText |> Option.defaultValue "" + let name = defaultArg name (Guid.NewGuid().ToString ()) + let additionalReferences = defaultArg additionalReferences ImmutableArray.Empty + let references = TargetFrameworkUtil.getReferences tf + let c = + CSharpCompilation.Create( + name, + [ CSharpSyntaxTree.ParseText (source, CSharpParseOptions lv) ], + (references.As()).AddRange(additionalReferences.As()), + CSharpCompilationOptions (OutputKind.DynamicallyLinkedLibrary)) + TestCompilation.CSharp c + + static member CreateCSharpCompilation (source:SourceCodeFileKind, lv, ?tf, ?additionalReferences, ?name) = + createCSharpCompilation (source, lv, tf, additionalReferences, name) + + static member CreateCSharpCompilation (source:string, lv, ?tf, ?additionalReferences, ?name) = + createCSharpCompilation (SourceCodeFileKind.Create("test.cs", source), lv, tf, additionalReferences, name) + + static member CreateILCompilation (source: string) = + let compute = + lazy + let ilFilePath = tryCreateTemporaryFileName () + let tmp = tryCreateTemporaryFileName () + let dllFilePath = Path.ChangeExtension (tmp, ".dll") + try + File.WriteAllText (ilFilePath, source) + let errors = ILChecker.reassembleIL ilFilePath dllFilePath + try + (errors, File.ReadAllBytes dllFilePath) + with + | _ -> (errors, [||]) + finally + try File.Delete ilFilePath with | _ -> () + try File.Delete tmp with | _ -> () + try File.Delete dllFilePath with | _ -> () + TestCompilation.IL (source, compute) + +and CompilationReference = private | CompilationReference of Compilation * staticLink: bool | TestCompilationReference of TestCompilation @@ -50,23 +192,50 @@ type CompilationReference = TestCompilationReference cmpl and Compilation = - private Compilation of - source: string * - sourceKind: SourceKind * + private + | Compilation of + sources: SourceCodeFileKind list * outputType: CompileOutput * options: string[] * CompilationReference list * name: string option * outputDirectory: DirectoryInfo option with - static member Create(source, sourceKind, output, ?options, ?cmplRefs, ?name, ?outputDirectory: DirectoryInfo) = + static member Create(source:SourceCodeFileKind, output:CompileOutput, ?options:string array, ?cmplRefs:CompilationReference list, ?name:string, ?outputDirectory: DirectoryInfo) = + let options = defaultArg options [||] + let cmplRefs = defaultArg cmplRefs [] + let name = + match defaultArg name null with + | null -> None + | n -> Some n + Compilation([source], output, options, cmplRefs, name, outputDirectory) + + static member Create(source:string, output:CompileOutput, ?options:string array, ?cmplRefs:CompilationReference list, ?name:string, ?outputDirectory: DirectoryInfo) = + let options = defaultArg options [||] + let cmplRefs = defaultArg cmplRefs [] + let name = + match defaultArg name null with + | null -> None + | n -> Some n + Compilation([SourceCodeFileKind.Create("test.fs", source)], output, options, cmplRefs, name, outputDirectory) + + static member Create(fileName:string, source:string, output, ?options, ?cmplRefs, ?name, ?outputDirectory: DirectoryInfo) = + let source = SourceCodeFileKind.Create(fileName, source) + let options = defaultArg options [||] + let cmplRefs = defaultArg cmplRefs [] + let name = defaultArg name null + let outputDirectory = defaultArg outputDirectory null + Compilation.Create(source, output, options, cmplRefs, name, outputDirectory) + + static member CreateFromSources(sources, output, ?options, ?cmplRefs, ?name, ?outputDirectory: DirectoryInfo) = let options = defaultArg options [||] let cmplRefs = defaultArg cmplRefs [] let name = match defaultArg name null with | null -> None | n -> Some n - Compilation(source, sourceKind, output, options, cmplRefs, name, outputDirectory) + Compilation(sources, output, options, cmplRefs, name, outputDirectory) + module rec CompilerAssertHelpers = @@ -144,48 +313,69 @@ module rec CompilerAssertHelpers = Stamp = None } - let rawCompile inputFilePath outputFilePath isExe options source = - File.WriteAllText (inputFilePath, source) + let rawCompile outputFilePath isExe options (sources: SourceCodeFileKind list) = let args = - [| yield "fsc.dll"; - yield inputFilePath; - yield "-o:" + outputFilePath; - yield (if isExe then "--target:exe" else "--target:library"); - yield! defaultProjectOptions.OtherOptions - yield! options + [| + yield "fsc.dll" + for item in sources do + yield item.GetSourceFileName + yield "-o:" + outputFilePath + yield (if isExe then "--target:exe" else "--target:library") + yield! defaultProjectOptions.OtherOptions + yield! options |] + + // Generate a response file, purely for diagnostic reasons. + File.WriteAllLines(Path.ChangeExtension(outputFilePath, ".rsp"), args) let errors, _ = checker.Compile args |> Async.RunImmediate errors, outputFilePath - let compileAux isExe options source f : unit = - let inputFilePath = Path.ChangeExtension(tryCreateTemporaryFileName (), ".fs") - let outputFilePath = Path.ChangeExtension (tryCreateTemporaryFileName (), if isExe then ".exe" else ".dll") - try - f (rawCompile inputFilePath outputFilePath isExe options source) - finally - try File.Delete inputFilePath with | _ -> () - try File.Delete outputFilePath with | _ -> () - - let compileDisposable (outputDirectory:DirectoryInfo) isScript isExe options nameOpt source = - let ext = - if isScript then ".fsx" - else ".fs" - let inputFilePath = Path.ChangeExtension(Path.Combine(outputDirectory.FullName, tryCreateTemporaryFileName()), ext) + let compileDisposable (outputDirectory:DirectoryInfo) isExe options nameOpt (sources:SourceCodeFileKind list) = + let disposeFile path = + { + new IDisposable with + member _.Dispose() = + try File.Delete path with | _ -> () + } + let disposals = ResizeArray() + let disposeList = + { + new IDisposable with + member _.Dispose() = + for item in disposals do + item.Dispose() + } let name = match nameOpt with | Some name -> name | _ -> tryCreateTemporaryFileName() + let outputFilePath = Path.ChangeExtension (Path.Combine(outputDirectory.FullName, name), if isExe then ".exe" else ".dll") - let o = - { new IDisposable with - member _.Dispose() = - try File.Delete inputFilePath with | _ -> () - try File.Delete outputFilePath with | _ -> () } + disposals.Add(disposeFile outputFilePath) + let sources = + [ + for item in sources do + match item.GetSourceText with + | Some text -> + // In memory source file copy it to the build directory + let source = item.ChangeExtension + File.WriteAllText (source.GetSourceFileName, text) + disposals.Add(disposeFile source.GetSourceFileName) + yield source + | None -> + // On Disk file + let sourceFileName = item.GetSourceFileName + let source = item.ChangeExtension + let destFileName = Path.Combine(outputDirectory.FullName, Path.GetFileName(source.GetSourceFileName)) + File.Copy(sourceFileName, destFileName, true) + disposals.Add(disposeFile destFileName) + yield source.WithFileName(destFileName) + ] try - o, rawCompile inputFilePath outputFilePath isExe options source + disposeList, rawCompile outputFilePath isExe options sources with | _ -> - o.Dispose() + disposeList.Dispose() reraise() let assertErrors libAdjust ignoreWarnings (errors: FSharpDiagnostic []) expectedErrors = @@ -213,12 +403,29 @@ module rec CompilerAssertHelpers = checkEqual "ErrorRange" expectedErrorRange actualErrorRange checkEqual "Message" expectedErrorMsg actualErrorMsg) - let compile isExe options source f = - compileAux isExe options source f + + let compile isExe options (source:SourceCodeFileKind) f = + let sourceFile = + match source.GetSourceText with + | Some text -> + // In memory source file copy it to the build directory + let s = source.WithFileName(tryCreateTemporaryFileName ()).ChangeExtension + File.WriteAllText (source.GetSourceFileName, text) + s + | None -> + // On Disk file + source + + let outputFilePath = Path.ChangeExtension (tryCreateTemporaryFileName (), if isExe then ".exe" else ".dll") + try + f (rawCompile outputFilePath isExe options [source]) + finally + try File.Delete sourceFile.GetSourceFileName with | _ -> () + try File.Delete outputFilePath with | _ -> () let rec evaluateReferences (outputPath:DirectoryInfo) (disposals: ResizeArray) ignoreWarnings (cmpl: Compilation) : string[] * string list = match cmpl with - | Compilation(_, _, _, _, cmpls, _, _) -> + | Compilation(_, _, _, cmpls, _, _) -> let compiledRefs = cmpls |> List.map (fun cmpl -> @@ -258,34 +465,15 @@ module rec CompilerAssertHelpers = let rec compileCompilationAux outputDirectory (disposals: ResizeArray) ignoreWarnings (cmpl: Compilation) : (FSharpDiagnostic[] * string) * string list = let compilationRefs, deps = evaluateReferences outputDirectory disposals ignoreWarnings cmpl - - let isScript = - match cmpl with - | Compilation(_, kind, _, _, _, _, _) -> - match kind with - | Fs -> false - | Fsx -> true - - let isExe = - match cmpl with - | Compilation(_, _, output, _, _, _, _) -> - match output with - | Library -> false - | Exe -> true - - let source = - match cmpl with - | Compilation(source, _, _, _, _, _, _) -> source - - let options = - match cmpl with - | Compilation(_, _, _, options, _, _, _) -> options - - let nameOpt = + let isExe, sources, options, name = match cmpl with - | Compilation(_, _, _, _, _, nameOpt, _) -> nameOpt + | Compilation(sources, output, options, _, name, _) -> + (match output with | Library -> false | Exe -> true), // isExe + sources, + options, + name - let disposal, res = compileDisposable outputDirectory isScript isExe (Array.append options compilationRefs) nameOpt source + let disposal, res = compileDisposable outputDirectory isExe (Array.append options compilationRefs) name sources disposals.Add(disposal) let deps2 = @@ -312,8 +500,8 @@ module rec CompilerAssertHelpers = let rec returnCompilation (cmpl: Compilation) ignoreWarnings = let outputDirectory = match cmpl with - | Compilation(_, _, _, _, _, _, Some outputDirectory) -> DirectoryInfo(outputDirectory.FullName) - | Compilation(_, _, _, _, _, _, _) -> DirectoryInfo(tryCreateTemporaryDirectory()) + | Compilation(_, _, _, _, _, Some outputDirectory) -> DirectoryInfo(outputDirectory.FullName) + | Compilation(_, _, _, _, _, _) -> DirectoryInfo(tryCreateTemporaryDirectory()) outputDirectory.Create() |> ignore compileCompilationAux outputDirectory (ResizeArray()) ignoreWarnings cmpl @@ -374,12 +562,53 @@ module rec CompilerAssertHelpers = let timeout = 30000 let exitCode, output, errors = Commands.executeProcess (Some filename) arguments (Path.GetDirectoryName(outputFilePath)) timeout (exitCode, output |> String.concat "\n", errors |> String.concat "\n") - open CompilerAssertHelpers [] type CompilerAssert private () = + static let compileExeAndRunWithOptions options (source: SourceCodeFileKind) = + compile true options source (fun (errors, outputExe) -> + + if errors.Length > 0 then + Assert.Fail (sprintf "Compile had warnings and/or errors: %A" errors) + + executeBuiltApp outputExe [] + ) + + static let compileLibraryAndVerifyILWithOptions options (source: SourceCodeFileKind) (f: ILVerifier -> unit) = + compile false options source (fun (errors, outputFilePath) -> + let errors = + errors |> Array.filter (fun x -> x.Severity = FSharpDiagnosticSeverity.Error) + if errors.Length > 0 then + Assert.Fail (sprintf "Compile had errors: %A" errors) + + f (ILVerifier outputFilePath) + ) + + + static let compileLibraryAndVerifyDebugInfoWithOptions options (expectedFile: string) (source: SourceCodeFileKind) = + let options = [| yield! options; yield"--test:DumpDebugInfo" |] + compile false options source (fun (errors, outputFilePath) -> + let errors = + errors |> Array.filter (fun x -> x.Severity = FSharpDiagnosticSeverity.Error) + if errors.Length > 0 then + Assert.Fail (sprintf "Compile had errors: %A" errors) + let debugInfoFile = outputFilePath + ".debuginfo" + if not (File.Exists expectedFile) then + File.Copy(debugInfoFile, expectedFile) + failwith $"debug info expected file {expectedFile} didn't exist, now copied over" + let debugInfo = File.ReadAllLines(debugInfoFile) + let expected = File.ReadAllLines(expectedFile) + if debugInfo <> expected then + File.Copy(debugInfoFile, expectedFile, overwrite=true) + failwith $"""debug info mismatch +Expected is in {expectedFile} +Actual is in {debugInfoFile} +Updated automatically, please check diffs in your pull request, changes must be scrutinized +""" + ) + static member Checker = checker static member DefaultProjectOptions = defaultProjectOptions @@ -629,60 +858,51 @@ type CompilerAssert private () = static member TypeCheckSingleError (source: string) (expectedSeverity: FSharpDiagnosticSeverity) (expectedErrorNumber: int) (expectedErrorRange: int * int * int * int) (expectedErrorMsg: string) = CompilerAssert.TypeCheckWithErrors source [| expectedSeverity, expectedErrorNumber, expectedErrorRange, expectedErrorMsg |] - static member CompileExeWithOptions options (source: string) = + static member CompileExeWithOptions(options, (source: SourceCodeFileKind)) = compile true options source (fun (errors, _) -> if errors.Length > 0 then Assert.Fail (sprintf "Compile had warnings and/or errors: %A" errors)) + static member CompileExeWithOptions(options, (source: string)) = + compile true options (SourceCodeFileKind.Create("test.fs", source)) (fun (errors, _) -> + if errors.Length > 0 then + Assert.Fail (sprintf "Compile had warnings and/or errors: %A" errors)) + + static member CompileExe (source: SourceCodeFileKind) = + CompilerAssert.CompileExeWithOptions([||], source) + static member CompileExe (source: string) = - CompilerAssert.CompileExeWithOptions [||] source + CompilerAssert.CompileExeWithOptions([||], (SourceCodeFileKind.Create("test.fs", source))) - static member CompileExeAndRunWithOptions options (source: string) = - compile true options source (fun (errors, outputExe) -> + static member CompileExeAndRunWithOptions(options, (source: SourceCodeFileKind)) = + compileExeAndRunWithOptions options source - if errors.Length > 0 then - Assert.Fail (sprintf "Compile had warnings and/or errors: %A" errors) + static member CompileExeAndRunWithOptions(options, (source: string)) = + compileExeAndRunWithOptions options (SourceCodeFileKind.Create("test.fs", source)) - executeBuiltApp outputExe [] - ) + static member CompileExeAndRun (source: SourceCodeFileKind) = + compileExeAndRunWithOptions [||] source static member CompileExeAndRun (source: string) = - CompilerAssert.CompileExeAndRunWithOptions [||] source + compileExeAndRunWithOptions [||] (SourceCodeFileKind.Create("test.fs", source)) - static member CompileLibraryAndVerifyILWithOptions options (source: string) (f: ILVerifier -> unit) = - compile false options source (fun (errors, outputFilePath) -> - let errors = - errors |> Array.filter (fun x -> x.Severity = FSharpDiagnosticSeverity.Error) - if errors.Length > 0 then - Assert.Fail (sprintf "Compile had errors: %A" errors) + static member CompileLibraryAndVerifyILWithOptions(options, (source: SourceCodeFileKind), (f: ILVerifier -> unit)) = + compileLibraryAndVerifyILWithOptions options source f - f (ILVerifier outputFilePath) - ) + static member CompileLibraryAndVerifyILWithOptions(options, (source: string), (f: ILVerifier -> unit)) = + compileLibraryAndVerifyILWithOptions options (SourceCodeFileKind.Create("test.fs", source)) f - static member CompileLibraryAndVerifyDebugInfoWithOptions options (expectedFile: string) (source: string) = - let options = [| yield! options; yield"--test:DumpDebugInfo" |] - compile false options source (fun (errors, outputFilePath) -> - let errors = - errors |> Array.filter (fun x -> x.Severity = FSharpDiagnosticSeverity.Error) - if errors.Length > 0 then - Assert.Fail (sprintf "Compile had errors: %A" errors) - let debugInfoFile = outputFilePath + ".debuginfo" - if not (File.Exists expectedFile) then - File.Copy(debugInfoFile, expectedFile) - failwith $"debug info expected file {expectedFile} didn't exist, now copied over" - let debugInfo = File.ReadAllLines(debugInfoFile) - let expected = File.ReadAllLines(expectedFile) - if debugInfo <> expected then - File.Copy(debugInfoFile, expectedFile, overwrite=true) - failwith $"""debug info mismatch -Expected is in {expectedFile} -Actual is in {debugInfoFile} -Updated automatically, please check diffs in your pull request, changes must be scrutinized -""" - ) + static member CompileLibraryAndVerifyDebugInfoWithOptions(options, (expectedFile: string), (source: SourceCodeFileKind)) = + compileLibraryAndVerifyDebugInfoWithOptions options expectedFile source + + static member CompileLibraryAndVerifyDebugInfoWithOptions(options, (expectedFile: string), (source: string)) = + compileLibraryAndVerifyDebugInfoWithOptions options expectedFile (SourceCodeFileKind.Create("test.fs", source)) + + static member CompileLibraryAndVerifyIL((source: SourceCodeFileKind), (f: ILVerifier -> unit)) = + compileLibraryAndVerifyILWithOptions [||] source f - static member CompileLibraryAndVerifyIL (source: string) (f: ILVerifier -> unit) = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [||] source f + static member CompileLibraryAndVerifyIL((source: string), (f: ILVerifier -> unit)) = + compileLibraryAndVerifyILWithOptions [||] (SourceCodeFileKind.Create("test.fs", source)) f static member RunScriptWithOptionsAndReturnResult options (source: string) = // Intialize output and input streams diff --git a/tests/FSharp.Test.Utilities/DirectoryAttribute.fs b/tests/FSharp.Test.Utilities/DirectoryAttribute.fs index 5bdb05c2ea6..5768bd7ca9d 100644 --- a/tests/FSharp.Test.Utilities/DirectoryAttribute.fs +++ b/tests/FSharp.Test.Utilities/DirectoryAttribute.fs @@ -20,12 +20,14 @@ type DirectoryAttribute(dir: string) = if String.IsNullOrWhiteSpace(dir) then invalidArg "dir" "Directory cannot be null, empty or whitespace only." + let normalizePathSeparator (text:string) = text.Replace(@"\", "/") + let normalizeName name = let invalidPathChars = Array.concat [Path.GetInvalidPathChars(); [| ':'; '\\'; '/'; ' '; '.' |]] let result = invalidPathChars |> Array.fold(fun (acc:string) (c:char) -> acc.Replace(string(c), "_")) name result - let dirInfo = Path.GetFullPath(dir) + let dirInfo = normalizePathSeparator (Path.GetFullPath(dir)) let outputDirectory name = // If the executing assembly has 'artifacts\bin' in it's path then we are operating normally in the CI or dev tests // Thus the output directory will be in a subdirectory below where we are executing. @@ -40,23 +42,24 @@ type DirectoryAttribute(dir: string) = // If we can't find anything then we execute in the directory containing the source // try - let testlibraryLocation=Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) - let pos = testlibraryLocation.IndexOf(@"artifacts\bin",StringComparison.OrdinalIgnoreCase) + let testlibraryLocation = normalizePathSeparator (Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)) + let pos = testlibraryLocation.IndexOf("artifacts/bin",StringComparison.OrdinalIgnoreCase) if pos > 0 then // Running under CI or dev build - let testRoot = Path.Combine(testlibraryLocation.Substring(0, pos), @"tests\") + let testRoot = Path.Combine(testlibraryLocation.Substring(0, pos), @"tests/") let testSourceDirectory = - let testPaths = dirInfo.Replace(testRoot, "").Split('\\') + let testPaths = dirInfo.Replace(testRoot, "").Split('/') testPaths[0] <- "tests" Path.Combine(testPaths) - let n = Path.Combine(testlibraryLocation, testSourceDirectory.Trim('\\'), normalizeName name) + let n = Path.Combine(testlibraryLocation, testSourceDirectory.Trim('/'), normalizeName name) let outputDirectory = new DirectoryInfo(n) Some outputDirectory else + raise (new InvalidOperationException($"Failed to find the test output directory:\nTest Library Location: '{testlibraryLocation}'\n Pos: {pos}")) None - with | _ -> - raise (new InvalidOperationException("Can't get the location of the executing assembly")) + with | e -> + raise (new InvalidOperationException($" '{e.Message}'. Can't get the location of the executing assembly")) let mutable includes = Array.empty @@ -67,30 +70,63 @@ type DirectoryAttribute(dir: string) = let createCompilationUnit path fs name = let outputDirectory = outputDirectory name - let filePath = path ++ fs - let fsSource = File.ReadAllText filePath - let bslFilePath = filePath + ".bsl" - let ilFilePath = - if outputDirectory.IsSome then - outputDirectory.Value.FullName + fs + ".il" - else - filePath + ".il" - - let bslSource = readFileOrDefault bslFilePath - let ilSource = readFileOrDefault ilFilePath - - { Source = Text fsSource - Baseline = - Some { SourceFilename = Some filePath - OutputBaseline = { FilePath = bslFilePath; Content = bslSource } - ILBaseline = { FilePath = ilFilePath; Content = ilSource } } - Options = [] - OutputType = Library - SourceKind = SourceKind.Fsx - Name = Some fs - IgnoreWarnings = false - References = [] - OutputDirectory = outputDirectory } |> FS + let outputDirectoryPath = + match outputDirectory with + | Some path -> path.FullName + | None -> failwith "Can't set the output directory" + let sourceFilePath = normalizePathSeparator (path ++ fs) + let fsBslFilePath = sourceFilePath + ".err.bsl" + let ilBslFilePath = + let ilBslPaths = [| +#if DEBUG + #if NETCOREAPP + yield sourceFilePath + ".il.netcore.debug.bsl" + yield sourceFilePath + ".il.netcore.bsl" + #else + yield sourceFilePath + ".il.net472.debug.bsl" + yield sourceFilePath + ".il.net472.bsl" + #endif + yield sourceFilePath + ".il.debug.bsl" + yield sourceFilePath + ".il.bsl" +#else + #if NETCOREAPP + yield sourceFilePath + ".il.netcore.release.bsl" + #else + yield sourceFilePath + ".il.net472.release.bsl" + #endif + yield sourceFilePath + ".il.release.bsl" + yield sourceFilePath + ".il.bsl" +#endif + |] + + let findBaseline = + ilBslPaths + |> Array.tryPick(fun p -> if File.Exists(p) then Some p else None) + match findBaseline with + | Some s -> s + | None -> sourceFilePath + ".il.bsl" + + let fsOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ fs, ".err")) + let ilOutFilePath = normalizePathSeparator ( Path.ChangeExtension(outputDirectoryPath ++ fs, ".il")) + let fsBslSource = readFileOrDefault fsBslFilePath + let ilBslSource = readFileOrDefault ilBslFilePath + + { + Source = SourceCodeFileKind.Create(sourceFilePath) + AdditionalSources = [] + Baseline = + Some + { + SourceFilename = Some sourceFilePath + FSBaseline = { FilePath = fsOutFilePath; Content = fsBslSource } + ILBaseline = { FilePath = ilOutFilePath; Content = ilBslSource } + } + Options = [] + OutputType = Library + Name = Some fs + IgnoreWarnings = false + References = [] + OutputDirectory = outputDirectory } |> FS member _.Includes with get() = includes and set v = includes <- v @@ -101,7 +137,7 @@ type DirectoryAttribute(dir: string) = let allFiles : string[] = Directory.GetFiles(dirInfo, "*.fs") let filteredFiles = - match (includes |> Array.map (fun f -> dirInfo ++ f)) with + match includes |> Array.map (fun f -> normalizePathSeparator (dirInfo ++ f)) with | [||] -> allFiles | incl -> incl diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index 3ca59109937..6bd2f67e1b2 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -24,6 +24,7 @@ + @@ -36,7 +37,7 @@ Make sure they are getting built with the Utilities. --> - + @@ -50,7 +51,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/FSharp.Test.Utilities/ILChecker.fs b/tests/FSharp.Test.Utilities/ILChecker.fs index a2ff9e5035d..a619bdcd178 100644 --- a/tests/FSharp.Test.Utilities/ILChecker.fs +++ b/tests/FSharp.Test.Utilities/ILChecker.fs @@ -5,6 +5,7 @@ namespace FSharp.Test open System open System.IO open System.Diagnostics +open System.Text.RegularExpressions open NUnit.Framework open TestFramework @@ -24,7 +25,9 @@ module ILChecker = /// Filters i.e ['The system type \'System.ReadOnlySpan`1\' was required but no referenced system DLL contained this type'] let private filterSpecialComment (text: string) = let pattern = @"(\[\'(.*?)\'\])" - System.Text.RegularExpressions.Regex.Replace(text, pattern, + Regex.Replace( + text, + pattern, (fun me -> String.Empty) ) @@ -33,80 +36,113 @@ module ILChecker = let mutable errorMsgOpt = None let mutable actualIL = String.Empty - try - let ildasmPath = config.ILDASM - - let ildasmFullArgs = [ yield dllFilePath; yield sprintf "-out=%s" ilFilePath; yield! ildasmArgs ] - - let stdErr, exitCode = exec ildasmPath ildasmFullArgs - - if exitCode <> 0 then - failwith (sprintf "ILASM Expected exit code \"0\", got \"%d\"\nSTDERR: %s" exitCode stdErr) - - if not (String.IsNullOrWhiteSpace stdErr) then - failwith (sprintf "ILASM Stderr is not empty:\n %s" stdErr) + let ildasmPath = config.ILDASM + + let ildasmFullArgs = [ yield dllFilePath; yield sprintf "-out=%s" ilFilePath; yield! ildasmArgs ] + + let stdErr, exitCode = + let ildasmCommandPath = Path.ChangeExtension(dllFilePath, ".ildasmCommandPath") + File.WriteAllLines(ildasmCommandPath, [| $"{ildasmPath} {ildasmFullArgs}" |] ) + exec ildasmPath ildasmFullArgs + + if exitCode <> 0 then + failwith (sprintf "ILASM Expected exit code \"0\", got \"%d\"\nSTDERR: %s" exitCode stdErr) + + if not (String.IsNullOrWhiteSpace stdErr) then + failwith (sprintf "ILASM Stderr is not empty:\n %s" stdErr) + + let blockComments = @"/\*(.*?)\*/" + let lineComments = @"//(.*?)\r?\n" + let lineCommentsEof = @"//(.*?)$" + let strings = @"""((\\[^\n]|[^""\n])*)""" + let verbatimStrings = @"@(""[^""]*"")+" + let stripComments (text:string) = + System.Text.RegularExpressions.Regex.Replace(text, + blockComments + "|" + lineComments + "|" + lineCommentsEof + "|" + strings + "|" + verbatimStrings, + (fun me -> + if (me.Value.StartsWith("/*") || me.Value.StartsWith("//")) then + if me.Value.StartsWith("//") then Environment.NewLine else String.Empty + else + me.Value), System.Text.RegularExpressions.RegexOptions.Singleline) + |> filterSpecialComment - let unifyRuntimeAssemblyName ilCode = - System.Text.RegularExpressions.Regex.Replace(ilCode, + let unifyRuntimeAssemblyName ilCode = + let pass1 = + Regex.Replace( + ilCode, "\[System\.Runtime\]|\[System\.Console\]|\[System\.Runtime\.Extensions\]|\[mscorlib\]|\[System\.Memory\]","[runtime]", - System.Text.RegularExpressions.RegexOptions.Singleline) - - let raw = File.ReadAllText(ilFilePath) - - let textAfterUnifyingAssemblies = + RegexOptions.Singleline) + let pass2 = + Regex.Replace( + pass1, + "(\.assembly extern (System\.Runtime|System\.Console|System\.Runtime\.Extensions|mscorlib|System\.Memory)){1}([^\}]*)\}",".assembly extern runtime { }", + RegexOptions.Singleline) + let pass3 = + Regex.Replace( + pass2, + "(\.assembly extern (FSharp.Core)){1}([^\}]*)\}",".assembly extern FSharp.Core { }", + RegexOptions.Singleline) + pass3 + + let unifyIlText (text:string) = + let unifyingAssemblyNames (text:string)= let asmName = Path.GetFileNameWithoutExtension(dllFilePath) - raw.Replace(asmName, "assembly") + text.Replace(asmName, "assembly") |> unifyRuntimeAssemblyName - - let blockComments = @"/\*(.*?)\*/" - let lineComments = @"//(.*?)\r?\n" - let strings = @"""((\\[^\n]|[^""\n])*)""" - let verbatimStrings = @"@(""[^""]*"")+" - let textNoComments = - System.Text.RegularExpressions.Regex.Replace(textAfterUnifyingAssemblies, - blockComments + "|" + lineComments + "|" + strings + "|" + verbatimStrings, - (fun me -> - if (me.Value.StartsWith("/*") || me.Value.StartsWith("//")) then - if me.Value.StartsWith("//") then Environment.NewLine else String.Empty - else - me.Value), System.Text.RegularExpressions.RegexOptions.Singleline) - |> filterSpecialComment - - expectedIL - |> List.map (fun (ilCode: string) -> ilCode.Trim() |> unifyRuntimeAssemblyName ) - |> List.iter (fun (ilCode: string) -> - let expectedLines = ilCode.Split('\n') - let startIndex = textNoComments.IndexOf(expectedLines.[0].Trim()) - if startIndex = -1 then - errorMsgOpt <- Some("\nExpected:\n" + ilCode + "\n") + text.Trim() |> stripComments |> unifyingAssemblyNames + + let raw = File.ReadAllText(ilFilePath) + let unifiedInputText = raw |> unifyIlText + + expectedIL + |> List.map (fun (ilCode: string) -> ilCode.Trim()) + |> List.iter (fun (ilCode: string) -> + let expectedLines = + (ilCode |> unifyIlText).Split('\n') + |> Array.map(fun e -> e.Trim('\r')) + |> Array.skipWhile(fun s -> String.IsNullOrWhiteSpace(s)) + |> Array.rev + |> Array.skipWhile(fun s -> String.IsNullOrWhiteSpace(s)) + |> Array.rev + + let startIndex = + let index = unifiedInputText.IndexOf(expectedLines[0].Trim()) + if index > 0 then + index else - let errors = ResizeArray() - let actualLines = textNoComments.Substring(startIndex, textNoComments.Length - startIndex).Split('\n') - if actualLines.Length < expectedLines.Length then - let msg = sprintf "\nExpected at least %d lines but found only %d\n" expectedLines.Length actualLines.Length - errorMsgOpt <- Some(msg + "\nExpected:\n" + ilCode + "\n") - else - for i = 0 to expectedLines.Length - 1 do - let expected = expectedLines.[i].Trim() - let actual = actualLines.[i].Trim() - if expected <> actual then - errors.Add(sprintf "\n==\nName: '%s'\n\nExpected:\t %s\nActual:\t\t %s\n==" actualLines.[0] expected actual) - - if errors.Count > 0 then - let msg = String.concat "\n" errors + "\n\n\Expected:\n" + ilCode + "\n" - errorMsgOpt <- Some(msg + "\n\n\nActual:\n" + String.Join("\n", actualLines, 0, expectedLines.Length)) - ) - - if expectedIL.Length = 0 then - errorMsgOpt <- Some ("No Expected IL") - - actualIL <- textNoComments - - match errorMsgOpt with - | Some(msg) -> errorMsgOpt <- Some(msg + "\n\n\nEntire actual:\n" + textNoComments) - | _ -> () - finally - try File.Delete(ilFilePath) with | _ -> () + 0 + let actualLines = + unifiedInputText.Substring(startIndex).Split('\n') + |> Array.map(fun e -> e.Trim('\r')) + |> Array.skipWhile(fun s -> String.IsNullOrWhiteSpace(s)) + |> Array.rev + |> Array.skipWhile(fun s -> String.IsNullOrWhiteSpace(s)) + |> Array.rev + + let errors = ResizeArray() + if actualLines.Length < expectedLines.Length then + let msg = sprintf "\nExpected at least %d lines but found only %d\n" expectedLines.Length actualLines.Length + errorMsgOpt <- Some(msg + "\nExpected:\n" + ilCode + "\n") + else + for i = 0 to expectedLines.Length - 1 do + let expected = expectedLines[i].Trim() + let actual = actualLines[i].Trim() + if expected <> actual then + errors.Add(sprintf "\n==\nName: '%s'\n\nExpected:\t %s\nActual:\t\t %s\n==" actualLines.[0] expected actual) + + if errors.Count > 0 then + let msg = String.concat "\n" errors + "\n\n\Expected:\n" + ilCode + "\n" + errorMsgOpt <- Some(msg + "\n\n\nActual:\n" + String.Join("\n", actualLines, 0, expectedLines.Length)) + ) + + if expectedIL.Length = 0 then + errorMsgOpt <- Some ("No Expected IL") + + actualIL <- unifiedInputText + + match errorMsgOpt with + | Some(msg) -> errorMsgOpt <- Some(msg + "\n\n\nEntire actual:\n" + unifiedInputText) + | _ -> () match errorMsgOpt with | Some(errorMsg) -> (false, errorMsg, actualIL) diff --git a/tests/FSharp.Test.Utilities/Peverifier.fs b/tests/FSharp.Test.Utilities/Peverifier.fs new file mode 100644 index 00000000000..bf993f350a7 --- /dev/null +++ b/tests/FSharp.Test.Utilities/Peverifier.fs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +namespace FSharp.Test + +open FSharp.Test.Compiler +open System +open System.IO +open TestFramework + +type PEVerifyOutput = + { + ExitCode: int + Lines: string array + } + +[] +type PEVerifyResult = + | Success of PEVerifyOutput + | Failure of PEVerifyOutput + +[] +module PEVerifier = + + let config = initializeSuite () + + let private exec exe args = + let arguments = args |> String.concat " " + let timeout = 30000 + let exitCode, _output, errors = Commands.executeProcess (Some exe) arguments "" timeout + let errors = errors |> String.concat Environment.NewLine + errors, exitCode + + let private verifyPEFileCore peverifierArgs dllFilePath = + let mutable errors = ResizeArray () + let peverifierPath = config.PEVERIFY + + let peverifyFullArgs = [ yield dllFilePath; yield "/NOLOGO"; yield! peverifierArgs ] + + let stdErr, exitCode = + let peverifierCommandPath = Path.ChangeExtension(dllFilePath, ".peverifierCommandPath") + File.WriteAllLines(peverifierCommandPath, [| $"{peverifierPath} {peverifyFullArgs}" |] ) + exec peverifierPath peverifyFullArgs + + if exitCode <> 0 then + errors.Add (sprintf "PEVERIFIER failed with error code: %d" exitCode) + + if not (String.IsNullOrWhiteSpace stdErr) then + errors.Add (sprintf "PEVERIFIER stderr is not empty:\n %s" stdErr) + + let error = { ExitCode=exitCode; Lines = errors.ToArray() } + match errors.Count with + | 0 -> PEVerifyResult.Success error + | _ -> PEVerifyResult.Failure error + + let private verifyPEFileAux cUnit args = + let result = + match cUnit with + | FS fs -> + match compile cUnit, fs.OutputFileName with + | CompilationResult.Success _, Some name -> + verifyPEFileCore args name + | failed -> + failwith $"""Compilation must succeed in order to verify IL.{failed}""" + | _ -> + failwith "PEVerify is only supported for F#." + result + + let verifyPEFile cUnit = + verifyPEFileAux cUnit [||] + + let verifyPEFileWithArgs cUnit args = + verifyPEFileCore cUnit args + + let shouldFail result = + match result with + | PEVerifyResult.Success _ -> failwith $"Expected to Fail - {result}" + | PEVerifyResult.Failure _ -> () + + let shouldSucceed result = + match result with + | PEVerifyResult.Success _ -> () + | PEVerifyResult.Failure _ -> failwith $"Expected to Succeed - {result}" diff --git a/tests/FSharp.Test.Utilities/ScriptHelpers.fs b/tests/FSharp.Test.Utilities/ScriptHelpers.fs index afb592b8c72..012c27c5198 100644 --- a/tests/FSharp.Test.Utilities/ScriptHelpers.fs +++ b/tests/FSharp.Test.Utilities/ScriptHelpers.fs @@ -130,8 +130,7 @@ type FSharpScript(?additionalArgs: string[], ?quiet: bool, ?langVersion: LangVer } interface IDisposable with - member _.Dispose() = - (fsi :> IDisposable).Dispose() + member this.Dispose() = ((this.Fsi) :> IDisposable).Dispose() [] module TestHelpers = diff --git a/tests/FSharp.Test.Utilities/TestFramework.fs b/tests/FSharp.Test.Utilities/TestFramework.fs index 6547f5e58f6..ed397f3c074 100644 --- a/tests/FSharp.Test.Utilities/TestFramework.fs +++ b/tests/FSharp.Test.Utilities/TestFramework.fs @@ -27,6 +27,13 @@ let tryCreateTemporaryFileName () = let filePath = Path.Combine(directory, fileName) filePath +// Create a temporaryFileName -- newGuid is random --- there is no point validating the file alread exists because: threading and Path.ChangeExtension() is commonly used after this API +let tryCreateTemporaryFileNameInDirectory (directory) = + let fileName = ("Temp-" + Guid.NewGuid().ToString() + ".tmp").Replace('-', '_') + let filePath = Path.Combine(directory, fileName) + filePath + + [] module Commands = diff --git a/tests/FSharp.Test.Utilities/Utilities.fs b/tests/FSharp.Test.Utilities/Utilities.fs index 96733a04b88..e20b98068af 100644 --- a/tests/FSharp.Test.Utilities/Utilities.fs +++ b/tests/FSharp.Test.Utilities/Utilities.fs @@ -232,85 +232,3 @@ let main argv = 0""" | TargetFramework.NetStandard20 -> netStandard20References.Value | TargetFramework.NetCoreApp31 -> netCoreApp31References.Value | TargetFramework.Current -> currentReferencesAsPEs - - type RoslynLanguageVersion = LanguageVersion - - [] - type CSharpCompilationFlags = - | None = 0x0 - | InternalsVisibleTo = 0x1 - - [] - type TestCompilation = - | CSharp of CSharpCompilation - | IL of ilSource: string * result: Lazy - - member this.AssertNoErrorsOrWarnings () = - match this with - | TestCompilation.CSharp c -> - let diagnostics = c.GetDiagnostics () - - if not diagnostics.IsEmpty then - NUnit.Framework.Assert.Fail ("CSharp source diagnostics:\n" + (diagnostics |> Seq.map (fun x -> x.GetMessage () + "\n") |> Seq.reduce (+))) - - | TestCompilation.IL (_, result) -> - let errors, _ = result.Value - if errors.Length > 0 then - NUnit.Framework.Assert.Fail ("IL source errors: " + errors) - - member this.EmitAsFile (outputPath: string) = - match this with - | TestCompilation.CSharp c -> - let c = c.WithAssemblyName(Path.GetFileNameWithoutExtension outputPath) - let emitResult = c.Emit outputPath - if not emitResult.Success then - failwithf "Unable to emit C# compilation.\n%A" emitResult.Diagnostics - - | TestCompilation.IL (_, result) -> - let (_, data) = result.Value - File.WriteAllBytes (outputPath, data) - - type CSharpLanguageVersion = - | CSharp8 = 0 - | CSharp9 = 1 - - [] - type CompilationUtil private () = - - static member CreateCSharpCompilation (source: string, lv: CSharpLanguageVersion, ?tf, ?additionalReferences, ?name) = - let lv = - match lv with - | CSharpLanguageVersion.CSharp8 -> LanguageVersion.CSharp8 - | CSharpLanguageVersion.CSharp9 -> LanguageVersion.CSharp9 - | _ -> LanguageVersion.Default - - let tf = defaultArg tf TargetFramework.NetStandard20 - let n = defaultArg name (Guid.NewGuid().ToString ()) - let additionalReferences = defaultArg additionalReferences ImmutableArray.Empty - let references = TargetFrameworkUtil.getReferences tf - let c = - CSharpCompilation.Create( - n, - [ CSharpSyntaxTree.ParseText (source, CSharpParseOptions lv) ], - references.As().AddRange additionalReferences, - CSharpCompilationOptions (OutputKind.DynamicallyLinkedLibrary)) - TestCompilation.CSharp c - - static member CreateILCompilation (source: string) = - let compute = - lazy - let ilFilePath = tryCreateTemporaryFileName () - let tmp = tryCreateTemporaryFileName () - let dllFilePath = Path.ChangeExtension (tmp, ".dll") - try - File.WriteAllText (ilFilePath, source) - let errors = ILChecker.reassembleIL ilFilePath dllFilePath - try - (errors, File.ReadAllBytes dllFilePath) - with - | _ -> (errors, [||]) - finally - try File.Delete ilFilePath with | _ -> () - try File.Delete tmp with | _ -> () - try File.Delete dllFilePath with | _ -> () - TestCompilation.IL (source, compute) diff --git a/tests/fsharpqa/testenv/src/PEVerify/CLRHelpers.cs b/tests/PEVerify/CLRHelpers.cs similarity index 100% rename from tests/fsharpqa/testenv/src/PEVerify/CLRHelpers.cs rename to tests/PEVerify/CLRHelpers.cs diff --git a/tests/fsharpqa/testenv/src/PEVerify/MonoHelpers.cs b/tests/PEVerify/MonoHelpers.cs similarity index 100% rename from tests/fsharpqa/testenv/src/PEVerify/MonoHelpers.cs rename to tests/PEVerify/MonoHelpers.cs diff --git a/tests/PEVerify/PEVerify.csproj b/tests/PEVerify/PEVerify.csproj new file mode 100644 index 00000000000..961cbc66379 --- /dev/null +++ b/tests/PEVerify/PEVerify.csproj @@ -0,0 +1,13 @@ + + + + Exe + + net472;net6.0 + net6.0 + win-x86;win-x64;linux-x64;osx-x64 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81 + $(NoWarn);1591 + + + diff --git a/tests/fsharpqa/testenv/src/PEVerify/Program.cs b/tests/PEVerify/Program.cs similarity index 100% rename from tests/fsharpqa/testenv/src/PEVerify/Program.cs rename to tests/PEVerify/Program.cs diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs index 249bead6d8d..001e7e6f9f5 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs @@ -10,14 +10,14 @@ module BooleanLogic = [] let BooleanOrs() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize+"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions ([|"-g"; "--optimize+"|], """ module BooleanOrs let compute (x: int) = if (x = 1 || x = 2) then 2 elif (x = 3 || x = 4) then 3 else 4 - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static int32 compute(int32 x) cil managed @@ -52,7 +52,7 @@ let compute (x: int) = IL_0017: ret } """ - ]) + ])) [] // We had a regression in debug code regression where we were falsely marking pipelines @@ -66,7 +66,7 @@ module DontEliminateForLoopsInDebugCode = [] // See https://github.com/dotnet/fsharp/pull/12021 let Regression12021() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions([|"-g"; "--optimize-"|], """ module DontEliminateForLoops @@ -76,7 +76,7 @@ let ApplyDefaults () = for priority = 0 to 10 do unsolved |> List.iter (fun tp -> System.Console.WriteLine()) - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static void ApplyDefaults() cil managed @@ -136,5 +136,5 @@ let ApplyDefaults () = IL_004f: ret } """ - ]) + ])) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ByrefTailcalls.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ByrefTailcalls.fs index 8abc32d756d..fff363d406b 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ByrefTailcalls.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ByrefTailcalls.fs @@ -13,7 +13,7 @@ module ByrefTailcalls = [] let ``check no tailcall to inref``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/optimize";"/tailcalls" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions([| "/optimize";"/tailcalls" |], """ module Test @@ -22,7 +22,7 @@ type Getter<'T, 'FT> = delegate of inref<'T> -> 'FT type GetterWrapper<'T, 'FT> (getter : Getter<'T, 'FT>) = member _.Get (instance : 'T) = getter.Invoke &instance - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public hidebysig instance !FT @@ -37,4 +37,4 @@ type GetterWrapper<'T, 'FT> (getter : Getter<'T, 'FT>) = IL_000d: ret } """ - ]) + ])) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/CeEdiThrow.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/CeEdiThrow.fs index 33355e4053d..85108186587 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/CeEdiThrow.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/CeEdiThrow.fs @@ -10,7 +10,7 @@ module CeEdiThrow = [] let ``Emits EDI.Throw``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module CE @@ -26,7 +26,7 @@ let foo = Try(){ try return invalidOp "Ex" with :? ArgumentException -> return 1 } - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public strict virtual instance int32 @@ -51,4 +51,4 @@ let foo = Try(){ IL_0018: ret } """ - ]) + ])) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputationExpressionOptimizations.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputationExpressionOptimizations.fs index df8a3766230..daa72fb6f9e 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputationExpressionOptimizations.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputationExpressionOptimizations.fs @@ -22,7 +22,7 @@ module ComputationExpressionOptimizations = // one uses this in practice but it's a good baseline test for the elimination and redution of constructs. // let ``check reduction of sample builder for synchronous code``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module Test @@ -134,7 +134,7 @@ module Examples = finally printfn "step" } - """ + """, (fun verifier -> verifier.VerifyIL [ // Check testFunctionWithBind is flattened """ @@ -314,6 +314,6 @@ module Examples = IL_0062: ret } """ - ]) + ])) #endif \ No newline at end of file diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs index e6a2d763c97..e707f662238 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs @@ -10,11 +10,11 @@ module ``ComputedListExpressions`` = [] let ``ComputedListExpression01``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions([|"-g"; "--optimize-"|], """ module ComputedListExpression01 let ListExpressionSteppingTest1 () = [ yield 1 ] - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -33,11 +33,11 @@ let ListExpressionSteppingTest1 () = [ yield 1 ] IL_0011: ret } """ - ]) + ])) [] let ``ComputedListExpression02``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions([|"-g"; "--optimize-"|], """ module ComputedListExpression02 let ListExpressionSteppingTest2 () = @@ -45,7 +45,7 @@ let ListExpressionSteppingTest2 () = yield 1 printfn "goodbye" yield 2] - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -76,11 +76,12 @@ let ListExpressionSteppingTest2 () = IL_003a: ret } """ - ]) + ])) [] let ``ComputedListExpression03``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [|"-g"; "--optimize-"|], """ module ComputedListExpression03 let ListExpressionSteppingTest3 () = @@ -89,7 +90,7 @@ let ListExpressionSteppingTest3 () = incr x printfn "hello" yield x ] - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> @@ -127,11 +128,11 @@ let ListExpressionSteppingTest3 () = IL_003b: ret } """ - ]) + ])) [] let ``ComputedListExpression04``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions([|"-g"; "--optimize-"|], """ module ComputedListExpression04 let ListExpressionSteppingTest4 () = @@ -145,7 +146,7 @@ let ListExpressionSteppingTest4 () = finally incr x printfn "done" ] - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -211,18 +212,18 @@ let ListExpressionSteppingTest4 () = } """ - ]) + ])) [] let ``ComputedListExpression05``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions([|"-g"; "--optimize-"|], """ module ComputedListExpression05 let ListExpressionSteppingTest5 () = [ for x in 1..4 do printfn "hello" yield x ] - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -289,11 +290,11 @@ let ListExpressionSteppingTest5 () = IL_005c: ret } """ - ]) + ])) [] let ``ComputedListExpression06``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions([|"-g"; "--optimize-"|], """ module ComputedListExpression06 let ListExpressionSteppingTest6 () = @@ -308,7 +309,7 @@ let ListExpressionSteppingTest6 () = | _ -> yield x ] - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -402,4 +403,4 @@ let ListExpressionSteppingTest6 () = IL_0097: ret } """ - ]) + ])) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/DebugScopes.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/DebugScopes.fs index 19353b0466f..b6bb427b336 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/DebugScopes.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/DebugScopes.fs @@ -10,21 +10,21 @@ module DebugScopes = [] let SimpleFunction() = - CompilerAssert.CompileLibraryAndVerifyDebugInfoWithOptions - [|"--debug:portable"; "--optimize-"; "--optimize-"|] - (__SOURCE_DIRECTORY__ + "/SimpleFunction.debuginfo.expected") + CompilerAssert.CompileLibraryAndVerifyDebugInfoWithOptions( + [|"--debug:portable"; "--optimize-"; "--optimize-"|], + (__SOURCE_DIRECTORY__ + "/SimpleFunction.debuginfo.expected"), """ module Test let f x = let y = 1 2 - """ + """) [] let SimpleShadowingFunction() = - CompilerAssert.CompileLibraryAndVerifyDebugInfoWithOptions - [|"--debug:portable"; "--optimize-"; "--optimize-"|] - (__SOURCE_DIRECTORY__ + "/SimpleShadowingFunction.debuginfo.expected") + CompilerAssert.CompileLibraryAndVerifyDebugInfoWithOptions( + [|"--debug:portable"; "--optimize-"; "--optimize-"|], + (__SOURCE_DIRECTORY__ + "/SimpleShadowingFunction.debuginfo.expected"), """ module Test let f x = @@ -32,13 +32,13 @@ let f x = let y = y+1 let y = y+1 2 - """ + """) [] let ComplexShadowingFunction() = - CompilerAssert.CompileLibraryAndVerifyDebugInfoWithOptions - [|"--debug:portable"; "--optimize-"; "--optimize-"|] - (__SOURCE_DIRECTORY__ + "/ComplexShadowingFunction.debuginfo.expected") + CompilerAssert.CompileLibraryAndVerifyDebugInfoWithOptions( + [|"--debug:portable"; "--optimize-"; "--optimize-"|], + (__SOURCE_DIRECTORY__ + "/ComplexShadowingFunction.debuginfo.expected"), """ module Test @@ -67,5 +67,5 @@ let f2 (a, b) = - """ + """) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/DelegateAndFuncOptimizations.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/DelegateAndFuncOptimizations.fs index 5049eadbf9c..00966cab905 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/DelegateAndFuncOptimizations.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/DelegateAndFuncOptimizations.fs @@ -12,7 +12,7 @@ module DelegateAndFuncOptimizations = [] // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md let ``Reduce function via InlineIfLambda``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module InlineIfLambda01 @@ -30,7 +30,7 @@ type C = printfn("code") printfn("code") x + 1) - """ + """, (fun verifier -> verifier.VerifyIL [ // Check M is inlined and optimized when small """ @@ -151,12 +151,12 @@ type C = IL_0117: ret } """ - ]) + ])) [] // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md let ``Reduce delegate invoke via InlineIfLambda``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module InlineIfLambdaOnDelegate @@ -178,7 +178,7 @@ type C = printfn("code") printfn("code") x + 1)) - """ + """, (fun verifier -> verifier.VerifyIL [ // Check M is inlined and optimized when small """ @@ -299,12 +299,12 @@ type C = IL_0117: ret } """ - ]) + ])) [] // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md let ``Reduce computed function invoke``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module ReduceComputedFunction @@ -312,7 +312,7 @@ open System let ApplyComputedFunction(c: int) = (let x = c+c in printfn("hello"); (fun y -> x + y)) 3 - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static int32 ApplyComputedFunction(int32 c) cil managed @@ -339,12 +339,12 @@ let ApplyComputedFunction(c: int) = IL_001e: ret } """ - ]) + ])) [] // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md let ``Reduce Computed Delegate``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module ReduceComputedDelegate @@ -352,7 +352,7 @@ open System type D = delegate of int -> int let ApplyComputedDelegate(c: int) = (let x = c+c in printfn("hello"); D(fun y -> x + y)).Invoke 3 - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static int32 ApplyComputedDelegate(int32 c) cil managed @@ -379,12 +379,12 @@ let ApplyComputedDelegate(c: int) = IL_001e: ret } """ - ]) + ])) [] // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md let ``Reduce Computed Function with irreducible match``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module ReduceComputedFunction @@ -392,7 +392,7 @@ open System let ApplyComputedFunction(c: int) = (let x = c+c in printfn("hello"); match x with 1 -> (fun y -> x + y) | _ -> (fun y -> x - y)) 3 - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static int32 ApplyComputedFunction(int32 c) cil managed @@ -431,13 +431,12 @@ let ApplyComputedFunction(c: int) = IL_0030: ret } """ - ]) + ])) - [] // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md let ``Immediately apply computed function in sequential``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module ImmediatelyApplyComputedFunction @@ -447,7 +446,7 @@ let ApplyComputedFunction(c: int) = let part1 = match c with 1 -> (fun y -> printfn("a")) | _ -> (fun y -> printfn("b")) part1 3 printfn("done!") - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static void ApplyComputedFunction(int32 c) cil managed @@ -491,12 +490,12 @@ let ApplyComputedFunction(c: int) = IL_0055: ret } """ - ]) + ])) [] // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md let ``Reduce Computed Delegate with let rec``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module ReduceComputedDelegate @@ -504,7 +503,7 @@ open System type D = delegate of int -> int let ApplyComputedDelegate(c: int) = (let rec f x = if x = 0 then x else f (x-1) in printfn("hello"); D(fun y -> f c + y)).Invoke 3 - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static int32 ApplyComputedDelegate(int32 c) cil managed @@ -527,6 +526,6 @@ let ApplyComputedDelegate(c: int) = IL_001f: ret } """ - ]) + ])) #endif diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/Mutation.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/Mutation.fs index 3699cc96e21..d2f071fcb04 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/Mutation.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/Mutation.fs @@ -12,14 +12,15 @@ module ``Mutation`` = [] let ``Mutation 01``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [|"-g"; "--optimize-"|], """ module Mutation01 type Test = struct val mutable v: int member t.setV v = t.v <- 0 end - """ + """, (fun verifier -> verifier.VerifyIL [ """ .class sequential ansi serializable sealed nested public Test @@ -42,16 +43,17 @@ type Test = struct IL_0009: ret } """ - ]) + ])) [] let ``Mutation 02``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [|"-g"; "--optimize-"|], """ module Mutation02 let x = System.TimeSpan.MinValue x.ToString() - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public specialname static valuetype [mscorlib]System.TimeSpan @@ -91,16 +93,17 @@ void .cctor() cil managed IL_0020: ret } """ - ]) + ])) [] let ``Mutation 03``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [|"-g"; "--optimize-"|], """ module Mutation03 let x = System.DateTime.Now x.Day - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public specialname static valuetype [mscorlib]System.DateTime @@ -139,16 +142,17 @@ x.Day IL_001a: ret } """ - ]) + ])) [] let ``Mutation 04``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [|"-g"; "--optimize-"|], """ module Mutation04 let x = System.Decimal.MaxValue x.ToString() - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public specialname static valuetype [mscorlib]System.Decimal @@ -188,11 +192,12 @@ void .cctor() cil managed IL_0020: ret } """ - ]) + ])) [] let ``Mutation 05``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [|"-g"; "--optimize-"|] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [|"-g"; "--optimize-"|], """ module Mutation05 type C() = @@ -207,7 +212,7 @@ type StaticC() = static let mutable x = 1 static member X with get() = x and set v = x <- v - """ + """, (fun verifier -> verifier.VerifyIL [ """ .class auto ansi serializable nested public C @@ -355,4 +360,4 @@ type StaticC() = IL_000b: stsfld int32 Mutation05/StaticC::init@10 IL_0010: ret """ - ]) + ])) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs index 85deecb3a66..00ffedb910e 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs @@ -19,7 +19,7 @@ module Module1 type C() = class end """ - Compilation.Create(source, Fsx, Library) + Compilation.Create(source, Library) let module2 = let source = @@ -27,7 +27,7 @@ type C() = class end let y = Module1.C() printfn "%A" y """ - Compilation.Create(source, Fsx, Exe, cmplRefs=[CompilationReference.CreateFSharp(module1, staticLink=true)]) + Compilation.Create(source, Exe, cmplRefs=[CompilationReference.CreateFSharp(module1, staticLink=true)]) CompilerAssert.Execute(module2, beforeExecute=(fun _ deps -> @@ -43,7 +43,7 @@ module Module1 type C() = class end """ - Compilation.Create(source, Fsx, Library) + Compilation.Create(source, Library) let module2 = let source = @@ -51,7 +51,7 @@ type C() = class end let y = Module1.C() printfn "%A" y """ - Compilation.Create(source, Fsx, Exe, cmplRefs=[CompilationReference.CreateFSharp module1]) + Compilation.Create(source, Exe, cmplRefs=[CompilationReference.CreateFSharp module1]) Assert.Throws(fun _ -> CompilerAssert.Execute(module2, @@ -68,7 +68,7 @@ module Module1 type C() = class end """ - Compilation.Create(source, Fsx, Library) + Compilation.Create(source, Library) let module2 = let source = @@ -76,7 +76,7 @@ type C() = class end let y = Module1.C() printfn "%A" y """ - Compilation.Create(source, Fsx, Exe, cmplRefs=[CompilationReference.CreateFSharp module1]) + Compilation.Create(source, Exe, cmplRefs=[CompilationReference.CreateFSharp module1]) CompilerAssert.Execute module2 @@ -104,7 +104,7 @@ type C() = [] static member F x = (C(), System.DateTime.Now) """ - Compilation.Create(source, Fsx, Library, options = [|"--langversion:preview"|]) + Compilation.Create(source, Library, options = [|"--langversion:preview"|]) let module2 = let source = @@ -149,7 +149,7 @@ if not test3 then if test1 && test2 && test3 then () else failwith "Test Failed" """ - Compilation.Create(source, Fsx, Exe, cmplRefs=[CompilationReference.CreateFSharp(module1, staticLink=true)]) + Compilation.Create(source, Exe, cmplRefs=[CompilationReference.CreateFSharp(module1, staticLink=true)]) CompilerAssert.Execute(module2, ignoreWarnings=true) @@ -177,7 +177,7 @@ type C() = [] static member F x = (C(), System.DateTime.Now) """ - Compilation.Create(source, Fsx, Library, [|"--optimize+"; "--nowarn:3366"|]) + Compilation.Create(source, Library, [|"--optimize+"; "--nowarn:3366"|]) let module2 = let source = @@ -222,7 +222,7 @@ if not test3 then if test1 && test2 && test3 then () else failwith "Test Failed" """ - Compilation.Create(source, Fsx, Exe, [|"--optimize+"|], [CompilationReference.CreateFSharp(module1, staticLink=true)]) + Compilation.Create(source, Exe, [|"--optimize+"|], [CompilationReference.CreateFSharp(module1, staticLink=true)]) CompilerAssert.Execute(module2, ignoreWarnings=true) @@ -236,7 +236,7 @@ let _ = List.iter (fun s -> eprintf "%s" s) ["hello"; " "; "world"] let _ = eprintfn "%s" "." let _ = exit 0 """ - let module1 = Compilation.Create(source, Fsx, Exe, [|"--standalone"|]) + let module1 = Compilation.Create(source, Exe, [|"--standalone"|]) CompilerAssert.Execute(module1, newProcess=true) [] @@ -250,6 +250,6 @@ let _ = eprintfn "%s" "." let _ = exit 0 """ - let module1 = Compilation.Create(source, Fsx, Exe, [|"--standalone"; "--optimize+"|]) + let module1 = Compilation.Create(source, Exe, [|"--standalone"; "--optimize+"|]) CompilerAssert.Execute(module1, newProcess=true) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticMember.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticMember.fs index 459972bf5c6..b3fb18b8c2e 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticMember.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticMember.fs @@ -10,7 +10,7 @@ module ``Static Member`` = [] let ``Action on Static Member``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module StaticMember01 @@ -19,7 +19,7 @@ type C = static member M() = () static member CreateAction() = new Action(C.M) - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static class [runtime]System.Action @@ -38,11 +38,11 @@ type C = .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname CreateAction@8 extends [runtime]System.Object """ - ]) + ])) [] let ``Action on Static Member with lambda``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module StaticMember02 @@ -51,7 +51,7 @@ type C = static member M(x : int32) = () static member CreateAction() = new Action(fun x -> C.M x) - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static class [runtime]System.Action`1 @@ -70,11 +70,11 @@ type C = .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname CreateAction@8 extends [runtime]System.Object """ - ]) + ])) [] let ``Action on Static Member with closure``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module StaticMember03 @@ -92,7 +92,7 @@ let main _ = let func = new Action(fun x -> C.M input.X) box func |> ignore // make sure 'func' is not optimized away 0 - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static int32 main(string[] _arg1) cil managed @@ -122,11 +122,11 @@ let main _ = .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname func@15 extends [runtime]System.Object """ - ]) + ])) [] let ``Func on Static Member``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module StaticMember04 @@ -136,7 +136,7 @@ type C = x + 1 static member CreateFunc() = new Func(C.M) - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static class [runtime]System.Func`2 @@ -155,11 +155,11 @@ type C = .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname CreateFunc@9 extends [runtime]System.Object """ - ]) + ])) [] let ``Func on Static Member with lambda``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module StaticMember05 @@ -169,7 +169,7 @@ type C = x + 43 static member CreateFunc() = new Func(fun x -> C.M x) - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static class [runtime]System.Func`2 @@ -188,11 +188,11 @@ type C = .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname CreateFunc@9 extends [runtime]System.Object """ - ]) + ])) [] let ``Func on Static Member with closure``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module StaticMember06 @@ -211,7 +211,7 @@ let main _ = let func = new Func(fun x -> C.M input.X) box func |> ignore // dummy code to prevent func being optimized away 0 - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public static int32 main(string[] _arg1) cil managed @@ -242,12 +242,12 @@ let main _ = .class auto autochar serializable sealed nested assembly beforefieldinit specialname func@16 extends [runtime]System.Object """ - ]) + ])) #if !FX_NO_WINFORMS [] let ``EventHandler from Regression/83``() = - CompilerAssert.CompileLibraryAndVerifyIL + CompilerAssert.CompileLibraryAndVerifyIL( """ module StaticMember07 @@ -296,7 +296,7 @@ let _ = do (System.Console.Out.WriteLine "Test Passed"; System.IO.File.WriteAllText("test.ok", "ok"); exit 0) - """ + """, (fun verifier -> verifier.VerifyIL [ """ IL_00bc: ldnull @@ -310,5 +310,5 @@ IL_00c8: callvirt instance void [System.Windows.Forms]System.Windows.Forms.Fo .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname clo@36 extends [runtime]System.Object """ - ]) + ])) #endif diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs index 0ae297ffaa0..ee786b7c46f 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs @@ -28,12 +28,13 @@ module TaskGeneratedCode = [] let ``check MoveNext of simple task debug``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], """ module Test let testTask() = task { return 1 } - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public strict virtual instance void @@ -100,7 +101,7 @@ MoveNext() cil managed IL_005f: ret } """ - ]) + ])) // This tests the exact optimized code generated for the MoveNext for a trivial task - we expect 'MoveNext' to be there // because state machine compilation succeeds @@ -115,12 +116,13 @@ MoveNext() cil managed [] let ``check MoveNext of simple task optimized``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |], """ module Test let testTask() = task { return 1 } - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public strict virtual instance void @@ -183,17 +185,18 @@ let testTask() = task { return 1 } IL_0058: ret } """ - ]) + ])) [] let ``check MoveNext of simple binding task debug``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/langversion:preview"; "/debug:portable"; "/optimize-"; "/tailcalls-" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [| "/langversion:preview"; "/debug:portable"; "/optimize-"; "/tailcalls-" |], """ module Test open System.Threading.Tasks let testTask(t: Task) = task { let! res = t in return res+1 } - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public strict virtual instance void @@ -361,18 +364,19 @@ let testTask(t: Task) = task { let! res = t in return res+1 } IL_010c: ret } """ - ]) + ])) module TaskTryFinallyGeneration = [] let ``check MoveNext of task try/finally optimized``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |], """ module Test let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public strict virtual instance void @@ -470,17 +474,18 @@ let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } IL_008e: ret } """ - ]) + ])) [] let ``check MoveNext of task try/finally debug``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], """ module Test let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public strict virtual instance void @@ -585,18 +590,19 @@ let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } IL_0091: ret } """ - ]) + ])) module TaskTryWithGeneration = [] let ``check MoveNext of task try/with optimized``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |], """ module Test let testTask() = task { try 1 with e -> System.Console.WriteLine("finally"); 2 } - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public strict virtual instance void @@ -698,17 +704,18 @@ let testTask() = task { try 1 with e -> System.Console.WriteLine("finally"); 2 } IL_0089: ret } """ - ]) + ])) [] let ``check MoveNext of task try/with debug``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], """ module Test let testTask() = task { try 1 with e -> System.Console.WriteLine("with"); 2 } - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public strict virtual instance void @@ -816,19 +823,20 @@ let testTask() = task { try 1 with e -> System.Console.WriteLine("with"); 2 } IL_008d: ret } """ - ]) + ])) module TaskWhileLoopGeneration = [] let ``check MoveNext of task while loop optimized``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |], """ module Test let mutable x = 1 let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public strict virtual instance void @@ -915,18 +923,19 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } IL_007a: ret } """ - ]) + ])) [] let ``check MoveNext of task while loop debug``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], """ module Test let mutable x = 1 let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method public strict virtual instance void @@ -1014,7 +1023,7 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } IL_007a: ret } """ - ]) + ])) #endif @@ -1023,7 +1032,8 @@ module TaskTypeInference = // See https://github.com/dotnet/fsharp/issues/12188 [] let ``check initially ambiguous SRTP task code ``() = - CompilerAssert.CompileExeAndRunWithOptions [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |] + CompilerAssert.CompileExeAndRunWithOptions( + [| "/langversion:preview"; "/optimize-"; "/debug:portable";"/tailcalls-" |], """ module Test @@ -1037,12 +1047,13 @@ let myFunction (f: string -> _, _i: 'T) = let myTuple : (string -> Task) * int = (fun (_s: string) -> Task.FromResult()), 1 (myFunction myTuple).Wait() - """ + """) // Test task code in generic position [] let ``check generic task code ``() = - CompilerAssert.CompileExeAndRunWithOptions [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |] + CompilerAssert.CompileExeAndRunWithOptions( + [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], """ module Test @@ -1067,14 +1078,15 @@ Generic2InGeneric1().Run().Result |> checkEquals "cwewe23" 3 Generic2InGeneric1().Run().Result |> checkEquals "cwewe24" 3 printfn "test passed" - """ + """) #if !DEBUG [] let ``check generic task exact code``() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |] + CompilerAssert.CompileLibraryAndVerifyILWithOptions( + [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], """ module Test @@ -1084,7 +1096,7 @@ type Generic1InGeneric1<'T>() = task { return! computation } member _.Run() = run (Task.FromResult 3) - """ + """, (fun verifier -> verifier.VerifyIL [ """ .method assembly hidebysig instance class [runtime]System.Threading.Tasks.Task`1 @@ -1280,7 +1292,7 @@ type Generic1InGeneric1<'T>() = IL_010c: ret } """ - ]) + ])) #endif diff --git a/tests/fsharp/Compiler/Conformance/BasicGrammarElements/BasicConstants.fs b/tests/fsharp/Compiler/Conformance/BasicGrammarElements/BasicConstants.fs index 30b1e1aa4c3..1b24224e055 100644 --- a/tests/fsharp/Compiler/Conformance/BasicGrammarElements/BasicConstants.fs +++ b/tests/fsharp/Compiler/Conformance/BasicGrammarElements/BasicConstants.fs @@ -177,26 +177,25 @@ printfn "%A" x14 """ [] let ``dotless float``() = - CompilerAssert.CompileExeWithOptions [|"--langversion:5.0"|] + CompilerAssert.CompileExeWithOptions([|"--langversion:5.0"|], """ let x = 42f printfn "%A" x - """ + """) [] let ``dotted float``() = - CompilerAssert.CompileExe - """ + CompilerAssert.CompileExe(""" let x = 42.f printfn "%A" x - """ + """) [] let ``dotted floats should be equal to dotless floats``() = - CompilerAssert.CompileExeAndRunWithOptions [|"--langversion:5.0"|] + CompilerAssert.CompileExeAndRunWithOptions([|"--langversion:5.0"|], """ if 1.0f <> 1f then failwith "1.0f <> 1f" - """ + """) [] let ``exponent dotted floats should be equal to dotted floats``() = @@ -214,14 +213,16 @@ if 1e1f <> 10.f then failwith "1e1f <> 10.f" [] let ``exponent dotted floats should be equal to dotless floats``() = - CompilerAssert.CompileExeAndRunWithOptions [|"--langversion:5.0"|] + CompilerAssert.CompileExeAndRunWithOptions( + [|"--langversion:5.0"|], """ if 1.0e1f <> 10f then failwith "1.0e1f <> 10f" - """ + """) [] let ``exponent dotless floats should be equal to dotless floats``() = - CompilerAssert.CompileExeAndRunWithOptions [|"--langversion:5.0"|] + CompilerAssert.CompileExeAndRunWithOptions( + [|"--langversion:5.0"|], """ if 1e1f <> 10f then failwith "1e1f <> 10f" - """ + """) diff --git a/tests/fsharp/Compiler/Conformance/DataExpressions/ComputationExpressions.fs b/tests/fsharp/Compiler/Conformance/DataExpressions/ComputationExpressions.fs index bda70e564be..c398a4f3293 100644 --- a/tests/fsharp/Compiler/Conformance/DataExpressions/ComputationExpressions.fs +++ b/tests/fsharp/Compiler/Conformance/DataExpressions/ComputationExpressions.fs @@ -4,6 +4,7 @@ namespace FSharp.Compiler.UnitTests open NUnit.Framework open FSharp.Test +open FSharp.Test.Compiler open FSharp.Compiler.Diagnostics [] @@ -182,7 +183,7 @@ let check msg actual expected = if actual <> expected then failwithf "FAILED %s, let includeMinimal = { includeMergeSourcesOverloads = false; includeBindReturnExtras=false } let ApplicativeLibTest opts source = - CompilerAssert.CompileExeAndRunWithOptions [| "/langversion:preview" |] (applicativeLib opts + source) + CompilerAssert.CompileExeAndRunWithOptions([| "/langversion:preview" |], (Source (applicativeLib opts + source))) let ApplicativeLibErrorTest opts source errors = let lib = applicativeLib opts @@ -784,7 +785,7 @@ let check msg actual expected = if actual <> expected then failwithf "FAILED %s, """ let OverloadLibTest inclInternalExt inclExternalExt source = - CompilerAssert.CompileExeAndRunWithOptions [| "/langversion:preview" |] (overloadLib inclInternalExt inclExternalExt + source) + CompilerAssert.CompileExeAndRunWithOptions([| "/langversion:preview" |], (Source (overloadLib inclInternalExt inclExternalExt + source))) [] let ``OverloadLib accepts overloaded methods`` () = diff --git a/tests/fsharp/Compiler/Language/ByrefTests.fs b/tests/fsharp/Compiler/Language/ByrefTests.fs index 2bb9709a86f..696b439112f 100644 --- a/tests/fsharp/Compiler/Language/ByrefTests.fs +++ b/tests/fsharp/Compiler/Language/ByrefTests.fs @@ -234,7 +234,7 @@ type MyClass() = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fs, SourceKind.Fsx, Library, cmplRefs = [csCmpl]) + Compilation.Create(fs, Library, cmplRefs = [csCmpl]) CompilerAssert.Compile fsCmpl diff --git a/tests/fsharp/Compiler/Language/CompilerDirectiveTests.fs b/tests/fsharp/Compiler/Language/CompilerDirectiveTests.fs index 46160b309bf..a3ad7075e4b 100644 --- a/tests/fsharp/Compiler/Language/CompilerDirectiveTests.fs +++ b/tests/fsharp/Compiler/Language/CompilerDirectiveTests.fs @@ -15,7 +15,7 @@ module ``Test Compiler Directives`` = #r "" """ CompilerAssert.CompileWithErrors( - Compilation.Create(source, Fsx, Library), + Compilation.Create(source, Library), [| FSharpDiagnosticSeverity.Warning, 213, (2,1,2,6), "'' is not a valid assembly name" |]) @@ -26,7 +26,7 @@ module ``Test Compiler Directives`` = #r " " """ CompilerAssert.CompileWithErrors( - Compilation.Create(source, Fsx, Library), + Compilation.Create(source, Library), [| FSharpDiagnosticSeverity.Warning, 213, (2,1,2,10), "'' is not a valid assembly name" |]) diff --git a/tests/fsharp/Compiler/Language/CustomCollectionTests.fs b/tests/fsharp/Compiler/Language/CustomCollectionTests.fs index 05840ec2b06..b1ff29a2a1d 100644 --- a/tests/fsharp/Compiler/Language/CustomCollectionTests.fs +++ b/tests/fsharp/Compiler/Language/CustomCollectionTests.fs @@ -8,7 +8,8 @@ open FSharp.Compiler.Diagnostics module CustomCollectionTests = [] let ``Custom collection with Item and GetReverseIndex should support reverse index mutation``() = - CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:preview" |] + CompilerAssert.CompileExeAndRunWithOptions( + [| "--langversion:preview" |], """ open System type foo() = @@ -20,11 +21,12 @@ let a = foo() a[^"2"] <- "-1" if a["2"] <> "2 -1" then failwithf "expected 2 -1 but got %A" a["2"] - """ + """) [] let ``Custom collection with GetSlice and GetReverseIndex should support reverse index set slicing``() = - CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:preview" |] + CompilerAssert.CompileExeAndRunWithOptions( + [| "--langversion:preview" |], """ open System type foo() = @@ -37,11 +39,11 @@ let a = foo() a[^"2"..^"1"] <- "-1" if a["2".."1"] <> "2 1 -1" then failwithf "expected 2 1 -1 but got %A" a["2".."1"] - """ + """) [] let ``Custom collection with Item and GetReverseIndex should support reverse index indexing``() = - CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:preview" |] + CompilerAssert.CompileExeAndRunWithOptions([| "--langversion:preview" |], """ open System @@ -52,11 +54,12 @@ type foo() = let a = foo() if a[^2] <> 12 then failwith "expected 12" - """ + """) [] let ``Custom collection with Item and GetReverseIndex should support n-rank reverse index mutation``() = - CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:preview" |] + CompilerAssert.CompileExeAndRunWithOptions( + [| "--langversion:preview" |], """ open System @@ -69,11 +72,12 @@ let a = foo() a[^"1",^"2"] <- "3" if a[""] <> "0 1 1 2 3" then failwithf "expected 0 1 1 2 3 but got %A" a[""] - """ + """) [] let ``Custom collection with Item and GetReverseIndex should support n-rank reverse index indexing``() = - CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:preview" |] + CompilerAssert.CompileExeAndRunWithOptions( + [| "--langversion:preview" |], """ open System @@ -84,11 +88,12 @@ type foo() = let a = foo() if a[^2,^1] <> 24 then failwithf "expected 23 but got %A" a[^2,^1] - """ + """) [] let ``Custom collection with Item and no GetReverseIndex should not support reverse index indexing``() = - CompilerAssert.TypeCheckSingleErrorWithOptions [| "--langversion:preview" |] + CompilerAssert.TypeCheckSingleErrorWithOptions + [| "--langversion:preview" |] """ open System @@ -106,7 +111,8 @@ if a.[^2] <> 12 then failwith "expected 12" [] let ``Custom collection with GetSlice and GetReverseIndex should support reverse index slicing``() = - CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:preview" |] + CompilerAssert.CompileExeAndRunWithOptions( + [| "--langversion:preview" |], """ open System @@ -121,7 +127,7 @@ type foo() = let a = foo() if a[^2..1] <> 13 then failwith "expected 13" - """ + """) [] let ``Custom collection without GetReverseIndex should not support reverse index slicing``() = diff --git a/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs b/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs index fca1e5fd706..6a9bca01aeb 100644 --- a/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs +++ b/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs @@ -48,7 +48,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [ilCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [ilCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (8, 15, 8, 20), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -130,7 +130,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "FSharp-Method1-FSharp-Method2-FSharp-Method3-FSharp-Method4") @@ -170,7 +170,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (8, 15, 8, 20), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -218,7 +218,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (8, 15, 8, 20), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -260,7 +260,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (8, 15, 8, 20), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -309,7 +309,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (9, 15, 9, 20), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -357,7 +357,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 855, (11, 19, 11, 32), "No abstract or interface member was found that corresponds to this override") @@ -407,7 +407,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (14, 7, 14, 8), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -458,7 +458,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (14, 5, 14, 27), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -495,7 +495,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (8, 5, 8, 22), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -532,7 +532,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (8, 5, 8, 19), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -573,7 +573,7 @@ let f1 () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (9, 5, 9, 15), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -623,7 +623,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 363, (8, 15, 8, 17), "The interface 'IA' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface.") @@ -678,7 +678,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (10, 15, 10, 17), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -759,7 +759,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "Explicit-Explicit") @@ -858,7 +858,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "InTestInTest2123456789111STRING-STRINGABC222FSharpABC333CSharp") @@ -934,7 +934,7 @@ type Test2 () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (10, 15, 10, 22), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.") @@ -982,7 +982,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [ilCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [ilCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3351, (8, 15, 8, 20), "Feature 'default interface member consumption' is not supported by target runtime.") @@ -1025,7 +1025,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [ilCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [ilCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3351, (8, 15, 8, 20), "Feature 'default interface member consumption' is not supported by target runtime.") @@ -1075,7 +1075,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3351, (14, 5, 14, 27), "Feature 'default interface member consumption' is not supported by target runtime.") @@ -1125,7 +1125,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 366, (8, 15, 8, 20), "No implementation was given for 'ITest.NonDefaultMethod() : unit'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") @@ -1176,7 +1176,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "I1.+1") @@ -1226,7 +1226,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "DefaultMethod-NonDefaultMethod") @@ -1300,7 +1300,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "ProtectedProtected-ProtectedOverrideProtectedOverride") @@ -1363,7 +1363,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "ObjExprProtectedObjExprProtected-ObjExprProtected2ObjExprProtected2") @@ -1438,7 +1438,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 491, (26, 5, 26, 15), "The member or object constructor 'M1' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") @@ -1518,7 +1518,7 @@ type Test2 () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 629, (10, 9, 10, 27), "Method 'M1' is not accessible from this code location") @@ -1571,7 +1571,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "NonDefaultMethod") @@ -1620,7 +1620,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 39, (16, 10, 16, 23), "The type 'ITest' does not define the field, constructor or member 'DefaultMethod'. Maybe you want one of the following: @@ -1670,7 +1670,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 855, (11, 19, 11, 32), "No abstract or interface member was found that corresponds to this override") @@ -1727,7 +1727,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl], name = "Test") + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl], name = "Test") CompilerAssert.ExecutionHasOutput(fsCmpl, "IVT-NonDefaultMethod") @@ -1766,7 +1766,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "DefaultMethod") @@ -1809,7 +1809,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "DefaultMethod-ObjExpr") @@ -1848,7 +1848,7 @@ let test = { new ITest } |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 366, (7, 12, 7, 25), "No implementation was given for 'ITest.NonDefaultMethod() : unit'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") @@ -1903,7 +1903,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "OverrideDefaultMethod-NonDefaultMethod") @@ -1951,7 +1951,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "ObjExprOverrideDefaultMethod-ObjExprNonDefaultMethod") @@ -2011,7 +2011,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "FromITest2-Method1-FromITest2-Method2") @@ -2079,7 +2079,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 363, (9, 15, 9, 21), "The interface 'ITest1' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface.") @@ -2162,7 +2162,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3352, (9, 15, 9, 21), "Interface member 'ITest1.Method1() : unit' does not have a most specific implementation.") @@ -2240,7 +2240,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3352, (9, 15, 9, 28), "Interface member 'ITest1.Method1() : unit' does not have a most specific implementation.") @@ -2318,7 +2318,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3352, (13, 15, 13, 28), "Interface member 'ITest1.Method1() : unit' does not have a most specific implementation.") @@ -2390,7 +2390,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3352, (13, 15, 13, 28), "Interface member 'ITest1.Method1() : unit' does not have a most specific implementation.") @@ -2456,7 +2456,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3352, (13, 15, 13, 28), "Interface member 'ITest1.Method1() : unit' does not have a most specific implementation.") @@ -2545,7 +2545,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "FSharpICombinedTest-Method1-FSharpICombinedTest-Method2") @@ -2615,7 +2615,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "FSharpICombinedTest-Method1-FSharpICombinedTest-Method2") @@ -2694,7 +2694,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "FSharpExplicitTest-Method1-FSharpExplicitTest-Method2") @@ -2756,7 +2756,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3352, (14, 15, 14, 28), "Interface member 'ITest1.Method1() : unit' does not have a most specific implementation.") @@ -2845,7 +2845,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "CSharpICombinedTest-Method1-CSharpICombinedTest-Method2") @@ -2970,7 +2970,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "CSharpIFinalCombinedTest-Method1-CSharpIFinalCombinedTest-Method2") @@ -3081,7 +3081,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "CSharpIFinalCombinedTest-Method1-") @@ -3193,7 +3193,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "CSharpIFinalCombinedTest-Method1-CSharpIFinalCombinedTest-Method2") @@ -3309,7 +3309,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "IBase-IB1-IA1-IC1-") @@ -3415,7 +3415,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "123XYZ") @@ -3518,7 +3518,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "-") @@ -3617,7 +3617,7 @@ type Test2 () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 366, (10, 15, 10, 32), "No implementation was given for 'ITest1.Method2() : unit'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") @@ -3664,7 +3664,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "A-NonDefaultMethod") @@ -3711,7 +3711,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "OverrideA-NonDefaultMethod") @@ -3774,7 +3774,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "") @@ -3841,7 +3841,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "IA.MA-IB1.IB.MB-IB1.IB.MB") @@ -3889,7 +3889,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 363, (8, 15, 8, 17), "The interface 'IA' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface.") @@ -3944,7 +3944,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3352, (10, 15, 10, 17), "Interface member 'IA.M() : unit' does not have a most specific implementation.") @@ -4009,7 +4009,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "MMM") @@ -4099,7 +4099,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "M123456floatfs_single") @@ -4177,7 +4177,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 366, (12, 15, 12, 17), "No implementation was given for 'IA.M(x: float32) : unit'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") @@ -4274,7 +4274,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "InTestInTest123456789111STRING-STRINGABC222FSharpABC333CSharpM(U, T)M(U, T)") @@ -4369,7 +4369,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "Test.String-Test.Prop2") @@ -4456,7 +4456,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3352, (12, 15, 12, 25), "Interface member 'IA.set_Prop2(value: string) : unit' does not have a most specific implementation.") @@ -4506,7 +4506,7 @@ let test = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 363, (8, 7, 8, 21), "The interface 'IA' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface.") @@ -4569,7 +4569,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "IB.IA.M") @@ -4625,7 +4625,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "IB.IA.M") @@ -4689,7 +4689,7 @@ f () |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "1011") @@ -4749,7 +4749,7 @@ f3 () |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "359") @@ -4794,7 +4794,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 39, (6, 17, 6, 29), "The type 'CSharpClass' does not define the field, constructor or member 'StaticMethod'.") @@ -4844,7 +4844,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 39, (11, 17, 11, 29), "The type 'FSharpClass' does not define the field, constructor or member 'StaticMethod'.") @@ -4894,7 +4894,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 1, (9, 5, 9, 15), "The type 'CSharpClass' does not support the operator 'StaticMethod'") @@ -4947,7 +4947,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 1, (14, 5, 14, 15), "The type 'FSharpClass' does not support the operator 'StaticMethod'") @@ -4994,7 +4994,7 @@ type Test () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [ilCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [ilCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3351, (8, 15, 8, 20), "Feature 'default interface member consumption' is not supported by target runtime.") @@ -5046,7 +5046,7 @@ let f () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3351, (14, 5, 14, 27), "Feature 'default interface member consumption' is not supported by target runtime.") diff --git a/tests/fsharp/Compiler/Language/HatDesugaringTests.fs b/tests/fsharp/Compiler/Language/HatDesugaringTests.fs index 73bad5cee68..f3a33897468 100644 --- a/tests/fsharp/Compiler/Language/HatDesugaringTests.fs +++ b/tests/fsharp/Compiler/Language/HatDesugaringTests.fs @@ -9,7 +9,8 @@ module HatDesugaringTests = [] let ``Hat operator should be overloadable in infix context``() = - CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:preview" |] + CompilerAssert.CompileExeAndRunWithOptions( + [| "--langversion:preview" |], """ module X open System @@ -18,11 +19,12 @@ let (^) (x: int) (y: int) = x + y if 1 ^ 2 <> 3 then failwithf "expected result to be 3 but got %i" (1 ^ 2) Console.WriteLine() - """ + """) [] let ``Reverse slicing should work with overloaded infix hat``() = - CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:preview" |] + CompilerAssert.CompileExeAndRunWithOptions( + [| "--langversion:preview" |], """ module X open System @@ -31,7 +33,7 @@ let (^) (x: int) (y: int) = x + y let result = [1;2][^1..] if result <> [1;2] then failwithf "expected result to be [1;2] but got %A" result Console.WriteLine() - """ + """) [] let ``At operator should not be usable in prefix context``() = diff --git a/tests/fsharp/Compiler/Language/InitOnlyPropertyConsumptionTests.fs b/tests/fsharp/Compiler/Language/InitOnlyPropertyConsumptionTests.fs index 56d828f8a78..14f04745f88 100644 --- a/tests/fsharp/Compiler/Language/InitOnlyPropertyConsumptionTests.fs +++ b/tests/fsharp/Compiler/Language/InitOnlyPropertyConsumptionTests.fs @@ -48,7 +48,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create("test.fs", fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.ExecutionHasOutput(fsCmpl, "123") diff --git a/tests/fsharp/Compiler/Language/InterfaceTests.fs b/tests/fsharp/Compiler/Language/InterfaceTests.fs index 231ab11248a..79358958633 100644 --- a/tests/fsharp/Compiler/Language/InterfaceTests.fs +++ b/tests/fsharp/Compiler/Language/InterfaceTests.fs @@ -173,9 +173,8 @@ assertion (fun (x:float) -> x * 3.0) (fun v -> let fsCmpl = Compilation.Create( - ``Many Instantiations of the same interface - SetUp`` + - ``Many Instantiations of the same interface - Asserts``, - Fs, Library, + "test.fs", + ``Many Instantiations of the same interface - SetUp`` + ``Many Instantiations of the same interface - Asserts``,Library, options = [| "--langversion:5.0"; #if !NETSTANDARD @@ -205,7 +204,7 @@ assertion (fun (x:float) -> x * 3.0) (fun v -> [] let MultipleTypedInterfacesFSharp50VerifyIl() = - CompilerAssert.CompileLibraryAndVerifyILWithOptions + CompilerAssert.CompileLibraryAndVerifyILWithOptions( [| "--langversion:5.0"; "--deterministic+"; @@ -213,8 +212,8 @@ assertion (fun (x:float) -> x * 3.0) (fun v -> #if NETSTANDARD "--define:NETSTANDARD"; #endif - |] - ``Many Instantiations of the same interface - SetUp`` + |], + ``Many Instantiations of the same interface - SetUp``, (fun verifier -> verifier.VerifyIL [""" .class auto ansi serializable nested public implementation extends [mscorlib]System.Object @@ -252,4 +251,4 @@ assertion (fun (x:float) -> x * 3.0) (fun v -> class Program/IInterface`1, class Program/IInterface`1 { -"""] ) +"""] )) diff --git a/tests/fsharp/Compiler/Language/OpenTypeDeclarationTests.fs b/tests/fsharp/Compiler/Language/OpenTypeDeclarationTests.fs index bd0adef47ef..a222d190dcb 100644 --- a/tests/fsharp/Compiler/Language/OpenTypeDeclarationTests.fs +++ b/tests/fsharp/Compiler/Language/OpenTypeDeclarationTests.fs @@ -1320,7 +1320,7 @@ let main _ = """ let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|]) + Compilation.Create("test.fs", fsharpSource, Exe, options = [|"--langversion:5.0"|]) CompilerAssert.ExecutionHasOutput(fsCmpl, "MPM2ExtP2Ext") @@ -1355,7 +1355,7 @@ let main _ = """ let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|]) + Compilation.Create("test.fs", fsharpSource, Exe, options = [|"--langversion:5.0"|]) CompilerAssert.ExecutionHasOutput(fsCmpl, "MP") @@ -1393,7 +1393,7 @@ let main _ = """ let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|]) + Compilation.Create("test.fs", fsharpSource, Exe, options = [|"--langversion:5.0"|]) CompilerAssert.ExecutionHasOutput(fsCmpl, "MExtP") @@ -1423,7 +1423,7 @@ let main _ = """ let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|]) + Compilation.Create("test.fs", fsharpSource, Exe, options = [|"--langversion:5.0"|]) CompilerAssert.ExecutionHasOutput(fsCmpl, "M") @@ -1685,7 +1685,7 @@ let x2: int = X |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [ilCmpl]) + Compilation.Create("test.fs", fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [ilCmpl]) CompilerAssert.Compile(fsCmpl) @@ -1811,7 +1811,7 @@ let x2: int = X |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [ilCmpl]) + Compilation.Create("test.fs", fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [ilCmpl]) CompilerAssert.Compile(fsCmpl) @@ -1961,7 +1961,7 @@ let x2: string = X |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [ilCmpl]) + Compilation.Create("test.fs", fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [ilCmpl]) CompilerAssert.Compile(fsCmpl) @@ -2120,7 +2120,7 @@ let x2: float32 = X() |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Library, options = [|"--langversion:5.0"|], cmplRefs = [ilCmpl]) + Compilation.Create("test.fs", fsharpSource, Library, options = [|"--langversion:5.0"|], cmplRefs = [ilCmpl]) CompilerAssert.Compile(fsCmpl) @@ -2161,7 +2161,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create("test.fs", fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.Compile(fsCmpl) @@ -2203,7 +2203,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl], name = "Test") + Compilation.Create("test.fs", fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl], name = "Test") CompilerAssert.Compile(fsCmpl) @@ -2242,7 +2242,7 @@ let main _ = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Fs, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) + Compilation.Create("test.fs", fsharpSource, Exe, options = [|"--langversion:5.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 39, (9, 5, 9, 6), "The value or constructor 'M' is not defined.") diff --git a/tests/fsharp/Compiler/Language/OptionalInteropTests.fs b/tests/fsharp/Compiler/Language/OptionalInteropTests.fs index 17dcfd4f62e..646692eeb03 100644 --- a/tests/fsharp/Compiler/Language/OptionalInteropTests.fs +++ b/tests/fsharp/Compiler/Language/OptionalInteropTests.fs @@ -155,5 +155,5 @@ Test.MethodTakingNullables(Nullable 6, y="aaaaaa", d=8.0) |> ignore CompilationUtil.CreateCSharpCompilation(csSrc, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31, additionalReferences = ImmutableArray.CreateRange [fsharpCoreAssembly]) |> CompilationReference.Create - let fs = Compilation.Create(fsSrc, SourceKind.Fsx, CompileOutput.Exe, options = [|"--langversion:5.0"|], cmplRefs = [cs]) + let fs = Compilation.Create(fsSrc, CompileOutput.Exe, options = [|"--langversion:5.0"|], cmplRefs = [cs]) CompilerAssert.Compile fs diff --git a/tests/fsharp/Compiler/Language/SpanOptimizationTests.fs b/tests/fsharp/Compiler/Language/SpanOptimizationTests.fs index 5345fbfd252..00eb7a8d719 100644 --- a/tests/fsharp/Compiler/Language/SpanOptimizationTests.fs +++ b/tests/fsharp/Compiler/Language/SpanOptimizationTests.fs @@ -23,7 +23,8 @@ let test () = Console.WriteLine(item) """ - CompilerAssert.CompileLibraryAndVerifyIL source + CompilerAssert.CompileLibraryAndVerifyIL( + source, (fun verifier -> verifier.VerifyIL [ @@ -59,7 +60,7 @@ let test () = IL_002c: ret }""" - ]) + ])) [] let ReadOnlySpanForInDo() = @@ -75,7 +76,8 @@ let test () = Console.WriteLine(item) """ - CompilerAssert.CompileLibraryAndVerifyIL source + CompilerAssert.CompileLibraryAndVerifyIL( + source, (fun verifier -> verifier.VerifyIL [ @@ -110,7 +112,7 @@ let test () = IL_002c: ret }""" - ]) + ])) [] let ExplicitSpanTypeForInDo() = @@ -152,10 +154,10 @@ module Test = """ // The current behavior doesn't optimize, but it could in the future. Making a test to catch if it ever does. - CompilerAssert.CompileLibraryAndVerifyIL source + CompilerAssert.CompileLibraryAndVerifyIL( + source, (fun verifier -> - verifier.VerifyIL - [ + verifier.VerifyIL [ """ .method public static void test() cil managed { @@ -199,7 +201,7 @@ module Test = IL_0041: ret } """ - ]) + ])) [] let SpanForInBoundsDo() = @@ -215,10 +217,10 @@ for i in 0 .. span.Length-1 do Console.WriteLine(span.[i]) """ - CompilerAssert.CompileLibraryAndVerifyIL source + CompilerAssert.CompileLibraryAndVerifyIL( + source, (fun verifier -> - verifier.VerifyIL - [ + verifier.VerifyIL [ """.method public static void test() cil managed { @@ -250,7 +252,8 @@ for i in 0 .. span.Length-1 do IL_002c: ret }""" - ]) + ])) + [] let ReadOnlySpanForInBoundsDo() = let source = @@ -265,10 +268,10 @@ for i in 0 .. span.Length-1 do Console.WriteLine(span.[i]) """ - CompilerAssert.CompileLibraryAndVerifyIL source + CompilerAssert.CompileLibraryAndVerifyIL( + source, (fun verifier -> - verifier.VerifyIL - [ + verifier.VerifyIL [ """.method public static void test() cil managed { @@ -300,6 +303,6 @@ Console.WriteLine(span.[i]) IL_002c: ret }""" - ]) + ])) #endif diff --git a/tests/fsharp/Compiler/Language/StringConcatOptimizationTests.fs b/tests/fsharp/Compiler/Language/StringConcatOptimizationTests.fs index f27b3bdc23f..d361eb8adf2 100644 --- a/tests/fsharp/Compiler/Language/StringConcatOptimizationTests.fs +++ b/tests/fsharp/Compiler/Language/StringConcatOptimizationTests.fs @@ -850,7 +850,8 @@ let test9 () = test9Source ] let source = String.Join("", sources) - CompilerAssert.CompileLibraryAndVerifyIL source + CompilerAssert.CompileLibraryAndVerifyIL( + source, (fun verifier -> verifier.VerifyIL [ @@ -864,5 +865,5 @@ let test9 () = test8IL test9IL ] - ) + )) #endif diff --git a/tests/fsharp/Compiler/Language/StringInterpolation.fs b/tests/fsharp/Compiler/Language/StringInterpolation.fs index 7e601ec3050..708d9be5e3b 100644 --- a/tests/fsharp/Compiler/Language/StringInterpolation.fs +++ b/tests/fsharp/Compiler/Language/StringInterpolation.fs @@ -10,11 +10,13 @@ open FSharp.Test module StringInterpolationTests = let SimpleCheckTest text = - CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:5.0" |] (""" + CompilerAssert.CompileExeAndRunWithOptions( + [| "--langversion:5.0" |], + (""" let check msg a b = if a = b then printfn "test case '%s' succeeded" msg else failwithf "test case '%s' failed, expected %A, got %A" msg b a -""" + text) +""" + text)) [] let ``Basic string interpolation`` () = @@ -544,11 +546,13 @@ check "vcewweh20" $"x = %A{1}" "x = 1" "Feature 'binary formatting for integers' is not available in F# 5.0. Please use language version 6.0 or greater.")|] [] let ``%B succeeds for langVersion preview`` () = - CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:preview" |] """ + CompilerAssert.CompileExeAndRunWithOptions( + [| "--langversion:preview" |], + """ let check msg a b = if a = b then printfn "test case '%s' succeeded" msg else failwithf "test case '%s' failed, expected %A, got %A" msg b a check "vcewweh22a" $"x = %B{19}" "x = 10011" - """ + """) [] let ``String interpolation using list and array data`` () = diff --git a/tests/fsharp/Compiler/Language/StructActivePatternTests.fs b/tests/fsharp/Compiler/Language/StructActivePatternTests.fs index 346355c69f6..8780e6c8469 100644 --- a/tests/fsharp/Compiler/Language/StructActivePatternTests.fs +++ b/tests/fsharp/Compiler/Language/StructActivePatternTests.fs @@ -9,13 +9,15 @@ open FSharp.Test [] module StructActivePatternTests = - let private pass = CompilerAssert.PassWithOptions [| |] - let private fail = CompilerAssert.TypeCheckWithErrorsAndOptions [| |] - let private run src = CompilerAssert.CompileExeAndRunWithOptions [| |] (""" + let private pass = CompilerAssert.PassWithOptions [||] + let private fail = CompilerAssert.TypeCheckWithErrorsAndOptions [||] + let private run src = CompilerAssert.CompileExeAndRunWithOptions( + [||], + (""" let fail msg = printfn "%s" msg failwith msg -""" + src) +""" + src)) [] let ``Partial active pattern returns Option`1`` () = diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs deleted file mode 100644 index ff038364240..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs +++ /dev/null @@ -1,11 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL #Async -module AsyncExpressionSteppingTest2 // Regression test for FSHARP1.0:4058 -module AsyncExpressionSteppingTest2 = - let f2 () = - let x = ref 0 - async { while !x < 4 do - incr x - printfn "hello" } - - - let _ = f2() |> Async.RunSynchronously diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/env.lst b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/env.lst deleted file mode 100644 index 9ca12d8cea4..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/env.lst +++ /dev/null @@ -1,9 +0,0 @@ - SOURCE=AsyncExpressionSteppingTest1.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AsyncExpressionSteppingTest1.dll" # AsyncExpressionSteppingTest1.fs - - - SOURCE=AsyncExpressionSteppingTest2.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AsyncExpressionSteppingTest2.dll" # AsyncExpressionSteppingTest2.fs - - - SOURCE=AsyncExpressionSteppingTest3.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AsyncExpressionSteppingTest3.dll" # AsyncExpressionSteppingTest3.fs - - - SOURCE=AsyncExpressionSteppingTest4.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AsyncExpressionSteppingTest4.dll" # AsyncExpressionSteppingTest4.fs - - SOURCE=AsyncExpressionSteppingTest5.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AsyncExpressionSteppingTest5.dll" # AsyncExpressionSteppingTest5.fs - - SOURCE=AsyncExpressionSteppingTest6.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AsyncExpressionSteppingTest6.dll" # AsyncExpressionSteppingTest6.fs - diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl deleted file mode 100644 index a1c4da1453b..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl +++ /dev/null @@ -1,128 +0,0 @@ - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly extern FSharp.Core -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 -} -.assembly Default -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureData.Default -{ - // Offset: 0x00000000 Length: 0x000003F0 -} -.mresource public FSharpOptimizationData.Default -{ - // Offset: 0x000003F8 Length: 0x000000BA -} -.module Default.dll -// MVID: {61E07031-AAA9-67BB-A745-03833170E061} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x073F0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public abstract auto ansi sealed M - extends [mscorlib]System.Object -{ - .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 ) - .class auto ansi serializable nested public ExportAttribute - extends [mscorlib]System.Attribute - { - .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 80 01 00 00 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) - .method public specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 9 (0x9) - .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 9,9 : 4,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AttributeTargets\\Default.fs' - IL_0000: ldarg.0 - IL_0001: callvirt instance void [mscorlib]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ret - } // end of method ExportAttribute::.ctor - - } // end of class ExportAttribute - - .method public specialname static int32 - get_T() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: ldsfld int32 ''.$M::T@12 - IL_0005: ret - } // end of method M::get_T - - .property int32 T() - { - .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 M::get_T() - } // end of property M::T -} // end of class M - -.class private abstract auto ansi sealed ''.$M - extends [mscorlib]System.Object -{ - .field static assembly initonly int32 T@12 - .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 init@ - .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 private specialname rtspecialname static - void .cctor() cil managed - { - // Code size 26 (0x1a) - .maxstack 4 - .locals init ([0] int32 T) - .line 11,12 : 1,29 '' - IL_0000: nop - .line 12,12 : 10,25 '' - IL_0001: ldstr "hello" - IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0010: pop - .line 12,12 : 27,28 '' - IL_0011: ldc.i4.1 - IL_0012: dup - IL_0013: stsfld int32 ''.$M::T@12 - IL_0018: stloc.0 - IL_0019: ret - } // end of method $M::.cctor - -} // end of class ''.$M - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl deleted file mode 100644 index a210d3fdb2b..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl +++ /dev/null @@ -1,127 +0,0 @@ - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly extern FSharp.Core -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 -} -.assembly Property -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureData.Property -{ - // Offset: 0x00000000 Length: 0x000003F3 -} -.mresource public FSharpOptimizationData.Property -{ - // Offset: 0x000003F8 Length: 0x000000BB -} -.module Property.dll -// MVID: {61E07031-9B5C-7949-A745-03833170E061} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x056F0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public abstract auto ansi sealed M - extends [mscorlib]System.Object -{ - .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 ) - .class auto ansi serializable nested public ExportAttribute - extends [mscorlib]System.Attribute - { - .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 80 01 00 00 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) - .method public specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 9 (0x9) - .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 9,9 : 4,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AttributeTargets\\Property.fs' - IL_0000: ldarg.0 - IL_0001: callvirt instance void [mscorlib]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ret - } // end of method ExportAttribute::.ctor - - } // end of class ExportAttribute - - .method public specialname static int32 - get_T() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: ldsfld int32 ''.$M::T@12 - IL_0005: ret - } // end of method M::get_T - - .property int32 T() - { - .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 M::get_T() - } // end of property M::T -} // end of class M - -.class private abstract auto ansi sealed ''.$M - extends [mscorlib]System.Object -{ - .field static assembly initonly int32 T@12 - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 init@ - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .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 private specialname rtspecialname static - void .cctor() cil managed - { - // Code size 26 (0x1a) - .maxstack 4 - .locals init ([0] int32 T) - .line 11,12 : 1,29 '' - IL_0000: nop - .line 12,12 : 10,25 '' - IL_0001: ldstr "hello" - IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0010: pop - .line 12,12 : 27,28 '' - IL_0011: ldc.i4.1 - IL_0012: dup - IL_0013: stsfld int32 ''.$M::T@12 - IL_0018: stloc.0 - IL_0019: ret - } // end of method $M::.cctor - -} // end of class ''.$M - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/env.lst b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/env.lst deleted file mode 100644 index 3b644dbdc06..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/env.lst +++ /dev/null @@ -1,4 +0,0 @@ - SOURCE=Default.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Default.dll" # Default.fs - SOURCE=Field.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Field.dll" # Field.fs - SOURCE=Property.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Property.dll" # Property.fs - diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.fs b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.fs deleted file mode 100644 index 9a2b2b94742..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL #Unions -printfn "File1.A = %A" CCtorDUWithMember01a.A -printfn "Test.e2 = %A" CCtorDUWithMember01a.e2 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.fs b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.fs deleted file mode 100644 index 0f9604eb895..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.fs +++ /dev/null @@ -1,2 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL #Unions -printfn "x = %A" CCtorDUWithMember02a.y diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.fs b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.fs deleted file mode 100644 index 0723204490a..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.fs +++ /dev/null @@ -1,2 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL #Unions -printfn "File1.x = %A" CCtorDUWithMember03a.x diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/env.lst b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/env.lst deleted file mode 100644 index 3490bbfd1c0..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/env.lst +++ /dev/null @@ -1,5 +0,0 @@ - SOURCE="CCtorDUWithMember01a.fs CCtorDUWithMember01.fs" SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CCtorDUWithMember01.exe" # CCtorDUWithMember01.fs - - - SOURCE="CCtorDUWithMember02a.fs CCtorDUWithMember02.fs" SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CCtorDUWithMember02.exe" # CCtorDUWithMember02.fs - SOURCE="CCtorDUWithMember03a.fs CCtorDUWithMember03.fs" SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CCtorDUWithMember03.exe" # CCtorDUWithMember03.fs - SOURCE="CCtorDUWithMember04a.fs CCtorDUWithMember04.fs" SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CCtorDUWithMember04.exe" # CCtorDUWithMember04.fs diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/env.lst b/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/env.lst deleted file mode 100644 index 584f1fe282a..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/env.lst +++ /dev/null @@ -1,6 +0,0 @@ - SOURCE=CompiledNameAttribute01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CompiledNameAttribute01.exe" # CompiledNameAttribute01.fs - SOURCE=CompiledNameAttribute02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CompiledNameAttribute02.exe" # CompiledNameAttribute02.fs - SOURCE=CompiledNameAttribute03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CompiledNameAttribute03.exe" # CompiledNameAttribute03.fs - - SOURCE=CompiledNameAttribute04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CompiledNameAttribute04.exe" # CompiledNameAttribute04.fs - - SOURCE=CompiledNameAttribute05.fs # CompiledNameAttribute05.fs diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/env.lst b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/env.lst deleted file mode 100644 index e9a3d89387e..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/env.lst +++ /dev/null @@ -1,13 +0,0 @@ -# These might become handly one day... -# - - SOURCE=ComputationExprLibrary.fs SCFLAGS="-a --optimize-" COMPILE_ONLY=1 # ComputationExprLibrary.fs (setup) - - SOURCE=ComputationExpr01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- -r:ComputationExprLibrary.dll" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ComputationExpr01.exe" # ComputationExpr01.fs - SOURCE=ComputationExpr02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- -r:ComputationExprLibrary.dll" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ComputationExpr02.exe" # ComputationExpr02.fs - SOURCE=ComputationExpr03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- -r:ComputationExprLibrary.dll" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ComputationExpr03.exe" # ComputationExpr03.fs - SOURCE=ComputationExpr04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- -r:ComputationExprLibrary.dll" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ComputationExpr04.exe" # ComputationExpr04.fs - SOURCE=ComputationExpr05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- -r:ComputationExprLibrary.dll" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ComputationExpr05.exe" # ComputationExpr05.fs - SOURCE=ComputationExpr06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- -r:ComputationExprLibrary.dll" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ComputationExpr06.exe" # ComputationExpr06.fs - SOURCE=ComputationExpr07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- -r:ComputationExprLibrary.dll" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ComputationExpr07.exe" # ComputationExpr07.fs - diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.il.bsl deleted file mode 100644 index 9b45e6d76b1..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.il.bsl +++ /dev/null @@ -1,130 +0,0 @@ - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly extern FSharp.Core -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 5:0:0:0 -} -.assembly DoNotBoxStruct_ArrayOfArray_FSInterface -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureData.DoNotBoxStruct_ArrayOfArray_FSInterface -{ - // Offset: 0x00000000 Length: 0x0000026E -} -.mresource public FSharpOptimizationData.DoNotBoxStruct_ArrayOfArray_FSInterface -{ - // Offset: 0x00000278 Length: 0x000000A6 -} -.module DoNotBoxStruct_ArrayOfArray_FSInterface.exe -// MVID: {5FCFFD0B-8A45-C8A0-A745-03830BFDCF5F} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x06B80000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public abstract auto ansi sealed DoNotBoxStruct_ArrayOfArray_FSInterface - extends [mscorlib]System.Object -{ - .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 ) - .class auto ansi serializable sealed nested assembly beforefieldinit F@5 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class DoNotBoxStruct_ArrayOfArray_FSInterface/F@5 @_instance - .method assembly specialname rtspecialname - instance void .ctor() 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 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } // end of method F@5::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit - Invoke(int32 x) cil managed - { - // Code size 2 (0x2) - .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 71,73 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\DoNotBoxStruct\\DoNotBoxStruct_ArrayOfArray_FSInterface.fs' - IL_0000: ldnull - IL_0001: ret - } // end of method F@5::Invoke - - .method private specialname rtspecialname static - void .cctor() cil managed - { - // Code size 11 (0xb) - .maxstack 10 - IL_0000: newobj instance void DoNotBoxStruct_ArrayOfArray_FSInterface/F@5::.ctor() - IL_0005: stsfld class DoNotBoxStruct_ArrayOfArray_FSInterface/F@5 DoNotBoxStruct_ArrayOfArray_FSInterface/F@5::@_instance - IL_000a: ret - } // end of method F@5::.cctor - - } // end of class F@5 - - .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T[][] x) cil managed - { - // Code size 36 (0x24) - .maxstack 8 - .line 5,5 : 48,74 '' - IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldelem !!T[] - IL_0007: ldc.i4.0 - IL_0008: ldelem !!T - IL_000d: box !!T - IL_0012: unbox.any class [mscorlib]System.IObservable`1 - IL_0017: ldsfld class DoNotBoxStruct_ArrayOfArray_FSInterface/F@5 DoNotBoxStruct_ArrayOfArray_FSInterface/F@5::@_instance - IL_001c: tail. - IL_001e: call void [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::AddToObservable(class [mscorlib]System.IObservable`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0023: ret - } // end of method DoNotBoxStruct_ArrayOfArray_FSInterface::F - -} // end of class DoNotBoxStruct_ArrayOfArray_FSInterface - -.class private abstract auto ansi sealed ''.$DoNotBoxStruct_ArrayOfArray_FSInterface - extends [mscorlib]System.Object -{ - .method public static void main@() cil managed - { - .entrypoint - // Code size 1 (0x1) - .maxstack 8 - IL_0000: ret - } // end of method $DoNotBoxStruct_ArrayOfArray_FSInterface::main@ - -} // end of class ''.$DoNotBoxStruct_ArrayOfArray_FSInterface - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/env.lst b/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/env.lst deleted file mode 100644 index 500fd76b218..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/DoNotBoxStruct/env.lst +++ /dev/null @@ -1,24 +0,0 @@ - SOURCE=DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs - SOURCE=DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_Array_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs - - SOURCE=DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs - - - SOURCE=DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs - - - SOURCE=DoNotBoxStruct_ArrayOfArray_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ArrayOfArray_CSInterface.exe" # DoNotBoxStruct_ArrayOfArray_CSInterface.fs - - SOURCE=DoNotBoxStruct_ArrayOfArray_FSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ArrayOfArray_FSInterface.exe" # DoNotBoxStruct_ArrayOfArray_FSInterface.fs - - - SOURCE=DoNotBoxStruct_Array_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_Array_CSInterface.exe" # DoNotBoxStruct_Array_CSInterface.fs - - SOURCE=DoNotBoxStruct_Array_FSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_Array_FSInterface.exe" # DoNotBoxStruct_Array_FSInterface.fs - - - SOURCE=DoNotBoxStruct_MDArray_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_MDArray_CSInterface.exe" # DoNotBoxStruct_MDArray_CSInterface.fs - - - SOURCE=DoNotBoxStruct_MDArray_FSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_MDArray_FSInterface.exe" # DoNotBoxStruct_MDArray_FSInterface.fs - - - SOURCE=DoNotBoxStruct_NoArray_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_NoArray_CSInterface.exe" # DoNotBoxStruct_NoArray_CSInterface.fs - - SOURCE=DoNotBoxStruct_NoArray_FSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_NoArray_FSInterface.exe" # DoNotBoxStruct_NoArray_FSInterface.fs - - - SOURCE=DoNotBoxStruct_ToString.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ToString.exe" # DoNotBoxStruct_ToString.fs diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.fs b/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.fs deleted file mode 100644 index 1097b688029..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.fs +++ /dev/null @@ -1,11 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -// Validate we emit non-generic (=fast) code for comparison involving decimals -// See DevDiv:217807 (1.0M < 2.0M should be fast, not go through generic comparison code path) -let _ = 1.0M < 2.0M -let _ = 1.0M <= 2.0M -let _ = 1.0M > 2.0M -let _ = 1.0M >= 2.0M -let _ = 1.0M = 2.0M -let _ = 1.0M <> 2.0M -let _ = 1.0M = 2.0M -let _ = compare 1.0M 2.0M diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/env.lst b/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/env.lst deleted file mode 100644 index 8cd1210a462..00000000000 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/env.lst +++ /dev/null @@ -1,2 +0,0 @@ - SOURCE=comparison_decimal01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd comparison_decimal01.exe" # comparison_decimal01.fs - diff --git a/tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj b/tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj deleted file mode 100644 index 7ba51a3f0f1..00000000000 --- a/tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net472;net6.0 - net6.0 - $(NoWarn);1591 - - - From a296dcbf807fe973af29c612c56473f190414814 Mon Sep 17 00:00:00 2001 From: KevinRansom Date: Thu, 31 Mar 2022 02:42:20 -0700 Subject: [PATCH 2/2] temp --- tests/FSharp.Test.Utilities/Compiler.fs | 2 +- tests/FSharp.Test.Utilities/CompilerAssert.fs | 4 ++-- tests/fsharp/Compiler/Language/CompilerDirectiveTests.fs | 4 ++-- tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index abbdabacd8b..dc018ceb6d9 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -442,7 +442,7 @@ module rec Compiler = let name = defaultArg cs.Name null let metadataReferences = List.map (asMetadataReference x) refs let cmpl = - CompilationUtil.CreateCSharpCompilation(cs.Source, cs.LangVersion, cs.TargetFramework, additionalReferences = metadataReferences.ToImmutableArray().As(), name = name) + CompilationUtil.CreateCSharpCompilation(cs.Source, cs.LangVersion, cs.TargetFramework, additionalReferences = metadataReferences.ToImmutableArray().As(), name = name) |> CompilationReference.Create loop (cmpl::acc) xs diff --git a/tests/FSharp.Test.Utilities/CompilerAssert.fs b/tests/FSharp.Test.Utilities/CompilerAssert.fs index 9c50d662c75..0caed220cb5 100644 --- a/tests/FSharp.Test.Utilities/CompilerAssert.fs +++ b/tests/FSharp.Test.Utilities/CompilerAssert.fs @@ -144,13 +144,13 @@ type CompilationUtil private () = let tf = defaultArg tf TargetFramework.NetStandard20 let source = source.GetSourceText |> Option.defaultValue "" let name = defaultArg name (Guid.NewGuid().ToString ()) - let additionalReferences = defaultArg additionalReferences ImmutableArray.Empty + let additionalReferences = defaultArg additionalReferences ImmutableArray.Empty let references = TargetFrameworkUtil.getReferences tf let c = CSharpCompilation.Create( name, [ CSharpSyntaxTree.ParseText (source, CSharpParseOptions lv) ], - (references.As()).AddRange(additionalReferences.As()), + references.AddRange(additionalReferences).As(), CSharpCompilationOptions (OutputKind.DynamicallyLinkedLibrary)) TestCompilation.CSharp c diff --git a/tests/fsharp/Compiler/Language/CompilerDirectiveTests.fs b/tests/fsharp/Compiler/Language/CompilerDirectiveTests.fs index a3ad7075e4b..d47cff9905d 100644 --- a/tests/fsharp/Compiler/Language/CompilerDirectiveTests.fs +++ b/tests/fsharp/Compiler/Language/CompilerDirectiveTests.fs @@ -15,7 +15,7 @@ module ``Test Compiler Directives`` = #r "" """ CompilerAssert.CompileWithErrors( - Compilation.Create(source, Library), + Compilation.Create("test.fsx", source, Library), [| FSharpDiagnosticSeverity.Warning, 213, (2,1,2,6), "'' is not a valid assembly name" |]) @@ -26,7 +26,7 @@ module ``Test Compiler Directives`` = #r " " """ CompilerAssert.CompileWithErrors( - Compilation.Create(source, Library), + Compilation.Create("test.fsx", source, Library), [| FSharpDiagnosticSeverity.Warning, 213, (2,1,2,10), "'' is not a valid assembly name" |]) diff --git a/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs b/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs index 6a9bca01aeb..1c89e249e8f 100644 --- a/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs +++ b/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs @@ -573,7 +573,7 @@ let f1 () = |> CompilationReference.Create let fsCmpl = - Compilation.Create(fsharpSource, Library, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) + Compilation.Create(fsharpSource, Exe, options = [|"--langversion:4.6"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| (FSharpDiagnosticSeverity.Error, 3350, (9, 5, 9, 15), "Feature 'default interface member consumption' is not available in F# 4.6. Please use language version " + targetVersion + " or greater.")