From ded0349883773e2c8df4caee6303470e01bb9ca8 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Mon, 6 Jan 2025 22:16:09 +0100 Subject: [PATCH 01/21] run type provider tests in sequence (#18200) --- .../ProjectAnalysisTests.fs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs b/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs index 1570cd34d0c..71bffac7974 100644 --- a/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs @@ -3691,7 +3691,7 @@ let _ = XmlProvider<"13">.GetSample() let options = { checker.GetProjectOptionsFromCommandLineArgs (projFileName, args) with SourceFiles = fileNames } // ".NET Core SKIPPED: Disabled until FSharp.Data.dll is build for dotnet core." -[] +[] let ``Test Project25 whole project errors`` () = let wholeProjectResults = checker.ParseAndCheckProject(Project25.options) |> Async.RunImmediate for e in wholeProjectResults.Diagnostics do @@ -3699,7 +3699,7 @@ let ``Test Project25 whole project errors`` () = wholeProjectResults.Diagnostics.Length |> shouldEqual 0 // ".NET Core SKIPPED: Disabled until FSharp.Data.dll is build for dotnet core." -[] +[] let ``Test Project25 symbol uses of type-provided members`` () = let wholeProjectResults = checker.ParseAndCheckProject(Project25.options) |> Async.RunImmediate let backgroundParseResults1, backgroundTypedParse1 = @@ -3756,8 +3756,8 @@ let ``Test Project25 symbol uses of type-provided members`` () = usesOfGetSampleSymbol |> shouldEqual [|("file1", ((5, 8), (5, 25))); ("file1", ((10, 8), (10, 78)))|] // ".NET Core SKIPPED: Disabled until FSharp.Data.dll is build for dotnet core.")>] -[] -let ``Test symbol uses of type-provided types`` () = +[] +let ``Test Project25 symbol uses of type-provided types`` () = let wholeProjectResults = checker.ParseAndCheckProject(Project25.options) |> Async.RunImmediate let backgroundParseResults1, backgroundTypedParse1 = checker.GetBackgroundCheckResultsForFileInProject(Project25.fileName1, Project25.options) @@ -3776,8 +3776,8 @@ let ``Test symbol uses of type-provided types`` () = usesOfGetSampleSymbol |> shouldEqual [|("file1", ((4, 15), (4, 26))); ("file1", ((10, 8), (10, 19)))|] -[] -let ``Test symbol uses of fully-qualified records`` () = +[] +let ``Test Project25 symbol uses of fully-qualified records`` () = let wholeProjectResults = checker.ParseAndCheckProject(Project25.options) |> Async.RunImmediate let backgroundParseResults1, backgroundTypedParse1 = checker.GetBackgroundCheckResultsForFileInProject(Project25.fileName1, Project25.options) From 6ce069132dcce529c25a6404b7c27818f96f5b6a Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Tue, 7 Jan 2025 04:18:55 -0800 Subject: [PATCH 02/21] Improve directory attribute refactor - Break up PR #18161 - Part 1 (#18195) * refactor * tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop --- ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 .../EmittedIL/ForLoop/ForLoop.fs | 416 ++++-------------- .../EmittedIL/ForLoop/ForLoop01.fs | 6 + ...ealInternalSignatureOff.OptimizeOff.il.bsl | 115 +++++ ...RealInternalSignatureOn.OptimizeOff.il.bsl | 144 ++++++ .../EmittedIL/ForLoop/ForLoop02.fs | 7 + ...ealInternalSignatureOff.OptimizeOff.il.bsl | 90 ++++ ...RealInternalSignatureOn.OptimizeOff.il.bsl | 109 +++++ .../EmittedIL/ForLoop/ForLoop03.fs | 14 + ...rnalSignatureOff.OptimizeOff.il.net472.bsl | 173 ++++++++ ...nalSignatureOff.OptimizeOff.il.netcore.bsl | 167 +++++++ ...ernalSignatureOn.OptimizeOff.il.net472.bsl | 189 ++++++++ ...rnalSignatureOn.OptimizeOff.il.netcore.bsl | 183 ++++++++ ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...alInternalSignatureOff.OptimizeOff.il.bsl} | 163 ++++--- ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOn.OptimizeOff.il.bsl} | 21 +- ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...alInternalSignatureOff.OptimizeOff.il.bsl} | 163 +++---- ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOn.OptimizeOff.il.bsl} | 35 +- ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOff.il.bsl | 226 ++++++++++ ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...d03.fs.RealInternalSignatureOff.opt.il.bsl | 304 ------------- ...RealInternalSignatureOn.OptimizeOff.il.bsl | 239 ++++++++++ ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...nd03.fs.RealInternalSignatureOn.opt.il.bsl | 323 -------------- ...ealInternalSignatureOff.OptimizeOff.il.bsl | 226 ++++++++++ ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...d04.fs.RealInternalSignatureOff.opt.il.bsl | 304 ------------- ...RealInternalSignatureOn.OptimizeOff.il.bsl | 239 ++++++++++ ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...nd04.fs.RealInternalSignatureOn.opt.il.bsl | 323 -------------- ...alInternalSignatureOff.OptimizeOff.il.bsl} | 237 +++++----- ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOn.OptimizeOff.il.bsl} | 165 ++++--- ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 ...ealInternalSignatureOff.OptimizeOn.il.bsl} | 0 ...RealInternalSignatureOn.OptimizeOn.il.bsl} | 0 tests/FSharp.Test.Utilities/Compiler.fs | 127 +++++- .../DirectoryAttribute.fs | 94 +--- .../FSharp.Test.Utilities.fsproj | 3 +- .../FileInlineDataAttribute.fs | 163 +++++++ .../ProjectGeneration.fs | 4 +- 83 files changed, 2890 insertions(+), 2082 deletions(-) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachOnArray01.fs.RealInternalSignatureOff.il.bsl => ForEachOnArray01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachOnArray01.fs.RealInternalSignatureOn.il.bsl => ForEachOnArray01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachOnList01.fs.RealInternalSignatureOff.il.bsl => ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachOnList01.fs.RealInternalSignatureOn.il.bsl => ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachOnString01.fs.RealInternalSignatureOff.il.bsl => ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachOnString01.fs.RealInternalSignatureOn.il.bsl => ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepByte.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepByte.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepChar.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepChar.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepInt16.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepInt16.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepInt32.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepInt32.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepInt64.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepInt64.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepSByte.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepSByte.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepUInt16.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepUInt16.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepUInt32.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepUInt32.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepUInt64.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepUInt64.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.opt.il.bsl => ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.opt.il.bsl => ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NoAllocationOfTuple01.fs.RealInternalSignatureOff.il.bsl => NoAllocationOfTuple01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NoAllocationOfTuple01.fs.RealInternalSignatureOn.il.bsl => NoAllocationOfTuple01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NoIEnumerable01.fsx.RealInternalSignatureOff.il.bsl => NoIEnumerable01.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NoIEnumerable01.fsx.RealInternalSignatureOn.il.bsl => NoIEnumerable01.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NoIEnumerable02.fsx.RealInternalSignatureOff.il.bsl => NoIEnumerable02.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NoIEnumerable02.fsx.RealInternalSignatureOn.il.bsl => NoIEnumerable02.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NoIEnumerable03.fsx.RealInternalSignatureOff.il.bsl => NoIEnumerable03.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NoIEnumerable03.fsx.RealInternalSignatureOn.il.bsl => NoIEnumerable03.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.opt.il.bsl => NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl} (61%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.il.bsl => NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.opt.il.bsl => NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl} (95%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.il.bsl => NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.opt.il.bsl => NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl} (60%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.il.bsl => NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.opt.il.bsl => NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl} (93%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.il.bsl => NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.il.bsl => NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.opt.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.il.bsl => NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.opt.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.il.bsl => NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.opt.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.il.bsl => NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.opt.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.opt.il.bsl => NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl} (52%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.il.bsl => NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.opt.il.bsl => NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl} (69%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.il.bsl => NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ZeroToArrLength01.fs.RealInternalSignatureOff.il.bsl => ZeroToArrLength01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ZeroToArrLength01.fs.RealInternalSignatureOn.il.bsl => ZeroToArrLength01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ZeroToArrLength02.fs.RealInternalSignatureOff.il.bsl => ZeroToArrLength02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/{ZeroToArrLength02.fs.RealInternalSignatureOn.il.bsl => ZeroToArrLength02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl} (100%) create mode 100644 tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs index 2f890a85222..a12316477a9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs @@ -10,442 +10,210 @@ module ForLoop = compilation |> withOptions [ "--test:EmitFeeFeeAs100001" ] |> asExe - |> withOptimize |> withEmbeddedPdb |> withEmbedAllSource |> ignoreWarnings |> verifyILBaseline - // SOURCE=NoAllocationOfTuple01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoAllocationOfTuple01.dll" # NoAllocationOfTuple01.fs - [] - let ``NoAllocationOfTuple01_fs_RealInternalSignatureOff`` compilation = + // SOURCE=ForLoop01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop01.exe" # ForLoop01.fs - + [] + let ``ForLoop01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - // SOURCE=NoAllocationOfTuple01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoAllocationOfTuple01.dll" # NoAllocationOfTuple01.fs - [] - let ``NoAllocationOfTuple01_fs_RealInternalSignatureOn`` compilation = + // SOURCE=ForLoop02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop02.exe" # ForLoop02.fs + [] + let ``ForLoop02_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - // SOURCE=ForEachOnArray01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnArray01.dll" # ForEachOnArray01.fs - [] - let ``ForEachOnArray01_fs_RealInternalSignatureOff`` compilation = + // SOURCE=ForLoop03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop03.exe" # ForLoop03.fs + [] + let ``ForLoop03_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - // SOURCE=ForEachOnArray01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnArray01.dll" # ForEachOnArray01.fs - [] - let ``ForEachOnArray01_fs_RealInternalSignatureOn`` compilation = + // SOURCE=NoAllocationOfTuple01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoAllocationOfTuple01.dll" # NoAllocationOfTuple01.fs + [] + let ``NoAllocationOfTuple01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - // SOURCE=ForEachOnList01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnList01.dll" # ForEachOnList01.fs - [] - let ``ForEachOnList01_fs_RealInternalSignatureOff`` compilation = + // SOURCE=ForEachOnArray01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnArray01.dll" # ForEachOnArray01.fs + [] + let ``ForEachOnArray01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachOnList01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnList01.dll" # ForEachOnList01.fs - [] - let ``ForEachOnList01_fs_RealInternalSignatureOn`` compilation = + [] + let ``ForEachOnList01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachOnString01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnString01.dll" # ForEachOnString01.fs - [] - let ``ForEachOnString01_fs_RealInternalSignatureOff`` compilation = + [] + let ``ForEachOnString01_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachOnString01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnString01.dll" # ForEachOnString01.fs - [] - let ``ForEachOnString01_fs_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ZeroToArrLength01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength01.dll" # ZeroToArrLength01.fs - [] - let ``ZeroToArrLength01_fs_RealInternalSignatureOff`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ZeroToArrLength01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength01.dll" # ZeroToArrLength01.fs - [] - let ``ZeroToArrLength01_fs_RealInternalSignatureOn`` compilation = + [] + let ``ZeroToArrLength01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ZeroToArrLength02.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength02.dll" # ZeroToArrLength02.fs - [] - let ``ZeroToArrLength02_fs_RealInternalSignatureOff`` compilation = + [] + let ``ZeroToArrLength02_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ZeroToArrLength02.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength02.dll" # ZeroToArrLength02.fs - [] - let ``ZeroToArrLength02_fs_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NoIEnumerable01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable01.dll" # NoIEnumerable01.fsx - [] - let ``NoIEnumerable01_fsx_RealInternalSignatureOff`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NoIEnumerable01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable01.dll" # NoIEnumerable01.fsx - [] - let ``NoIEnumerable01_fsx_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NoIEnumerable02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable02.dll" # NoIEnumerable02.fsx - [] - let ``NoIEnumerable02_fsx_RealInternalSignatureOff`` compilation = + [] + let ``NoIEnumerable01_fsx`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NoIEnumerable02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable02.dll" # NoIEnumerable02.fsx - [] - let ``NoIEnumerable02_fsx_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NoIEnumerable03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable03.dll" # NoIEnumerable03.fsx - [] - let ``NoIEnumerable03_fsx_RealInternalSignatureOff`` compilation = + [] + let ``NoIEnumerable02_fsx`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NoIEnumerable03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable03.dll" # NoIEnumerable03.fsx - [] - let ``NoIEnumerable03_fsx_RealInternalSignatureOn`` compilation = + [] + let ``NoIEnumerable03_fsx`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd01.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd01_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd01.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd01.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd01.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd02.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd02.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd02.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd02.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd03.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd02_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd03.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd03.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd03.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd04.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd03_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd04.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd04_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd04.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd04.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd05.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd05.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd05.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd05.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOn_nonopt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd05_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepSByte.fs SCFLAGS="--optimize+" # ForEachRangeStepSByte.fs --optimize+ - [] - let ``ForEachRangeStepSByte_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepSByte_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepSByte.fs SCFLAGS="--optimize+" # ForEachRangeStepSByte.fs --optimize+ - [] - let ``ForEachRangeStepSByte_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepByte.fs SCFLAGS="--optimize+" # ForEachRangeStepByte.fs --optimize+ - [] - let ``ForEachRangeStepByte_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepByte.fs SCFLAGS="--optimize+" # ForEachRangeStepByte.fs --optimize+ - [] - let ``ForEachRangeStepByte_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepByte_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepChar.fs SCFLAGS="--optimize+" # ForEachRangeStepChar.fs --optimize+ - [] - let ``ForEachRangeStepChar_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepChar.fs SCFLAGS="--optimize+" # ForEachRangeStepChar.fs --optimize+ - [] - let ``ForEachRangeStepChar_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepInt16.fs --optimize+ - [] - let ``ForEachRangeStepInt16_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepChar_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepInt16.fs --optimize+ - [] - let ``ForEachRangeStepInt16_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepInt16_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt16.fs --optimize+ - [] - let ``ForEachRangeStepUInt16_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUInt16_`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt16.fs --optimize+ - [] - let ``ForEachRangeStepUInt16_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepInt32.fs --optimize+ - [] - let ``ForEachRangeStepInt32_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepInt32.fs --optimize+ - [] - let ``ForEachRangeStepInt32_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepInt32_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt32.fs --optimize+ - [] - let ``ForEachRangeStepUInt32_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt32.fs --optimize+ - [] - let ``ForEachRangeStepUInt32_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepInt64.fs --optimize+ - [] - let ``ForEachRangeStepInt64_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUInt32_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepInt64.fs --optimize+ - [] - let ``ForEachRangeStepInt64_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepInt64_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt64.fs --optimize+ - [] - let ``ForEachRangeStepUInt64_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUInt64_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt64.fs --optimize+ - [] - let ``ForEachRangeStepUInt64_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepIntPtr_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepIntPtr_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepIntPtr_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepUIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepUIntPtr_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepUIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepUIntPtr_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStep_UnitsOfMeasure.fs SCFLAGS="--optimize+" # ForEachRangeStep_UnitsOfMeasure.fs --optimize+ - [] - let ``ForEachRangeStep_UnitsOfMeasure_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUIntPtr_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStep_UnitsOfMeasure.fs SCFLAGS="--optimize+" # ForEachRangeStep_UnitsOfMeasure.fs --optimize+ - [] - let ``ForEachRangeStep_UnitsOfMeasure_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStep_UnitsOfMeasure_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs new file mode 100644 index 00000000000..8d7d270e2c8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs @@ -0,0 +1,6 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression 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/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl new file mode 100644 index 00000000000..cf3ef015691 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -0,0 +1,115 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 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 public static void main@() cil managed + { + .entrypoint + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + int32 V_3, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, + int32 V_5) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.2 + IL_0003: ldc.i4.1 + IL_0004: stloc.3 + IL_0005: br.s IL_0019 + + IL_0007: ldloca.s V_1 + IL_0009: ldloc.3 + IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_000f: nop + IL_0010: ldloc.3 + IL_0011: ldc.i4.1 + IL_0012: add + IL_0013: stloc.3 + IL_0014: ldloc.2 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.2 + IL_0019: ldloc.2 + IL_001a: ldc.i4.3 + IL_001b: conv.i8 + IL_001c: blt.un.s IL_0007 + + IL_001e: ldloca.s V_1 + IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.s V_4 + IL_002e: br.s IL_005a + + IL_0030: ldloc.0 + IL_0031: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0036: stloc.s V_5 + IL_0038: ldstr "%A" + IL_003d: 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_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_004e: pop + IL_004f: ldloc.s V_4 + IL_0051: stloc.0 + IL_0052: ldloc.0 + IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0058: stloc.s V_4 + IL_005a: ldloc.s V_4 + IL_005c: brtrue.s IL_0030 + + IL_005e: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl new file mode 100644 index 00000000000..5914c20eb17 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -0,0 +1,144 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + int32 V_3, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, + int32 V_5) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.2 + IL_0003: ldc.i4.1 + IL_0004: stloc.3 + IL_0005: br.s IL_0019 + + IL_0007: ldloca.s V_1 + IL_0009: ldloc.3 + IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_000f: nop + IL_0010: ldloc.3 + IL_0011: ldc.i4.1 + IL_0012: add + IL_0013: stloc.3 + IL_0014: ldloc.2 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.2 + IL_0019: ldloc.2 + IL_001a: ldc.i4.3 + IL_001b: conv.i8 + IL_001c: blt.un.s IL_0007 + + IL_001e: ldloca.s V_1 + IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.s V_4 + IL_002e: br.s IL_005a + + IL_0030: ldloc.0 + IL_0031: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0036: stloc.s V_5 + IL_0038: ldstr "%A" + IL_003d: 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_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_004e: pop + IL_004f: ldloc.s V_4 + IL_0051: stloc.0 + IL_0052: ldloc.0 + IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0058: stloc.s V_4 + IL_005a: ldloc.s V_4 + IL_005c: brtrue.s IL_0030 + + IL_005e: 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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs new file mode 100644 index 00000000000..04882e0ec2c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs @@ -0,0 +1,7 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression 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/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl new file mode 100644 index 00000000000..9eabae75fe8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -0,0 +1,90 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.module assembly.exe + +.imagebase {value} +.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 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 public static void main@() cil managed + { + .entrypoint + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: br.s IL_001e + + IL_0004: ldstr "%A" + IL_0009: 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_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 + 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 + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl new file mode 100644 index 00000000000..652e223cd59 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -0,0 +1,109 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: br.s IL_001e + + IL_0004: ldstr "%A" + IL_0009: 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_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 + 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 + } + +} + +.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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs new file mode 100644 index 00000000000..9ce6ae8b25d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/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/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl new file mode 100644 index 00000000000..c2d8e84b8d7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -0,0 +1,173 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public specialname static class [runtime]System.Collections.Generic.List`1 get_ra() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Collections.Generic.List`1 ''.$assembly::ra@5 + IL_0005: ret + } + + .method public static void test1() cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [runtime]System.Collections.Generic.List`1 V_2, + valuetype [runtime]System.Collections.Generic.List`1/Enumerator V_3, + int32 V_4) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_003f + + IL_0006: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() + IL_0012: stloc.3 + .try + { + IL_0013: br.s IL_0022 + + IL_0015: ldloca.s V_3 + IL_0017: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_001c: stloc.s V_4 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloca.s V_3 + IL_0024: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_0029: brtrue.s IL_0015 + + IL_002b: leave.s IL_003b + + } + finally + { + IL_002d: ldloca.s V_3 + IL_002f: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator + IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003a: endfinally + } + IL_003b: ldloc.1 + IL_003c: ldc.i4.1 + IL_003d: add + IL_003e: stloc.1 + IL_003f: ldloc.1 + IL_0040: ldc.i4.1 + IL_0041: ldc.i4 0x989680 + IL_0046: add + IL_0047: blt.s IL_0006 + + IL_0049: ldstr "z = %d" + IL_004e: 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_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0058: ldloc.0 + IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005e: pop + IL_005f: ret + } + + .property class [runtime]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 [runtime]System.Collections.Generic.List`1 assembly::get_ra() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [runtime]System.Collections.Generic.List`1 ra@5 + .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 public static void main@() cil managed + { + .entrypoint + + .maxstack 5 + .locals init (class [runtime]System.Collections.Generic.List`1 V_0, + int32 V_1) + IL_0000: ldc.i4.s 100 + IL_0002: newobj instance void class [runtime]System.Collections.Generic.List`1::.ctor(int32) + IL_0007: dup + IL_0008: stsfld class [runtime]System.Collections.Generic.List`1 ''.$assembly::ra@5 + IL_000d: stloc.0 + IL_000e: ldc.i4.0 + IL_000f: stloc.1 + IL_0010: br.s IL_0021 + + IL_0012: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() + IL_0017: ldloc.1 + IL_0018: callvirt instance void class [runtime]System.Collections.Generic.List`1::Add(!0) + IL_001d: ldloc.1 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: stloc.1 + 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 + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl new file mode 100644 index 00000000000..c23cb75c545 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -0,0 +1,167 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern System.Collections +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 9: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public specialname static class [System.Collections]System.Collections.Generic.List`1 get_ra() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [System.Collections]System.Collections.Generic.List`1 ''.$assembly::ra@5 + IL_0005: ret + } + + .method public static void test1() cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [System.Collections]System.Collections.Generic.List`1 V_2, + valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator V_3, + int32 V_4) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_003f + + IL_0006: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: callvirt instance valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator class [System.Collections]System.Collections.Generic.List`1::GetEnumerator() + IL_0012: stloc.3 + .try + { + IL_0013: br.s IL_0022 + + IL_0015: ldloca.s V_3 + IL_0017: call instance !0 valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_001c: stloc.s V_4 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloca.s V_3 + IL_0024: call instance bool valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_0029: brtrue.s IL_0015 + + IL_002b: leave.s IL_003b + + } + finally + { + IL_002d: ldloca.s V_3 + IL_002f: constrained. valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator + IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003a: endfinally + } + IL_003b: ldloc.1 + IL_003c: ldc.i4.1 + IL_003d: add + IL_003e: stloc.1 + IL_003f: ldloc.1 + IL_0040: ldc.i4.1 + IL_0041: ldc.i4 0x989680 + IL_0046: add + IL_0047: blt.s IL_0006 + + IL_0049: ldstr "z = %d" + IL_004e: 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_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0058: ldloc.0 + IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005e: pop + IL_005f: ret + } + + .property class [System.Collections]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 [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [System.Collections]System.Collections.Generic.List`1 ra@5 + .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 public static void main@() cil managed + { + .entrypoint + + .maxstack 5 + .locals init (class [System.Collections]System.Collections.Generic.List`1 V_0, + int32 V_1) + IL_0000: ldc.i4.s 100 + IL_0002: newobj instance void class [System.Collections]System.Collections.Generic.List`1::.ctor(int32) + IL_0007: dup + IL_0008: stsfld class [System.Collections]System.Collections.Generic.List`1 ''.$assembly::ra@5 + IL_000d: stloc.0 + IL_000e: ldc.i4.0 + IL_000f: stloc.1 + IL_0010: br.s IL_0021 + + IL_0012: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + IL_0017: ldloc.1 + IL_0018: callvirt instance void class [System.Collections]System.Collections.Generic.List`1::Add(!0) + IL_001d: ldloc.1 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: stloc.1 + 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 + } + +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl new file mode 100644 index 00000000000..771e4efe186 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl @@ -0,0 +1,189 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.module assembly.exe + +.imagebase {value} +.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 ) + .field static assembly class [runtime]System.Collections.Generic.List`1 ra@5 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class [runtime]System.Collections.Generic.List`1 get_ra() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Collections.Generic.List`1 assembly::ra@5 + IL_0005: ret + } + + .method public static void test1() cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [runtime]System.Collections.Generic.List`1 V_2, + valuetype [runtime]System.Collections.Generic.List`1/Enumerator V_3, + int32 V_4) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_003f + + IL_0006: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() + IL_0012: stloc.3 + .try + { + IL_0013: br.s IL_0022 + + IL_0015: ldloca.s V_3 + IL_0017: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_001c: stloc.s V_4 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloca.s V_3 + IL_0024: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_0029: brtrue.s IL_0015 + + IL_002b: leave.s IL_003b + + } + finally + { + IL_002d: ldloca.s V_3 + IL_002f: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator + IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003a: endfinally + } + IL_003b: ldloc.1 + IL_003c: ldc.i4.1 + IL_003d: add + IL_003e: stloc.1 + IL_003f: ldloc.1 + IL_0040: ldc.i4.1 + IL_0041: ldc.i4 0x989680 + IL_0046: add + IL_0047: blt.s IL_0006 + + IL_0049: ldstr "z = %d" + IL_004e: 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_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0058: ldloc.0 + IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005e: pop + IL_005f: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldc.i4.s 100 + IL_0002: newobj instance void class [runtime]System.Collections.Generic.List`1::.ctor(int32) + IL_0007: stsfld class [runtime]System.Collections.Generic.List`1 assembly::ra@5 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: br.s IL_001f + + IL_0010: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() + IL_0015: ldloc.0 + IL_0016: callvirt instance void class [runtime]System.Collections.Generic.List`1::Add(!0) + IL_001b: ldloc.0 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.0 + IL_001f: ldloc.0 + IL_0020: ldc.i4.1 + IL_0021: ldc.i4.s 100 + IL_0023: add + IL_0024: blt.s IL_0010 + + IL_0026: ret + } + + .property class [runtime]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 [runtime]System.Collections.Generic.List`1 assembly::get_ra() + } +} + +.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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl new file mode 100644 index 00000000000..0efd6c82922 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -0,0 +1,183 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern System.Collections +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 9: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .field static assembly class [System.Collections]System.Collections.Generic.List`1 ra@5 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class [System.Collections]System.Collections.Generic.List`1 get_ra() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [System.Collections]System.Collections.Generic.List`1 assembly::ra@5 + IL_0005: ret + } + + .method public static void test1() cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [System.Collections]System.Collections.Generic.List`1 V_2, + valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator V_3, + int32 V_4) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_003f + + IL_0006: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: callvirt instance valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator class [System.Collections]System.Collections.Generic.List`1::GetEnumerator() + IL_0012: stloc.3 + .try + { + IL_0013: br.s IL_0022 + + IL_0015: ldloca.s V_3 + IL_0017: call instance !0 valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_001c: stloc.s V_4 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloca.s V_3 + IL_0024: call instance bool valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_0029: brtrue.s IL_0015 + + IL_002b: leave.s IL_003b + + } + finally + { + IL_002d: ldloca.s V_3 + IL_002f: constrained. valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator + IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003a: endfinally + } + IL_003b: ldloc.1 + IL_003c: ldc.i4.1 + IL_003d: add + IL_003e: stloc.1 + IL_003f: ldloc.1 + IL_0040: ldc.i4.1 + IL_0041: ldc.i4 0x989680 + IL_0046: add + IL_0047: blt.s IL_0006 + + IL_0049: ldstr "z = %d" + IL_004e: 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_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0058: ldloc.0 + IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005e: pop + IL_005f: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldc.i4.s 100 + IL_0002: newobj instance void class [System.Collections]System.Collections.Generic.List`1::.ctor(int32) + IL_0007: stsfld class [System.Collections]System.Collections.Generic.List`1 assembly::ra@5 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: br.s IL_001f + + IL_0010: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + IL_0015: ldloc.0 + IL_0016: callvirt instance void class [System.Collections]System.Collections.Generic.List`1::Add(!0) + IL_001b: ldloc.0 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.0 + IL_001f: ldloc.0 + IL_0020: ldc.i4.1 + IL_0021: ldc.i4.s 100 + IL_0023: add + IL_0024: blt.s IL_0010 + + IL_0026: ret + } + + .property class [System.Collections]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 [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + } +} + +.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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl similarity index 61% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 7e035bf8d61..0689c964faf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -87,84 +77,93 @@ .entrypoint .maxstack 7 - .locals init (int32 V_0, - int32 V_1, + .locals init (int32[] V_0, + int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32 V_5, + int32 V_6) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + IL_0007: dup + IL_0008: stsfld int32[] ''.$assembly::r@6 + IL_000d: stloc.0 + IL_000e: ldc.i4.5 + IL_000f: ldc.i4.2 + IL_0010: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: ldc.i4.0 - IL_0019: stloc.1 - IL_001a: call int32[] assembly::get_r() - IL_001f: ldlen - IL_0020: conv.i4 - IL_0021: stloc.2 - IL_0022: call int32[] assembly::get_w() - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: stloc.3 - IL_002a: ldloc.2 - IL_002b: ldloc.3 - IL_002c: bge.s IL_0032 - - IL_002e: ldloc.2 - IL_002f: nop - IL_0030: br.s IL_0034 - - IL_0032: ldloc.3 - IL_0033: nop - IL_0034: ldc.i4.1 - IL_0035: sub - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: blt.s IL_0067 - - IL_003b: call int32[] assembly::get_r() - IL_0040: ldloc.1 - IL_0041: call int32[] assembly::get_r() - IL_0046: ldloc.1 - IL_0047: ldelem [runtime]System.Int32 - IL_004c: call int32[] assembly::get_w() - IL_0051: ldloc.1 - IL_0052: ldelem [runtime]System.Int32 - IL_0057: add - IL_0058: stelem [runtime]System.Int32 - IL_005d: ldloc.1 - IL_005e: ldc.i4.1 - IL_005f: add - IL_0060: stloc.1 - IL_0061: ldloc.1 - IL_0062: ldloc.0 - IL_0063: ldc.i4.1 - IL_0064: add - IL_0065: bne.un.s IL_003b - - IL_0067: nop - IL_0068: nop - IL_0069: call int32[] assembly::get_r() - IL_006e: ldc.i4.0 - IL_006f: ldelem [runtime]System.Int32 - IL_0074: ldc.i4.3 - IL_0075: bne.un.s IL_007b - - IL_0077: ldc.i4.0 - IL_0078: nop - IL_0079: br.s IL_007d - - IL_007b: ldc.i4.1 - IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret + IL_0015: dup + IL_0016: stsfld int32[] ''.$assembly::w@7 + IL_001b: stloc.1 + IL_001c: ldc.i4.0 + IL_001d: stloc.3 + IL_001e: call int32[] assembly::get_r() + IL_0023: ldlen + IL_0024: conv.i4 + IL_0025: stloc.s V_4 + IL_0027: call int32[] assembly::get_w() + IL_002c: ldlen + IL_002d: conv.i4 + IL_002e: stloc.s V_5 + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: bge.s IL_003b + + IL_0036: ldloc.s V_4 + IL_0038: nop + IL_0039: br.s IL_003e + + IL_003b: ldloc.s V_5 + IL_003d: nop + IL_003e: ldc.i4.1 + IL_003f: sub + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: ldloc.3 + IL_0043: blt.s IL_0071 + + IL_0045: call int32[] assembly::get_r() + IL_004a: ldloc.3 + IL_004b: call int32[] assembly::get_r() + IL_0050: ldloc.3 + IL_0051: ldelem [runtime]System.Int32 + IL_0056: call int32[] assembly::get_w() + IL_005b: ldloc.3 + IL_005c: ldelem [runtime]System.Int32 + IL_0061: add + IL_0062: stelem [runtime]System.Int32 + IL_0067: ldloc.3 + IL_0068: ldc.i4.1 + IL_0069: add + IL_006a: stloc.3 + IL_006b: ldloc.3 + IL_006c: ldloc.2 + IL_006d: ldc.i4.1 + IL_006e: add + IL_006f: bne.un.s IL_0045 + + IL_0071: nop + IL_0072: nop + IL_0073: call int32[] assembly::get_r() + IL_0078: ldc.i4.0 + IL_0079: ldelem [runtime]System.Int32 + IL_007e: ldc.i4.3 + IL_007f: bne.un.s IL_0085 + + IL_0081: ldc.i4.0 + IL_0082: nop + IL_0083: br.s IL_0087 + + IL_0085: ldc.i4.1 + IL_0086: nop + IL_0087: stloc.s V_6 + IL_0089: ldloc.s V_6 + IL_008b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0090: pop + IL_0091: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl similarity index 95% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index fd8662b1ca5..813692fac56 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -81,7 +71,8 @@ .locals init (int32 V_0, int32 V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, @@ -153,9 +144,11 @@ IL_007b: ldc.i4.1 IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret + IL_007d: stloc.s V_4 + IL_007f: ldloc.s V_4 + IL_0081: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0086: pop + IL_0087: ret } .property int32[] r() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl similarity index 60% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 91f26499736..b86ee2d4a2c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -87,82 +77,93 @@ .entrypoint .maxstack 7 - .locals init (int32 V_0, - int32 V_1) + .locals init (int32[] V_0, + int32[] V_1, + int32 V_2, + int32 V_3, + int32 V_4, + int32 V_5, + int32 V_6) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + IL_0007: dup + IL_0008: stsfld int32[] ''.$assembly::r@6 + IL_000d: stloc.0 + IL_000e: ldc.i4.5 + IL_000f: ldc.i4.2 + IL_0010: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stloc.0 - IL_0020: call int32[] assembly::get_w() - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: stloc.1 - IL_0028: ldloc.0 - IL_0029: ldloc.1 - IL_002a: bge.s IL_0030 - - IL_002c: ldloc.0 - IL_002d: nop - IL_002e: br.s IL_0032 - - IL_0030: ldloc.1 - IL_0031: nop - IL_0032: ldc.i4.1 - IL_0033: sub - IL_0034: stloc.1 - IL_0035: ldc.i4.0 - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: bgt.s IL_0067 - - IL_003b: call int32[] assembly::get_r() - IL_0040: ldloc.1 - IL_0041: call int32[] assembly::get_r() - IL_0046: ldloc.1 - IL_0047: ldelem [runtime]System.Int32 - IL_004c: call int32[] assembly::get_w() - IL_0051: ldloc.1 - IL_0052: ldelem [runtime]System.Int32 - IL_0057: add - IL_0058: stelem [runtime]System.Int32 - IL_005d: ldloc.1 - IL_005e: ldc.i4.1 - IL_005f: sub - IL_0060: stloc.1 - IL_0061: ldloc.1 - IL_0062: ldloc.0 - IL_0063: ldc.i4.1 - IL_0064: sub - IL_0065: bne.un.s IL_003b - - IL_0067: nop - IL_0068: nop - IL_0069: call int32[] assembly::get_r() - IL_006e: ldc.i4.0 - IL_006f: ldelem [runtime]System.Int32 - IL_0074: ldc.i4.3 - IL_0075: bne.un.s IL_007b - - IL_0077: ldc.i4.0 - IL_0078: nop - IL_0079: br.s IL_007d - - IL_007b: ldc.i4.1 - IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret + IL_0015: dup + IL_0016: stsfld int32[] ''.$assembly::w@7 + IL_001b: stloc.1 + IL_001c: call int32[] assembly::get_r() + IL_0021: ldlen + IL_0022: conv.i4 + IL_0023: stloc.s V_4 + IL_0025: call int32[] assembly::get_w() + IL_002a: ldlen + IL_002b: conv.i4 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: bge.s IL_0039 + + IL_0034: ldloc.s V_4 + IL_0036: nop + IL_0037: br.s IL_003c + + IL_0039: ldloc.s V_5 + IL_003b: nop + IL_003c: ldc.i4.1 + IL_003d: sub + IL_003e: stloc.3 + IL_003f: ldc.i4.0 + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: ldloc.3 + IL_0043: bgt.s IL_0071 + + IL_0045: call int32[] assembly::get_r() + IL_004a: ldloc.3 + IL_004b: call int32[] assembly::get_r() + IL_0050: ldloc.3 + IL_0051: ldelem [runtime]System.Int32 + IL_0056: call int32[] assembly::get_w() + IL_005b: ldloc.3 + IL_005c: ldelem [runtime]System.Int32 + IL_0061: add + IL_0062: stelem [runtime]System.Int32 + IL_0067: ldloc.3 + IL_0068: ldc.i4.1 + IL_0069: sub + IL_006a: stloc.3 + IL_006b: ldloc.3 + IL_006c: ldloc.2 + IL_006d: ldc.i4.1 + IL_006e: sub + IL_006f: bne.un.s IL_0045 + + IL_0071: nop + IL_0072: nop + IL_0073: call int32[] assembly::get_r() + IL_0078: ldc.i4.0 + IL_0079: ldelem [runtime]System.Int32 + IL_007e: ldc.i4.3 + IL_007f: bne.un.s IL_0085 + + IL_0081: ldc.i4.0 + IL_0082: nop + IL_0083: br.s IL_0087 + + IL_0085: ldc.i4.1 + IL_0086: nop + IL_0087: stloc.s V_6 + IL_0089: ldloc.s V_6 + IL_008b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0090: pop + IL_0091: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl similarity index 93% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index f89292af139..860527ca19e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -79,7 +69,10 @@ .maxstack 7 .locals init (int32 V_0, - int32 V_1) + int32 V_1, + int32 V_2, + int32 V_3, + int32 V_4) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, @@ -93,20 +86,20 @@ IL_0018: call int32[] assembly::get_r() IL_001d: ldlen IL_001e: conv.i4 - IL_001f: stloc.0 + IL_001f: stloc.2 IL_0020: call int32[] assembly::get_w() IL_0025: ldlen IL_0026: conv.i4 - IL_0027: stloc.1 - IL_0028: ldloc.0 - IL_0029: ldloc.1 + IL_0027: stloc.3 + IL_0028: ldloc.2 + IL_0029: ldloc.3 IL_002a: bge.s IL_0030 - IL_002c: ldloc.0 + IL_002c: ldloc.2 IL_002d: nop IL_002e: br.s IL_0032 - IL_0030: ldloc.1 + IL_0030: ldloc.3 IL_0031: nop IL_0032: ldc.i4.1 IL_0033: sub @@ -151,9 +144,11 @@ IL_007b: ldc.i4.1 IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret + IL_007d: stloc.s V_4 + IL_007f: ldloc.s V_4 + IL_0081: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0086: pop + IL_0087: ret } .property int32[] r() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl new file mode 100644 index 00000000000..1c526104b4f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -0,0 +1,226 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public specialname static int32[] get_r() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] ''.$assembly::r@6 + IL_0005: ret + } + + .method public specialname static int32[] get_w() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] ''.$assembly::w@7 + IL_0005: ret + } + + .property int32[] 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 int32[] assembly::get_r() + } + .property int32[] w() + { + .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[] assembly::get_w() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32[] r@6 + .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[] w@7 + .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 public static void main@() cil managed + { + .entrypoint + + .maxstack 7 + .locals init (int32[] V_0, + int32[] V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3, + int32 V_4, + int32 V_5, + uint64 V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_7, + uint64 V_8, + int32 V_9, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_10, + int32 V_11, + int32 V_12) + IL_0000: ldc.i4.8 + IL_0001: ldc.i4.1 + IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0007: dup + IL_0008: stsfld int32[] ''.$assembly::r@6 + IL_000d: stloc.0 + IL_000e: ldc.i4.5 + IL_000f: ldc.i4.2 + IL_0010: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0015: dup + IL_0016: stsfld int32[] ''.$assembly::w@7 + IL_001b: stloc.1 + IL_001c: call int32[] assembly::get_r() + IL_0021: ldlen + IL_0022: conv.i4 + IL_0023: stloc.s V_4 + IL_0025: call int32[] assembly::get_w() + IL_002a: ldlen + IL_002b: conv.i4 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: bge.s IL_0039 + + IL_0034: ldloc.s V_4 + IL_0036: nop + IL_0037: br.s IL_003c + + IL_0039: ldloc.s V_5 + IL_003b: nop + IL_003c: ldc.i4.1 + IL_003d: sub + IL_003e: stloc.3 + IL_003f: ldloc.3 + IL_0040: ldc.i4.0 + IL_0041: bge.s IL_0048 + + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: nop + IL_0046: br.s IL_0050 + + IL_0048: ldloc.3 + IL_0049: ldc.i4.0 + IL_004a: sub + IL_004b: conv.i8 + IL_004c: ldc.i4.1 + IL_004d: conv.i8 + IL_004e: add + IL_004f: nop + IL_0050: stloc.s V_6 + IL_0052: ldc.i4.0 + IL_0053: conv.i8 + IL_0054: stloc.s V_8 + IL_0056: ldc.i4.0 + IL_0057: stloc.s V_9 + IL_0059: br.s IL_0072 + + IL_005b: ldloca.s V_7 + IL_005d: ldloc.s V_9 + IL_005f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0064: nop + IL_0065: ldloc.s V_9 + IL_0067: ldc.i4.1 + IL_0068: add + IL_0069: stloc.s V_9 + IL_006b: ldloc.s V_8 + IL_006d: ldc.i4.1 + IL_006e: conv.i8 + IL_006f: add + IL_0070: stloc.s V_8 + IL_0072: ldloc.s V_8 + IL_0074: ldloc.s V_6 + IL_0076: blt.un.s IL_005b + + IL_0078: ldloca.s V_7 + IL_007a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_007f: stloc.2 + IL_0080: ldloc.2 + IL_0081: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0086: stloc.s V_10 + IL_0088: br.s IL_00c2 + + IL_008a: ldloc.2 + IL_008b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0090: stloc.s V_11 + IL_0092: call int32[] assembly::get_r() + IL_0097: ldloc.s V_11 + IL_0099: call int32[] assembly::get_r() + IL_009e: ldloc.s V_11 + IL_00a0: ldelem [runtime]System.Int32 + IL_00a5: call int32[] assembly::get_w() + IL_00aa: ldloc.s V_11 + IL_00ac: ldelem [runtime]System.Int32 + IL_00b1: add + IL_00b2: stelem [runtime]System.Int32 + IL_00b7: ldloc.s V_10 + IL_00b9: stloc.2 + IL_00ba: ldloc.2 + IL_00bb: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00c0: stloc.s V_10 + IL_00c2: ldloc.s V_10 + IL_00c4: brtrue.s IL_008a + + IL_00c6: nop + IL_00c7: nop + IL_00c8: call int32[] assembly::get_r() + IL_00cd: ldc.i4.0 + IL_00ce: ldelem [runtime]System.Int32 + IL_00d3: ldc.i4.3 + IL_00d4: bne.un.s IL_00da + + IL_00d6: ldc.i4.0 + IL_00d7: nop + IL_00d8: br.s IL_00dc + + IL_00da: ldc.i4.1 + IL_00db: nop + IL_00dc: stloc.s V_12 + IL_00de: ldloc.s V_12 + IL_00e0: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00e5: pop + IL_00e6: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.opt.il.bsl deleted file mode 100644 index 618ba09189f..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.opt.il.bsl +++ /dev/null @@ -1,304 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0006: ret - } - - .property int32[] 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 int32[] assembly::get_r() - } - .property int32[] w() - { - .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[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .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 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .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 assembly::get_e1@1() - } - .property int32 e2@1() - { - .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 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .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 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32[] r@6 - .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[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .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 e1@1 - .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 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .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 public static void main@() cil managed - { - .entrypoint - - .maxstack 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 ''.$assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 ''.$assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldc.i4.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl new file mode 100644 index 00000000000..c8c389a198a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -0,0 +1,239 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .field static assembly int32[] r@6 + .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[] w@7 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static int32[] get_r() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] assembly::r@6 + IL_0005: ret + } + + .method public specialname static int32[] get_w() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] assembly::w@7 + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + int32 V_1, + int32 V_2, + int32 V_3, + uint64 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_5, + uint64 V_6, + int32 V_7, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_8, + int32 V_9, + int32 V_10) + IL_0000: ldc.i4.8 + IL_0001: ldc.i4.1 + IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0007: stsfld int32[] assembly::r@6 + IL_000c: ldc.i4.5 + IL_000d: ldc.i4.2 + IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0013: stsfld int32[] assembly::w@7 + IL_0018: call int32[] assembly::get_r() + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: stloc.2 + IL_0020: call int32[] assembly::get_w() + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: stloc.3 + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: bge.s IL_0030 + + IL_002c: ldloc.2 + IL_002d: nop + IL_002e: br.s IL_0032 + + IL_0030: ldloc.3 + IL_0031: nop + IL_0032: ldc.i4.1 + IL_0033: sub + IL_0034: stloc.1 + IL_0035: ldloc.1 + IL_0036: ldc.i4.0 + IL_0037: bge.s IL_003e + + IL_0039: ldc.i4.0 + IL_003a: conv.i8 + IL_003b: nop + IL_003c: br.s IL_0046 + + IL_003e: ldloc.1 + IL_003f: ldc.i4.0 + IL_0040: sub + IL_0041: conv.i8 + IL_0042: ldc.i4.1 + IL_0043: conv.i8 + IL_0044: add + IL_0045: nop + IL_0046: stloc.s V_4 + IL_0048: ldc.i4.0 + IL_0049: conv.i8 + IL_004a: stloc.s V_6 + IL_004c: ldc.i4.0 + IL_004d: stloc.s V_7 + IL_004f: br.s IL_0068 + + IL_0051: ldloca.s V_5 + IL_0053: ldloc.s V_7 + IL_0055: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005a: nop + IL_005b: ldloc.s V_7 + IL_005d: ldc.i4.1 + IL_005e: add + IL_005f: stloc.s V_7 + IL_0061: ldloc.s V_6 + IL_0063: ldc.i4.1 + IL_0064: conv.i8 + IL_0065: add + IL_0066: stloc.s V_6 + IL_0068: ldloc.s V_6 + IL_006a: ldloc.s V_4 + IL_006c: blt.un.s IL_0051 + + IL_006e: ldloca.s V_5 + IL_0070: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0075: stloc.0 + IL_0076: ldloc.0 + IL_0077: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007c: stloc.s V_8 + IL_007e: br.s IL_00b8 + + IL_0080: ldloc.0 + IL_0081: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0086: stloc.s V_9 + IL_0088: call int32[] assembly::get_r() + IL_008d: ldloc.s V_9 + IL_008f: call int32[] assembly::get_r() + IL_0094: ldloc.s V_9 + IL_0096: ldelem [runtime]System.Int32 + IL_009b: call int32[] assembly::get_w() + IL_00a0: ldloc.s V_9 + IL_00a2: ldelem [runtime]System.Int32 + IL_00a7: add + IL_00a8: stelem [runtime]System.Int32 + IL_00ad: ldloc.s V_8 + IL_00af: stloc.0 + IL_00b0: ldloc.0 + IL_00b1: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00b6: stloc.s V_8 + IL_00b8: ldloc.s V_8 + IL_00ba: brtrue.s IL_0080 + + IL_00bc: nop + IL_00bd: nop + IL_00be: call int32[] assembly::get_r() + IL_00c3: ldc.i4.0 + IL_00c4: ldelem [runtime]System.Int32 + IL_00c9: ldc.i4.3 + IL_00ca: bne.un.s IL_00d0 + + IL_00cc: ldc.i4.0 + IL_00cd: nop + IL_00ce: br.s IL_00d2 + + IL_00d0: ldc.i4.1 + IL_00d1: nop + IL_00d2: stloc.s V_10 + IL_00d4: ldloc.s V_10 + IL_00d6: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00db: pop + IL_00dc: ret + } + + .property int32[] 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 int32[] assembly::get_r() + } + .property int32[] w() + { + .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[] assembly::get_w() + } +} + +.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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.opt.il.bsl deleted file mode 100644 index 7838a9c7d69..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.opt.il.bsl +++ /dev/null @@ -1,323 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 ) - .field static assembly int32[] r@6 - .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[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .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 e1@1 - .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 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldc.i4.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - - .property int32[] 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 int32[] assembly::get_r() - } - .property int32[] w() - { - .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[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .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 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .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 assembly::get_e1@1() - } - .property int32 e2@1() - { - .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 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .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 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.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 public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl new file mode 100644 index 00000000000..926e5db3845 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -0,0 +1,226 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public specialname static int32[] get_r() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] ''.$assembly::r@6 + IL_0005: ret + } + + .method public specialname static int32[] get_w() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] ''.$assembly::w@7 + IL_0005: ret + } + + .property int32[] 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 int32[] assembly::get_r() + } + .property int32[] w() + { + .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[] assembly::get_w() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32[] r@6 + .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[] w@7 + .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 public static void main@() cil managed + { + .entrypoint + + .maxstack 7 + .locals init (int32[] V_0, + int32[] V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3, + int32 V_4, + int32 V_5, + uint64 V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_7, + uint64 V_8, + int32 V_9, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_10, + int32 V_11, + int32 V_12) + IL_0000: ldc.i4.8 + IL_0001: ldc.i4.1 + IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0007: dup + IL_0008: stsfld int32[] ''.$assembly::r@6 + IL_000d: stloc.0 + IL_000e: ldc.i4.5 + IL_000f: ldc.i4.2 + IL_0010: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0015: dup + IL_0016: stsfld int32[] ''.$assembly::w@7 + IL_001b: stloc.1 + IL_001c: call int32[] assembly::get_r() + IL_0021: ldlen + IL_0022: conv.i4 + IL_0023: stloc.s V_4 + IL_0025: call int32[] assembly::get_w() + IL_002a: ldlen + IL_002b: conv.i4 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: bge.s IL_0039 + + IL_0034: ldloc.s V_4 + IL_0036: nop + IL_0037: br.s IL_003c + + IL_0039: ldloc.s V_5 + IL_003b: nop + IL_003c: ldc.i4.1 + IL_003d: sub + IL_003e: stloc.3 + IL_003f: ldloc.3 + IL_0040: ldc.i4.0 + IL_0041: bge.s IL_0048 + + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: nop + IL_0046: br.s IL_0050 + + IL_0048: ldloc.3 + IL_0049: ldc.i4.0 + IL_004a: sub + IL_004b: conv.i8 + IL_004c: ldc.i4.1 + IL_004d: conv.i8 + IL_004e: add + IL_004f: nop + IL_0050: stloc.s V_6 + IL_0052: ldc.i4.0 + IL_0053: conv.i8 + IL_0054: stloc.s V_8 + IL_0056: ldloc.3 + IL_0057: stloc.s V_9 + IL_0059: br.s IL_0072 + + IL_005b: ldloca.s V_7 + IL_005d: ldloc.s V_9 + IL_005f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0064: nop + IL_0065: ldloc.s V_9 + IL_0067: ldc.i4.m1 + IL_0068: add + IL_0069: stloc.s V_9 + IL_006b: ldloc.s V_8 + IL_006d: ldc.i4.1 + IL_006e: conv.i8 + IL_006f: add + IL_0070: stloc.s V_8 + IL_0072: ldloc.s V_8 + IL_0074: ldloc.s V_6 + IL_0076: blt.un.s IL_005b + + IL_0078: ldloca.s V_7 + IL_007a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_007f: stloc.2 + IL_0080: ldloc.2 + IL_0081: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0086: stloc.s V_10 + IL_0088: br.s IL_00c2 + + IL_008a: ldloc.2 + IL_008b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0090: stloc.s V_11 + IL_0092: call int32[] assembly::get_r() + IL_0097: ldloc.s V_11 + IL_0099: call int32[] assembly::get_r() + IL_009e: ldloc.s V_11 + IL_00a0: ldelem [runtime]System.Int32 + IL_00a5: call int32[] assembly::get_w() + IL_00aa: ldloc.s V_11 + IL_00ac: ldelem [runtime]System.Int32 + IL_00b1: add + IL_00b2: stelem [runtime]System.Int32 + IL_00b7: ldloc.s V_10 + IL_00b9: stloc.2 + IL_00ba: ldloc.2 + IL_00bb: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00c0: stloc.s V_10 + IL_00c2: ldloc.s V_10 + IL_00c4: brtrue.s IL_008a + + IL_00c6: nop + IL_00c7: nop + IL_00c8: call int32[] assembly::get_r() + IL_00cd: ldc.i4.0 + IL_00ce: ldelem [runtime]System.Int32 + IL_00d3: ldc.i4.3 + IL_00d4: bne.un.s IL_00da + + IL_00d6: ldc.i4.0 + IL_00d7: nop + IL_00d8: br.s IL_00dc + + IL_00da: ldc.i4.1 + IL_00db: nop + IL_00dc: stloc.s V_12 + IL_00de: ldloc.s V_12 + IL_00e0: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00e5: pop + IL_00e6: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.opt.il.bsl deleted file mode 100644 index cdb60cf3f61..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.opt.il.bsl +++ /dev/null @@ -1,304 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0006: ret - } - - .property int32[] 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 int32[] assembly::get_r() - } - .property int32[] w() - { - .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[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .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 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .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 assembly::get_e1@1() - } - .property int32 e2@1() - { - .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 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .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 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32[] r@6 - .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[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .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 e1@1 - .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 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .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 public static void main@() cil managed - { - .entrypoint - - .maxstack 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 ''.$assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 ''.$assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldloc.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.m1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl new file mode 100644 index 00000000000..dc19fd30e6e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -0,0 +1,239 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .field static assembly int32[] r@6 + .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[] w@7 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static int32[] get_r() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] assembly::r@6 + IL_0005: ret + } + + .method public specialname static int32[] get_w() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] assembly::w@7 + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + int32 V_1, + int32 V_2, + int32 V_3, + uint64 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_5, + uint64 V_6, + int32 V_7, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_8, + int32 V_9, + int32 V_10) + IL_0000: ldc.i4.8 + IL_0001: ldc.i4.1 + IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0007: stsfld int32[] assembly::r@6 + IL_000c: ldc.i4.5 + IL_000d: ldc.i4.2 + IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0013: stsfld int32[] assembly::w@7 + IL_0018: call int32[] assembly::get_r() + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: stloc.2 + IL_0020: call int32[] assembly::get_w() + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: stloc.3 + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: bge.s IL_0030 + + IL_002c: ldloc.2 + IL_002d: nop + IL_002e: br.s IL_0032 + + IL_0030: ldloc.3 + IL_0031: nop + IL_0032: ldc.i4.1 + IL_0033: sub + IL_0034: stloc.1 + IL_0035: ldloc.1 + IL_0036: ldc.i4.0 + IL_0037: bge.s IL_003e + + IL_0039: ldc.i4.0 + IL_003a: conv.i8 + IL_003b: nop + IL_003c: br.s IL_0046 + + IL_003e: ldloc.1 + IL_003f: ldc.i4.0 + IL_0040: sub + IL_0041: conv.i8 + IL_0042: ldc.i4.1 + IL_0043: conv.i8 + IL_0044: add + IL_0045: nop + IL_0046: stloc.s V_4 + IL_0048: ldc.i4.0 + IL_0049: conv.i8 + IL_004a: stloc.s V_6 + IL_004c: ldloc.1 + IL_004d: stloc.s V_7 + IL_004f: br.s IL_0068 + + IL_0051: ldloca.s V_5 + IL_0053: ldloc.s V_7 + IL_0055: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005a: nop + IL_005b: ldloc.s V_7 + IL_005d: ldc.i4.m1 + IL_005e: add + IL_005f: stloc.s V_7 + IL_0061: ldloc.s V_6 + IL_0063: ldc.i4.1 + IL_0064: conv.i8 + IL_0065: add + IL_0066: stloc.s V_6 + IL_0068: ldloc.s V_6 + IL_006a: ldloc.s V_4 + IL_006c: blt.un.s IL_0051 + + IL_006e: ldloca.s V_5 + IL_0070: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0075: stloc.0 + IL_0076: ldloc.0 + IL_0077: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007c: stloc.s V_8 + IL_007e: br.s IL_00b8 + + IL_0080: ldloc.0 + IL_0081: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0086: stloc.s V_9 + IL_0088: call int32[] assembly::get_r() + IL_008d: ldloc.s V_9 + IL_008f: call int32[] assembly::get_r() + IL_0094: ldloc.s V_9 + IL_0096: ldelem [runtime]System.Int32 + IL_009b: call int32[] assembly::get_w() + IL_00a0: ldloc.s V_9 + IL_00a2: ldelem [runtime]System.Int32 + IL_00a7: add + IL_00a8: stelem [runtime]System.Int32 + IL_00ad: ldloc.s V_8 + IL_00af: stloc.0 + IL_00b0: ldloc.0 + IL_00b1: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00b6: stloc.s V_8 + IL_00b8: ldloc.s V_8 + IL_00ba: brtrue.s IL_0080 + + IL_00bc: nop + IL_00bd: nop + IL_00be: call int32[] assembly::get_r() + IL_00c3: ldc.i4.0 + IL_00c4: ldelem [runtime]System.Int32 + IL_00c9: ldc.i4.3 + IL_00ca: bne.un.s IL_00d0 + + IL_00cc: ldc.i4.0 + IL_00cd: nop + IL_00ce: br.s IL_00d2 + + IL_00d0: ldc.i4.1 + IL_00d1: nop + IL_00d2: stloc.s V_10 + IL_00d4: ldloc.s V_10 + IL_00d6: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00db: pop + IL_00dc: ret + } + + .property int32[] 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 int32[] assembly::get_r() + } + .property int32[] w() + { + .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[] assembly::get_w() + } +} + +.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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.opt.il.bsl deleted file mode 100644 index 33caf0bc8ca..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.opt.il.bsl +++ /dev/null @@ -1,323 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 ) - .field static assembly int32[] r@6 - .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[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .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 e1@1 - .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 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldloc.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.m1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - - .property int32[] 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 int32[] assembly::get_r() - } - .property int32[] w() - { - .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[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .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 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .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 assembly::get_e1@1() - } - .property int32 e2@1() - { - .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 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .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 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.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 public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl similarity index 52% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 5aca7747bda..a693bbf47b8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -87,123 +77,134 @@ .entrypoint .maxstack 7 - .locals init (int32 V_0, - int32 V_1, + .locals init (int32[] V_0, + int32[] V_1, int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + int32 V_6, + int32 V_7, + int32 V_8, + int32 V_9, + int32 V_10) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + IL_0007: dup + IL_0008: stsfld int32[] ''.$assembly::r@6 + IL_000d: stloc.0 + IL_000e: ldc.i4.5 + IL_000f: ldc.i4.2 + IL_0010: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: ldc.i4.0 - IL_0019: stloc.1 - IL_001a: call int32[] assembly::get_r() - IL_001f: ldlen - IL_0020: conv.i4 - IL_0021: stloc.2 - IL_0022: call int32[] assembly::get_w() - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: stloc.3 - IL_002a: ldloc.2 - IL_002b: ldloc.3 - IL_002c: bge.s IL_0032 - - IL_002e: ldloc.2 - IL_002f: nop - IL_0030: br.s IL_0034 - - IL_0032: ldloc.3 - IL_0033: nop - IL_0034: ldc.i4.1 - IL_0035: sub - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: blt.s IL_009a - - IL_003b: ldc.i4.0 - IL_003c: stloc.3 - IL_003d: call int32[] assembly::get_r() - IL_0042: ldlen - IL_0043: conv.i4 - IL_0044: stloc.s V_4 - IL_0046: call int32[] assembly::get_w() - IL_004b: ldlen - IL_004c: conv.i4 - IL_004d: stloc.s V_5 - IL_004f: ldloc.s V_4 - IL_0051: ldloc.s V_5 - IL_0053: bge.s IL_005a - - IL_0055: ldloc.s V_4 - IL_0057: nop - IL_0058: br.s IL_005d - - IL_005a: ldloc.s V_5 - IL_005c: nop - IL_005d: ldc.i4.1 - IL_005e: sub - IL_005f: stloc.2 - IL_0060: ldloc.2 - IL_0061: ldloc.3 - IL_0062: blt.s IL_0090 - - IL_0064: call int32[] assembly::get_r() - IL_0069: ldloc.3 - IL_006a: call int32[] assembly::get_r() - IL_006f: ldloc.3 - IL_0070: ldelem [runtime]System.Int32 - IL_0075: call int32[] assembly::get_w() - IL_007a: ldloc.3 - IL_007b: ldelem [runtime]System.Int32 - IL_0080: add - IL_0081: stelem [runtime]System.Int32 - IL_0086: ldloc.3 - IL_0087: ldc.i4.1 - IL_0088: add - IL_0089: stloc.3 - IL_008a: ldloc.3 - IL_008b: ldloc.2 - IL_008c: ldc.i4.1 - IL_008d: add - IL_008e: bne.un.s IL_0064 - - IL_0090: ldloc.1 - IL_0091: ldc.i4.1 - IL_0092: add - IL_0093: stloc.1 - IL_0094: ldloc.1 - IL_0095: ldloc.0 - IL_0096: ldc.i4.1 - IL_0097: add - IL_0098: bne.un.s IL_003b - - IL_009a: nop - IL_009b: nop - IL_009c: call int32[] assembly::get_r() - IL_00a1: ldc.i4.0 - IL_00a2: ldelem [runtime]System.Int32 - IL_00a7: ldc.i4.s 11 - IL_00a9: bne.un.s IL_00af - - IL_00ab: ldc.i4.0 - IL_00ac: nop - IL_00ad: br.s IL_00b1 - - IL_00af: ldc.i4.1 + IL_0015: dup + IL_0016: stsfld int32[] ''.$assembly::w@7 + IL_001b: stloc.1 + IL_001c: ldc.i4.0 + IL_001d: stloc.3 + IL_001e: call int32[] assembly::get_r() + IL_0023: ldlen + IL_0024: conv.i4 + IL_0025: stloc.s V_4 + IL_0027: call int32[] assembly::get_w() + IL_002c: ldlen + IL_002d: conv.i4 + IL_002e: stloc.s V_5 + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: bge.s IL_003b + + IL_0036: ldloc.s V_4 + IL_0038: nop + IL_0039: br.s IL_003e + + IL_003b: ldloc.s V_5 + IL_003d: nop + IL_003e: ldc.i4.1 + IL_003f: sub + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: ldloc.3 + IL_0043: blt.s IL_00af + + IL_0045: ldc.i4.0 + IL_0046: stloc.s V_7 + IL_0048: call int32[] assembly::get_r() + IL_004d: ldlen + IL_004e: conv.i4 + IL_004f: stloc.s V_8 + IL_0051: call int32[] assembly::get_w() + IL_0056: ldlen + IL_0057: conv.i4 + IL_0058: stloc.s V_9 + IL_005a: ldloc.s V_8 + IL_005c: ldloc.s V_9 + IL_005e: bge.s IL_0065 + + IL_0060: ldloc.s V_8 + IL_0062: nop + IL_0063: br.s IL_0068 + + IL_0065: ldloc.s V_9 + IL_0067: nop + IL_0068: ldc.i4.1 + IL_0069: sub + IL_006a: stloc.s V_6 + IL_006c: ldloc.s V_6 + IL_006e: ldloc.s V_7 + IL_0070: blt.s IL_00a5 + + IL_0072: call int32[] assembly::get_r() + IL_0077: ldloc.s V_7 + IL_0079: call int32[] assembly::get_r() + IL_007e: ldloc.s V_7 + IL_0080: ldelem [runtime]System.Int32 + IL_0085: call int32[] assembly::get_w() + IL_008a: ldloc.s V_7 + IL_008c: ldelem [runtime]System.Int32 + IL_0091: add + IL_0092: stelem [runtime]System.Int32 + IL_0097: ldloc.s V_7 + IL_0099: ldc.i4.1 + IL_009a: add + IL_009b: stloc.s V_7 + IL_009d: ldloc.s V_7 + IL_009f: ldloc.s V_6 + IL_00a1: ldc.i4.1 + IL_00a2: add + IL_00a3: bne.un.s IL_0072 + + IL_00a5: ldloc.3 + IL_00a6: ldc.i4.1 + IL_00a7: add + IL_00a8: stloc.3 + IL_00a9: ldloc.3 + IL_00aa: ldloc.2 + IL_00ab: ldc.i4.1 + IL_00ac: add + IL_00ad: bne.un.s IL_0045 + + IL_00af: nop IL_00b0: nop - IL_00b1: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_00b6: pop - IL_00b7: ret + IL_00b1: call int32[] assembly::get_r() + IL_00b6: ldc.i4.0 + IL_00b7: ldelem [runtime]System.Int32 + IL_00bc: ldc.i4.s 11 + IL_00be: bne.un.s IL_00c4 + + IL_00c0: ldc.i4.0 + IL_00c1: nop + IL_00c2: br.s IL_00c6 + + IL_00c4: ldc.i4.1 + IL_00c5: nop + IL_00c6: stloc.s V_10 + IL_00c8: ldloc.s V_10 + IL_00ca: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00cf: pop + IL_00d0: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl similarity index 69% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index edd7456baca..a8c564901d3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -83,7 +73,10 @@ int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + int32 V_6, + int32 V_7, + int32 V_8) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, @@ -119,82 +112,84 @@ IL_0036: stloc.0 IL_0037: ldloc.0 IL_0038: ldloc.1 - IL_0039: blt.s IL_009a + IL_0039: blt.s IL_00a5 IL_003b: ldc.i4.0 - IL_003c: stloc.3 - IL_003d: call int32[] assembly::get_r() - IL_0042: ldlen - IL_0043: conv.i4 - IL_0044: stloc.s V_4 - IL_0046: call int32[] assembly::get_w() - IL_004b: ldlen - IL_004c: conv.i4 - IL_004d: stloc.s V_5 - IL_004f: ldloc.s V_4 - IL_0051: ldloc.s V_5 - IL_0053: bge.s IL_005a - - IL_0055: ldloc.s V_4 - IL_0057: nop - IL_0058: br.s IL_005d - - IL_005a: ldloc.s V_5 - IL_005c: nop - IL_005d: ldc.i4.1 - IL_005e: sub - IL_005f: stloc.2 - IL_0060: ldloc.2 - IL_0061: ldloc.3 - IL_0062: blt.s IL_0090 - - IL_0064: call int32[] assembly::get_r() - IL_0069: ldloc.3 - IL_006a: call int32[] assembly::get_r() - IL_006f: ldloc.3 - IL_0070: ldelem [runtime]System.Int32 - IL_0075: call int32[] assembly::get_w() - IL_007a: ldloc.3 - IL_007b: ldelem [runtime]System.Int32 - IL_0080: add - IL_0081: stelem [runtime]System.Int32 - IL_0086: ldloc.3 - IL_0087: ldc.i4.1 - IL_0088: add - IL_0089: stloc.3 - IL_008a: ldloc.3 - IL_008b: ldloc.2 - IL_008c: ldc.i4.1 - IL_008d: add - IL_008e: bne.un.s IL_0064 - - IL_0090: ldloc.1 - IL_0091: ldc.i4.1 - IL_0092: add - IL_0093: stloc.1 - IL_0094: ldloc.1 - IL_0095: ldloc.0 - IL_0096: ldc.i4.1 - IL_0097: add - IL_0098: bne.un.s IL_003b - - IL_009a: nop - IL_009b: nop - IL_009c: call int32[] assembly::get_r() - IL_00a1: ldc.i4.0 - IL_00a2: ldelem [runtime]System.Int32 - IL_00a7: ldc.i4.s 11 - IL_00a9: bne.un.s IL_00af - - IL_00ab: ldc.i4.0 - IL_00ac: nop - IL_00ad: br.s IL_00b1 - - IL_00af: ldc.i4.1 - IL_00b0: nop - IL_00b1: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_00b6: pop - IL_00b7: ret + IL_003c: stloc.s V_5 + IL_003e: call int32[] assembly::get_r() + IL_0043: ldlen + IL_0044: conv.i4 + IL_0045: stloc.s V_6 + IL_0047: call int32[] assembly::get_w() + IL_004c: ldlen + IL_004d: conv.i4 + IL_004e: stloc.s V_7 + IL_0050: ldloc.s V_6 + IL_0052: ldloc.s V_7 + IL_0054: bge.s IL_005b + + IL_0056: ldloc.s V_6 + IL_0058: nop + IL_0059: br.s IL_005e + + IL_005b: ldloc.s V_7 + IL_005d: nop + IL_005e: ldc.i4.1 + IL_005f: sub + IL_0060: stloc.s V_4 + IL_0062: ldloc.s V_4 + IL_0064: ldloc.s V_5 + IL_0066: blt.s IL_009b + + IL_0068: call int32[] assembly::get_r() + IL_006d: ldloc.s V_5 + IL_006f: call int32[] assembly::get_r() + IL_0074: ldloc.s V_5 + IL_0076: ldelem [runtime]System.Int32 + IL_007b: call int32[] assembly::get_w() + IL_0080: ldloc.s V_5 + IL_0082: ldelem [runtime]System.Int32 + IL_0087: add + IL_0088: stelem [runtime]System.Int32 + IL_008d: ldloc.s V_5 + IL_008f: ldc.i4.1 + IL_0090: add + IL_0091: stloc.s V_5 + IL_0093: ldloc.s V_5 + IL_0095: ldloc.s V_4 + IL_0097: ldc.i4.1 + IL_0098: add + IL_0099: bne.un.s IL_0068 + + IL_009b: ldloc.1 + IL_009c: ldc.i4.1 + IL_009d: add + IL_009e: stloc.1 + IL_009f: ldloc.1 + IL_00a0: ldloc.0 + IL_00a1: ldc.i4.1 + IL_00a2: add + IL_00a3: bne.un.s IL_003b + + IL_00a5: nop + IL_00a6: nop + IL_00a7: call int32[] assembly::get_r() + IL_00ac: ldc.i4.0 + IL_00ad: ldelem [runtime]System.Int32 + IL_00b2: ldc.i4.s 11 + IL_00b4: bne.un.s IL_00ba + + IL_00b6: ldc.i4.0 + IL_00b7: nop + IL_00b8: br.s IL_00bc + + IL_00ba: ldc.i4.1 + IL_00bb: nop + IL_00bc: stloc.s V_8 + IL_00be: ldloc.s V_8 + IL_00c0: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00c5: pop + IL_00c6: ret } .property int32[] r() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index cd409116c3c..cee7c81b0d7 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -13,6 +13,7 @@ open FSharp.Test.ScriptHelpers open Microsoft.CodeAnalysis open Microsoft.CodeAnalysis.CSharp open Xunit +open Xunit.Abstractions open System open System.Collections.Immutable open System.IO @@ -29,8 +30,8 @@ open System.Runtime.CompilerServices open System.Runtime.InteropServices open FSharp.Compiler.CodeAnalysis - module rec Compiler = + [] type SourceUtilities () = static member getCurrentMethodName([] memberName: string) = memberName @@ -57,7 +58,9 @@ module rec Compiler = | FS of FSharpCompilationSource | CS of CSharpCompilationSource | IL of ILCompilationSource - override this.ToString() = match this with | FS fs -> fs.ToString() | _ -> (sprintf "%A" this ) + + override this.ToString() = match this with | FS fs -> fs.ToString() | _ -> (sprintf "%A" this) + member this.OutputDirectory = let toString diOpt = match diOpt: DirectoryInfo option with @@ -67,6 +70,7 @@ module rec Compiler = | FS fs -> fs.OutputDirectory |> toString | CS cs -> cs.OutputDirectory |> toString | _ -> raise (Exception "Not supported for this compilation type") + member this.WithStaticLink(staticLink: bool) = match this with | FS fs -> FS { fs with StaticLink = staticLink } | cu -> cu type FSharpCompilationSource = @@ -81,7 +85,7 @@ module rec Compiler = References: CompilationUnit list TargetFramework: TargetFramework StaticLink: bool - } + } member this.CreateOutputDirectory() = match this.OutputDirectory with @@ -219,6 +223,102 @@ module rec Compiler = let result = invalidPathChars |> Array.fold(fun (acc:string) (c:char) -> acc.Replace(string(c), "_")) name result + let readFileOrDefault (path: string): string option = + match FileSystem.FileExistsShim(path) with + | true -> Some (File.ReadAllText path) + | _ -> None + + let createCompilationUnit baselineSuffix directoryPath filename = + + let outputDirectoryPath = createTemporaryDirectory().FullName + let sourceFilePath = normalizePathSeparator (directoryPath ++ filename) + let fsBslFilePath = sourceFilePath + baselineSuffix + ".err.bsl" + let ilBslFilePath = + let ilBslPaths = [| +#if DEBUG + #if NETCOREAPP + yield sourceFilePath + baselineSuffix + ".il.netcore.debug.bsl" + yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" + #else + yield sourceFilePath + baselineSuffix + ".il.net472.debug.bsl" + yield sourceFilePath + baselineSuffix + ".il.net472.bsl" + #endif + yield sourceFilePath + baselineSuffix + ".il.debug.bsl" + yield sourceFilePath + baselineSuffix + ".il.bsl" +#else + #if NETCOREAPP + yield sourceFilePath + baselineSuffix + ".il.netcore.release.bsl" + yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" + #else + yield sourceFilePath + baselineSuffix + ".il.net472.release.bsl" + yield sourceFilePath + baselineSuffix + ".il.net472.bsl" + #endif + yield sourceFilePath + baselineSuffix + ".il.release.bsl" + yield sourceFilePath + baselineSuffix + ".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 + baselineSuffix + ".il.bsl" + + let fsOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".err")) + let ilOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".il")) + let fsBslSource = readFileOrDefault fsBslFilePath + let ilBslSource = readFileOrDefault ilBslFilePath + + { Source = SourceCodeFileKind.Create(sourceFilePath) + AdditionalSources = [] + Baseline = + Some + { + SourceFilename = Some sourceFilePath + FSBaseline = { FilePath = fsOutFilePath; BslSource = fsBslFilePath; Content = fsBslSource } + ILBaseline = { FilePath = ilOutFilePath; BslSource = ilBslFilePath; Content = ilBslSource } + } + Options = Compiler.defaultOptions + OutputType = Library + Name = Some filename + IgnoreWarnings = false + References = [] + OutputDirectory = Some (DirectoryInfo(outputDirectoryPath)) + TargetFramework = TargetFramework.Current + StaticLink = false + } |> FS + + /// For all files specified in the specified directory, whose name can be found in includedFiles + /// create a compilation with all baselines correctly when set + let createCompilationUnitForFiles baselineSuffix directoryPath includedFiles = + + if not (Directory.Exists(directoryPath)) then + failwith (sprintf "Directory does not exist: \"%s\"." directoryPath) + + let allFiles : string[] = Directory.GetFiles(directoryPath, "*.fs") + + let filteredFiles = + match includedFiles |> Array.map (fun f -> normalizePathSeparator (directoryPath ++ f)) with + | [||] -> allFiles + | incl -> incl + + let fsFiles = filteredFiles |> Array.map Path.GetFileName + + if fsFiles |> Array.length < 1 then + failwith (sprintf "No required files found in \"%s\".\nAll files: %A.\nIncludes:%A." directoryPath allFiles includedFiles) + + for f in filteredFiles do + if not <| FileSystem.FileExistsShim(f) then + failwithf "Requested file \"%s\" not found.\nAll files: %A.\nIncludes:%A." f allFiles includedFiles + + let results = + fsFiles + |> Array.map (fun fs -> (createCompilationUnit baselineSuffix directoryPath fs) :> obj) + |> Seq.map (fun c -> [| c |]) + + results + let getTestOutputDirectory dir testCaseName extraDirectory = // 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. @@ -401,17 +501,22 @@ module rec Compiler = let CSharpFromPath (path: string) : CompilationUnit = csFromString (SourceFromPath path) |> CS - let asFsx (cUnit: CompilationUnit) : CompilationUnit = - match cUnit with - | 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 { Source = SourceCodeFileKind.Fsi _} -> cUnit | 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 asFsi (cUnit: CompilationUnit) : CompilationUnit = + match cUnit with + | FS src -> FS {src with Source=SourceCodeFileKind.Fsi({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} + | _ -> failwith "Only F# compilation can be of type Fsi." + + let asFsx (cUnit: CompilationUnit) : CompilationUnit = + match cUnit with + | 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 withName (name: string) (cUnit: CompilationUnit) : CompilationUnit = match cUnit with | FS src -> FS { src with Name = Some name } @@ -537,6 +642,10 @@ module rec Compiler = let withOptimize (cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper [ "--optimize+" ] "withOptimize is only supported for F#" cUnit + let withOptimization (optimization: bool) (cUnit: CompilationUnit) : CompilationUnit = + let option = if optimization then "--optimize+" else "--optimize-" + withOptionsHelper [ option ] "withOptimization is only supported for F#" cUnit + let withFullPdb(cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper [ "--debug:full" ] "withFullPdb is only supported for F#" cUnit @@ -1795,10 +1904,10 @@ Actual: let printSignatures cUnit = printSignaturesImpl None cUnit let printSignaturesWith pageWidth cUnit = printSignaturesImpl (Some pageWidth) cUnit - let getImpliedSignatureHash cUnit = let tcResults = cUnit |> typecheckResults let hash = tcResults.CalculateSignatureHash() match hash with | Some h -> h | None -> failwith "Implied signature hash returned 'None' which should not happen" + diff --git a/tests/FSharp.Test.Utilities/DirectoryAttribute.fs b/tests/FSharp.Test.Utilities/DirectoryAttribute.fs index 91e95ab1628..f641ea870d4 100644 --- a/tests/FSharp.Test.Utilities/DirectoryAttribute.fs +++ b/tests/FSharp.Test.Utilities/DirectoryAttribute.fs @@ -18,104 +18,16 @@ open TestFramework [] type DirectoryAttribute(dir: string) = inherit DataAttribute() - do - if String.IsNullOrWhiteSpace(dir) then + do if String.IsNullOrWhiteSpace(dir) then invalidArg "dir" "Directory cannot be null, empty or whitespace only." - let dirInfo = normalizePathSeparator (Path.GetFullPath(dir)) + let directoryPath = normalizePathSeparator (Path.GetFullPath(dir)) let mutable baselineSuffix = "" let mutable includes = Array.empty - let readFileOrDefault (path: string) : string option = - match FileSystem.FileExistsShim(path) with - | true -> Some (File.ReadAllText path) - | _ -> None - - let createCompilationUnit path (filename: string) = - let outputDirectoryPath = createTemporaryDirectory().FullName - let sourceFilePath = normalizePathSeparator (path ++ filename) - let fsBslFilePath = sourceFilePath + baselineSuffix + ".err.bsl" - let ilBslFilePath = - let ilBslPaths = [| -#if DEBUG - #if NETCOREAPP - yield sourceFilePath + baselineSuffix + ".il.netcore.debug.bsl" - yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" - #else - yield sourceFilePath + baselineSuffix + ".il.net472.debug.bsl" - yield sourceFilePath + baselineSuffix + ".il.net472.bsl" - #endif - yield sourceFilePath + baselineSuffix + ".il.debug.bsl" - yield sourceFilePath + baselineSuffix + ".il.bsl" -#else - #if NETCOREAPP - yield sourceFilePath + baselineSuffix + ".il.netcore.release.bsl" - yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" - #else - yield sourceFilePath + baselineSuffix + ".il.net472.release.bsl" - yield sourceFilePath + baselineSuffix + ".il.net472.bsl" - #endif - yield sourceFilePath + baselineSuffix + ".il.release.bsl" - yield sourceFilePath + baselineSuffix + ".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 + baselineSuffix + ".il.bsl" - - let fsOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".err")) - let ilOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".il")) - let fsBslSource = readFileOrDefault fsBslFilePath - let ilBslSource = readFileOrDefault ilBslFilePath - - { Source = SourceCodeFileKind.Create(sourceFilePath) - AdditionalSources = [] - Baseline = - Some - { - SourceFilename = Some sourceFilePath - FSBaseline = { FilePath = fsOutFilePath; BslSource = fsBslFilePath; Content = fsBslSource } - ILBaseline = { FilePath = ilOutFilePath; BslSource = ilBslFilePath; Content = ilBslSource } - } - Options = Compiler.defaultOptions - OutputType = Library - Name = Some filename - IgnoreWarnings = false - References = [] - OutputDirectory = Some (DirectoryInfo(outputDirectoryPath)) - TargetFramework = TargetFramework.Current - StaticLink = false - } |> FS - new([] dirs: string[]) = DirectoryAttribute(Path.Combine(dirs) : string) member _.BaselineSuffix with get() = baselineSuffix and set v = baselineSuffix <- v member _.Includes with get() = includes and set v = includes <- v - override _.GetData _ = - if not (Directory.Exists(dirInfo)) then - failwith (sprintf "Directory does not exist: \"%s\"." dirInfo) - - let allFiles : string[] = Directory.GetFiles(dirInfo, "*.fs") - - let filteredFiles = - match includes |> Array.map (fun f -> normalizePathSeparator (dirInfo ++ f)) with - | [||] -> allFiles - | incl -> incl - - let fsFiles = filteredFiles |> Array.map Path.GetFileName - - if fsFiles |> Array.length < 1 then - failwith (sprintf "No required files found in \"%s\".\nAll files: %A.\nIncludes:%A." dirInfo allFiles includes) - - for f in filteredFiles do - if not <| FileSystem.FileExistsShim(f) then - failwithf "Requested file \"%s\" not found.\nAll files: %A.\nIncludes:%A." f allFiles includes - - fsFiles - |> Array.map (fun fs -> createCompilationUnit dirInfo fs) - |> Seq.map (fun c -> [| c |]) + override _.GetData _ = createCompilationUnitForFiles baselineSuffix directoryPath includes diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index e16ac79fc6a..1e3fd1b84c9 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -11,7 +11,7 @@ false false false - $(OtherFlags) --warnon:1182 + $(OtherFlags) --warnon:1182 --realsig- true XUNIT_EXTRAS @@ -43,6 +43,7 @@ + diff --git a/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs b/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs new file mode 100644 index 00000000000..f38a12ebd5a --- /dev/null +++ b/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs @@ -0,0 +1,163 @@ +namespace FSharp.Test + +open System +open System.Diagnostics +open System.Linq +open System.IO +open System.Reflection +open System.Runtime.CompilerServices +open System.Runtime.InteropServices + +open Xunit +open Xunit.Abstractions +open Xunit.Sdk + +open FSharp.Compiler.IO +open FSharp.Test.Compiler +open FSharp.Test.Utilities +open TestFramework + +//[] +//module Extensions = +// let getCompilation (compilation: CompilationHelper): CompilationUnit = +// let c = unbox compilation +// c.Value + +type BooleanOptions = + | True = 1 + | False = 2 + | Both = 3 + | None = 0 + +/// Attribute to use with Xunit's TheoryAttribute. +/// Takes a file, relative to current test suite's root. +/// Returns a CompilationUnit with encapsulated source code, error baseline and IL baseline (if any). +[] +type FileInlineData(filename: string, realsig: BooleanOptions option, optimize: BooleanOptions option, []directory: string) = + inherit DataAttribute() + + let mutable directory: string = directory + let mutable filename: string = filename + let mutable optimize: BooleanOptions option = optimize + let mutable realsig: BooleanOptions option = realsig + + static let computeBoolValues opt = + match opt with + | Some BooleanOptions.True -> [|Some true|] + | Some BooleanOptions.False -> [|Some false|] + | Some BooleanOptions.Both -> [|Some true; Some false|] + | _ -> [|None|] + + static let convertToBoxed opt = + match opt with + | None -> null + | Some opt -> box opt + + new (filename: string, []directory: string) = FileInlineData(filename, None, None, directory) + + member _.Directory with set v = directory <- v + + member _.Optimize with set v = optimize <- Some v + + member _.Realsig with set v = realsig <- Some v + + override _.GetData _ = + + let getOptions realsig optimize = + + let compilationHelper = CompilationHelper(filename, directory, convertToBoxed realsig, convertToBoxed optimize) + [| box (compilationHelper) |] + + let results = + let rsValues = computeBoolValues realsig + let optValues = computeBoolValues optimize + [| + for r in rsValues do + for o in optValues do + getOptions r o + |] + + results + +// realsig and optimized are boxed so null = not set, true or false = set +and [] + CompilationHelper internal (filename: obj, directory: obj, realsig: obj, optimize: obj) = + + let mutable filename = filename + let mutable directory = directory + let mutable realsig = realsig + let mutable optimize = optimize + + let setRealInternalSignature compilation = + match realsig with + | null -> compilation + | realsig -> compilation |> withRealInternalSignature (unbox realsig) + + let setOptimization compilation = + match optimize with + | null -> compilation + | optimize -> compilation |> withOptimization (unbox optimize) + + static let getBaseline (opt: obj) prefix = + match opt with + | :? bool as b when b = true -> Some $"{prefix}On" + | :? bool as b when b = false -> Some $"{prefix}Off" + | _ -> None + + static let combineBaselines realsigBsl optimizeBsl = + match realsigBsl, optimizeBsl with + | Some rs, Some opt -> Some $"{rs}{opt}" + | Some rs, None -> Some $"{rs}" + | None, Some opt -> Some $"{opt}" + | _ -> None + + new() = CompilationHelper(null, null, null, null) + + static member getCompilation(helper: CompilationHelper) : CompilationUnit = + helper.Value () + + member private _.Value(): CompilationUnit = + let directoryPath = + let path = string directory + if File.Exists(path) then + Path.GetDirectoryName(path) + else + path + + let fileName = + if not (isNull filename) then + string filename + else + "" + + let realsigBsl = (getBaseline realsig ".RealInternalSignature") + let optimizeBsl = (getBaseline optimize ".Optimize") + let baselineSuffix = Option.defaultValue "" (combineBaselines realsigBsl optimizeBsl) + let compilation = createCompilationUnit baselineSuffix directoryPath fileName + + compilation |> setRealInternalSignature |> setOptimization + + override _.ToString(): string = + let file = $"File: {filename}" + let realsig = + match realsig with + | :? bool as b -> $" realsig: {b}" + | _ -> "" + let optimize = + match optimize with + | :? bool as b -> $" optimize: {b}" + | _ -> "" + file + realsig + optimize + + interface IXunitSerializable with + member _.Serialize(info: IXunitSerializationInfo) = + info.AddValue("filename", filename) + info.AddValue("directory", directory) + info.AddValue("realsig", realsig) + info.AddValue("optimize", optimize) + + member _.Deserialize(info: IXunitSerializationInfo) = + filename <- info.GetValue("filename") + directory <- info.GetValue("directory") + realsig <- info.GetValue("realsig") + optimize <- info.GetValue("optimize") diff --git a/tests/FSharp.Test.Utilities/ProjectGeneration.fs b/tests/FSharp.Test.Utilities/ProjectGeneration.fs index fc110ded6b6..1734e3240a7 100644 --- a/tests/FSharp.Test.Utilities/ProjectGeneration.fs +++ b/tests/FSharp.Test.Utilities/ProjectGeneration.fs @@ -1023,9 +1023,7 @@ type ProjectWorkflowBuilder member this.DeleteProjectDir() = if Directory.Exists initialProject.ProjectDir then - try - Directory.Delete(initialProject.ProjectDir, true) - with _ -> () + try Directory.Delete(initialProject.ProjectDir, true) with _ -> () member this.Execute(workflow: Async) = try From 73b8cbb16dfc197c484673043e5d5bda0ee1665b Mon Sep 17 00:00:00 2001 From: progressive-galib <125106402+progressive-galib@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:06:31 +0600 Subject: [PATCH 03/21] src/Compiler/TypedTree/TypedTreePickle.fs and refactored. (#18203) --- docs/release-notes/.FSharp.Compiler.Service/9.0.200.md | 1 + src/Compiler/TypedTree/TypedTreePickle.fs | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md index 8bfd9d8155b..b9046b9f446 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md @@ -52,6 +52,7 @@ * Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag ([PR #17871](https://github.com/dotnet/fsharp/pull/17871)) * CheckAndThrow can be invoked only from within Cancellable context ([PR #18037](https://github.com/dotnet/fsharp/pull/18037)) * Make ILTypeDef base type calculation lazy. ([PR #18005](https://github.com/dotnet/fsharp/pull/18005)) +* "#if" directive around nullness removed from src/Compiler/TypedTree/TypedTreePickle.fs and refactored. ([PR #18203](https://github.com/dotnet/fsharp/pull/18203)) ### Breaking Changes diff --git a/src/Compiler/TypedTree/TypedTreePickle.fs b/src/Compiler/TypedTree/TypedTreePickle.fs index 9515d49b80d..3ce2e68396d 100644 --- a/src/Compiler/TypedTree/TypedTreePickle.fs +++ b/src/Compiler/TypedTree/TypedTreePickle.fs @@ -67,11 +67,7 @@ type PickledDataWithReferences<'rawData> = //--------------------------------------------------------------------------- [] -#if NO_CHECKNULLS -type Table<'T> = -#else type Table<'T when 'T: not null> = -#endif { name: string tbl: Dictionary<'T, int> mutable rows: ResizeArray<'T> From a310d1dae55fd87bae9f9d41d583f972d025ed94 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Wed, 8 Jan 2025 04:10:42 -0800 Subject: [PATCH 04/21] Improve directory attribute refactor - Break up PR #18161 - Part 2 (#18196) * More tests - directory attribute improvements * methordresolution --- .../CompilerOptions/fsc/checked/checked.fs | 119 +-- .../CompilerOptions/fsc/codepage/codepage.fs | 47 +- .../fsc/noframework/noframework.fs | 5 +- .../CompilerOptions/fsc/platform/platform.fs | 47 +- .../CompilerOptions/fsc/times/times.fs | 18 +- .../CompilerOptions/fsc/warn/warn.fs | 47 +- .../CompilerOptions/fsc/warnon/warnon.fs | 8 +- .../BasicGrammarElements/MethodResolution.fs | 485 ------------- .../MethodResolution/MethodResolution.fs | 133 ++++ .../OptionalAndOutParameters.fs | 9 + ...ameters.fs.RealInternalSignatureOff.il.bsl | 182 +++++ ...rameters.fs.RealInternalSignatureOn.il.bsl | 201 +++++ .../BasicApplication/BasicApplication.fs | 9 +- .../BindingExpressions/BindingExpressions.fs | 45 +- .../PatternMatching/PatternMatching.fs | 9 +- .../SequenceIteration/SequenceIteration.fs | 3 +- .../Type-relatedExpressions.fs | 15 +- .../Attributes/Diags/Attributes_Diags.fs | 6 +- .../Attributes/Legacy/Attributes_Legacy.fs | 84 ++- .../Attributes/New/Attributes_New.fs | 84 ++- .../Basic/Basic.fs | 63 +- .../IComparison/IComparison.fs | 12 +- .../ByrefSafetyAnalysis.fs | 284 +++++--- .../RecursiveSafetyAnalysis.fs | 30 +- .../LexicalFiltering/HashLight/HashLight.fs | 3 +- .../HighPrecedenceApplication.fs | 3 +- .../OffsideExceptions/OffsideExceptions.fs | 15 +- .../Conformance/PatternMatching/And/And.fs | 15 +- .../PatternMatching/Array/Array.fs | 12 +- .../Conformance/PatternMatching/As/As.fs | 6 +- .../PatternMatching/ConsList/ConsList.fs | 12 +- .../PatternMatching/Decimal/Decimal.fs | 3 +- .../DynamicTypeTest/DynamicTypeTest.fs | 81 ++- .../PatternMatching/Expression/Expression.fs | 51 +- .../PatternMatching/Named/Named.fs | 205 +++--- .../Conformance/PatternMatching/Null/Null.fs | 6 +- .../PatternMatching/Record/Record.fs | 27 +- .../PatternMatching/Simple/Simple.fs | 145 ++-- .../SimpleConstant/SimpleConstant.fs | 63 +- .../PatternMatching/Wildcard/Wildcard.fs | 3 +- .../PseudoCustomAttributes.fs | 26 +- .../Types/RecordTypes/RecordTypes.fs | 144 ++-- .../Types/StructTypes/StructTypes.fs | 12 +- .../CheckingSyntacticTypes.fs | 6 +- .../IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs | 5 +- .../LogicalPropertiesOfTypes.fs | 3 +- .../Types/UnionTypes/UnionTypes.fs | 183 +++-- .../ConstraintSolver/PrimitiveConstraints.fs | 5 +- .../UnionCasePatternMatchingErrors.fs | 334 ++++----- .../FSharp.Compiler.ComponentTests.fsproj | 2 +- .../Globalization/GlobalizationTestCases.fs | 25 +- .../SequenceExpressionTests.fs | 687 +++++++++--------- .../Miscellaneous/ListLiterals.fs | 8 +- .../OCamlCompat/OCamlCompat.fs | 42 +- 54 files changed, 2350 insertions(+), 1727 deletions(-) delete mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/MethodResolution.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs index 4e4902c63d3..8a0447a450e 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs @@ -9,71 +9,79 @@ open Xunit module Checked = // SOURCE=unchecked01.fs # fsc-default - [] - let ``fsc-unchecked - unchecked01_fs`` compilation = - compilation + [] + let ``fsc-unchecked - unchecked01_fs`` compilation = + compilation + |> getCompilation |> asFs |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked" # fsc-checked - [] - let ``fsc-unchecked - unchecked01_fs --checked`` compilation = - compilation + [] + let ``fsc-unchecked - unchecked01_fs --checked`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked+" # fsc-checked+ - [] - let ``fsc-unchecked - unchecked01_fs --checked+`` compilation = - compilation + [] + let ``fsc-unchecked - unchecked01_fs --checked+`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked+"] |> compile |> shouldSucceed // SOURCE=unchecked01.fs SCFLAGS="--checked-" # fsc-checked- - [] - let ``fsc-unchecked - unchecked01_fs --checked-`` compilation = - compilation + [] + let ``fsc-unchecked - unchecked01_fs --checked-`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked-"] |> compile |> shouldSucceed // SOURCE=unchecked01.fs SCFLAGS="--checked-" # fsc-checked- - [] - let ``fsi-unchecked - unchecked01_fs --checked-`` compilation = - compilation + [] + let ``fsi-unchecked - unchecked01_fs --checked-`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked-"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked - [] - let ``fsi-checked - checked01_fs --checked`` compilation = - compilation + [] + let ``fsi-checked - checked01_fs --checked`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked+" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked+ - [] - let ``fsi-checked - checked01_fs --checked+`` compilation = - compilation + [] + let ``fsi-checked - checked01_fs --checked+`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked+"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked-" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked+ - [] - let ``fsi-checked - checked01_fs --checked-`` compilation = - compilation + [] + let ``fsi-checked - checked01_fs --checked-`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked-"] |> compile @@ -83,54 +91,60 @@ module Checked = //# Last one wins // SOURCE=checked01.fs SCFLAGS="--checked --checked+" # fsc-checkedchecked+ - [] - let ``fsc-checked - checked01_fs --checked --checked+`` compilation = - compilation + [] + let ``fsc-checked - checked01_fs --checked --checked+`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked"; "--checked+"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked- --checked+" # fsc-checked-checked+ - [] - let ``fsc-checked - checked01_fs --checked- --checked+`` compilation = - compilation + [] + let ``fsc-checked - checked01_fs --checked- --checked+`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked-"; "--checked+"] |> compile |> shouldSucceed // SOURCE=unchecked01.fs SCFLAGS="--checked+ --checked-" # fsc-checked+checked- - [] - let ``fsc-checked - unchecked01_fs --checked+ --checked-`` compilation = - compilation + [] + let ``fsc-checked - unchecked01_fs --checked+ --checked-`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked+"; "--checked-"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked --checked+" # fsc-checkedchecked+ - [] - let ``fsi-checked - checked01_fs --checked --checked+`` compilation = - compilation + [] + let ``fsi-checked - checked01_fs --checked --checked+`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked"; "--checked+"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked- --checked+" # fsc-checked-checked+ - [] - let ``fsi-checked - checked01_fs --checked- --checked+`` compilation = - compilation + [] + let ``fsi-checked - checked01_fs --checked- --checked+`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked-"; "--checked+"] |> compile |> shouldSucceed // SOURCE=unchecked01.fs SCFLAGS="--checked+ --checked-" # fsc-checked+checked- - [] - let ``fsi-checked - unchecked01_fs --checked+ --checked-`` compilation = - compilation + [] + let ``fsi-checked - unchecked01_fs --checked+ --checked-`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked+"; "--checked-"] |> compile @@ -138,9 +152,10 @@ module Checked = //# Unrecognized argument // SOURCE=unrecogarg.fs SCFLAGS="--Checked" # fsc--Checked - [] - let ``fsc-checked - unchecked01_fs Checked`` compilation = - compilation + [] + let ``fsc-checked - unchecked01_fs Checked`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--Checked"] |> compile @@ -150,9 +165,10 @@ module Checked = ] // SOURCE=unrecogarg.fs SCFLAGS="--checked*" # fsc--checked* - [] - let ``fsc-checked - unchecked01_fs --checked-star`` compilation = - compilation + [] + let ``fsc-checked - unchecked01_fs --checked-star`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked*"] |> compile @@ -162,9 +178,10 @@ module Checked = ] // SOURCE=unrecogarg.fs SCFLAGS="--checked*" # fsc--checked* - [] - let ``fsc-checked - UncheckedDefaultOf01`` compilation = - compilation + [] + let ``fsc-checked - UncheckedDefaultOf01`` compilation = + compilation + |> getCompilation |> asFs |> asExe |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/codepage/codepage.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/codepage/codepage.fs index 536083be938..6321b99fd07 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/codepage/codepage.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/codepage/codepage.fs @@ -8,22 +8,22 @@ open FSharp.Test.Compiler open System open System.IO -module codepage = +module Codepage = let libCodepage1250 = - FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) + FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) |> withCodepage "1250" |> withName "libCodepage1250" |> asLibrary let libCodepage1251 = - FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) + FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) |> withCodepage "1251" |> withName "libCodepage1251" |> asLibrary let secondLibCodepage1250 = - FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) + FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) |> withCodepage "1250" |> withName "secondLibCodepage1250" |> asLibrary @@ -31,9 +31,10 @@ module codepage = #if NETFRAMEWORK - [] + [] let ``Reference assembly compiled with same codepages`` compilation = compilation + |> getCompilation |> asExe |> withReferences [ libCodepage1250; secondLibCodepage1250 ] |> compile @@ -42,9 +43,10 @@ module codepage = (Error 39, Line 11, Col 13, Line 11, Col 14, "The value, constructor, namespace or type 'б' is not defined.") ] - [] + [] let ``Reference assembly compiled with different codepages`` compilation = compilation + |> getCompilation |> asExe |> withReferences [ libCodepage1250; libCodepage1251 ] |> compileAndRun @@ -53,9 +55,10 @@ module codepage = //# Boundary case // SOURCE=E_NoDataForEncoding65535.fs SCFLAGS="--codepage:65535" # E_NoDataForEncoding65535.fs - [] + [] let ``Reference assembly compiled with no data for codepage`` compilation = compilation + |> getCompilation |> withCodepage "65535" |> asExe |> compile @@ -66,9 +69,10 @@ module codepage = //# Boundary case // SOURCE=Zero.fs SCFLAGS="--codepage:0x0" # Zero.fs - [] + [] let ``Reference assembly compiled with zero for codepage`` compilation = compilation + |> getCompilation |> withNoWarn 52 |> withCodepage "0x0" |> asExe @@ -78,9 +82,10 @@ module codepage = //# Negative cases // SOURCE=E_OutOfRangeArgument01.fs SCFLAGS="--codepage:65536" # E_OutOfRangeArgument01.fs - [] + [] let ``OutOfRangeArgument01_fs`` compilation = compilation + |> getCompilation |> asExe |> withCodepage "65536" |> compile @@ -95,9 +100,10 @@ Parameter name: codepage") ] // SOURCE=E_OutOfRangeArgument01.fs SCFLAGS="--codepage:65536" FSIMODE=EXEC # E_OutOfRangeArgument01.fs-fsi - [] + [] let ``E_OutOfRangeArgument01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withCodepage "65536" |> compile @@ -112,9 +118,10 @@ Parameter name: codepage") ] // SOURCE=E_NegativeArgument01.fs SCFLAGS="--codepage:-1" # E_NegativeArgument01.fs - [] + [] let ``E_NegativeArgument01_fs`` compilation = compilation + |> getCompilation |> asExe |> withCodepage "-1" |> compile @@ -129,9 +136,10 @@ Parameter name: codepage") ] // SOURCE=E_NegativeArgument01.fs SCFLAGS="--codepage:-1" FSIMODE=EXEC # E_NegativeArgument01.fs-fsi - [] + [] let ``E_NegativeArgument01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withCodepage "-1" |> compile @@ -146,9 +154,10 @@ Parameter name: codepage") ] // SOURCE=E_NotAValidInteger01.fs SCFLAGS="--codepage:invalidinteger" # E_NotAValidInteger01.fs - [] + [] let ``E_NotAValidInteger01_fs`` compilation = compilation + |> getCompilation |> asExe |> withCodepage "invalidinteger" |> compile @@ -158,9 +167,10 @@ Parameter name: codepage") ] // SOURCE=E_NotAValidInteger01.fs SCFLAGS="--codepage:invalidinteger" FSIMODE=EXEC # E_NotAValidInteger01.fs-fsi - [] + [] let ``E_NotAValidInteger01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withCodepage "invalidinteger" |> compile @@ -170,9 +180,10 @@ Parameter name: codepage") ] // SOURCE=E_RequiresParameter01.fs TAILFLAGS="--codepage" # E_RequiresParameter01.fs - [] + [] let ``E_RequiresParameter01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--codepage"] |> compile @@ -182,9 +193,10 @@ Parameter name: codepage") ] // SOURCE=E_RequiresParameter01.fs TAILFLAGS="--codepage" FSIMODE=EXEC # E_RequiresParameter01.fs-fsi - [] + [] let ``E_RequiresParameter01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--codepage"] |> compile @@ -194,9 +206,10 @@ Parameter name: codepage") ] // SOURCE=E_DefaultCodePage02.fsx COMPILE_ONLY=1 # E_DefaultCodePage02.fsx - [] + [] let ``libCodepage_fs`` compilation = compilation + |> getCompilation |> asLibrary |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs index 7847debd5a7..4b046928e9d 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs @@ -6,13 +6,14 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module noframework = +module Noframework = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/noframework) // - [] + [] let ``noframework - noframework02_fs - --noframework`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--noframework"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs index 9b320af3d8a..e52f293e8cf 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs @@ -6,13 +6,14 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module platform = +module Platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_16_fs - --target:library --platform:anycpu32bitpreferred`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--target:library"; "--platform:anycpu32bitpreferred"] |> compile @@ -23,9 +24,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_01_fs - --PLATFORM:anycpu`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--PLATFORM:anycpu"] |> compile @@ -36,9 +38,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_02_fs - --PlatForm:anycpu`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--PlatForm:anycpu"] |> compile @@ -49,9 +52,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_03_fs - --platform:ITANIUM`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:ITANIUM"] |> compile @@ -62,9 +66,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_04_fs - --platform:ANYCPU`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:ANYCPU"] |> compile @@ -75,9 +80,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_05_fs - --platform:X86`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:X86"] |> compile @@ -88,9 +94,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_06_fs - --platform:X64`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:X64"] |> compile @@ -101,9 +108,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_07_fs - --platform:IA64`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:IA64"] |> compile @@ -114,9 +122,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_08_fs - --platform:i386`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:i386"] |> compile @@ -127,9 +136,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_09_fs - --platform:AMD64`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:AMD64"] |> compile @@ -140,9 +150,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_10_fs - --platform:PPC`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:PPC"] |> compile @@ -153,9 +164,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_15_fs - --platform:ARM`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:ARM"] |> compile @@ -166,9 +178,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_11_fs - --platform-:anycpu`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform-:anycpu"] |> compile @@ -179,9 +192,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_12_fs - --PLATFORM+:anycpu`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--PLATFORM+:anycpu"] |> compile @@ -192,9 +206,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_13_fs - ---platform:anycpu`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["---platform:anycpu"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs index 7b137c24c15..6e4847ee498 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs @@ -10,13 +10,14 @@ open System.IO // reportTime uses global state. [] -module times = +module Times = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/times) - [] + [] let ``times - error_01_fs - --Times`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--Times"] |> typecheck @@ -27,9 +28,10 @@ module times = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/times) - [] + [] let ``times - error_02_fs - --times-`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--times-"] |> typecheck @@ -40,9 +42,10 @@ module times = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/times) - [] + [] let ``times - error_03_fs - --times+`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--times+"] |> typecheck @@ -51,9 +54,10 @@ module times = |> withDiagnosticMessageMatches "Unrecognized option: '--times\+'" |> ignore - [] + [] let ``times - to console`` compilation = compilation + |> getCompilation |> asFsx |> withBufferWidth 120 |> withOptions ["--times"] @@ -66,13 +70,15 @@ module times = "Duration"|] - [] + [] + [] let ``times - to csv file`` compilation = let tempPath = Path.Combine(Path.GetTempPath(),Guid.NewGuid().ToString() + ".csv") use _ = {new IDisposable with member this.Dispose() = File.Delete(tempPath) } compilation + |> getCompilation |> asFsx |> withOptions ["--times:"+tempPath] |> ignoreWarnings diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs index 9dd6dea0e91..153bff74a70 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs @@ -6,11 +6,12 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module TestCompilerWarningLevel = +module CompilerWarningLevel = - [] + [] let ``warn_level0_fs --warn:0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> asExe |> withOptions ["--warn:0"] @@ -18,41 +19,46 @@ module TestCompilerWarningLevel = |> shouldSucceed |> withDiagnostics [] - [] + [] let ``warn_level1_fs --warn:1 --warnaserror:52`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:1"; "--warnaserror:52"] |> compile |> shouldSucceed - [] + [] let ``warn_level2_fs --warn:2 --warnaserror:52`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:2"; "--warnaserror:52"] |> compile |> shouldSucceed - [] + [] let ``warn_level3_fs --warn:3 --warnaserror:52`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:3"; "--warnaserror:52"] |> compile |> shouldSucceed - [] + [] let ``warn_level4_fs --warn:4 --warnaserror:52`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:4"; "--warnaserror:52"] |> compile |> shouldSucceed - [] + [] let ``warn_level5_fs --warn:5 --warnaserror:52`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:5"; "--warnaserror:52"] |> compile @@ -61,9 +67,10 @@ module TestCompilerWarningLevel = |> withDiagnosticMessageMatches "The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed$" |> ignore - [] + [] let ``warn_level5_fs --warn:5`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:5"] |> compile @@ -74,9 +81,10 @@ module TestCompilerWarningLevel = #if NETSTANDARD // This test works with KeyValuePair, which is not a 'readonly struct' in net472 - [] + [] let ``no error 52 with readonly struct`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:5"; "--warnaserror:52"] |> compile @@ -84,9 +92,10 @@ module TestCompilerWarningLevel = |> ignore #endif - [] + [] let ``warn_level6_fs --warn:6`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:6"] |> compile @@ -95,18 +104,20 @@ module TestCompilerWarningLevel = |> withDiagnosticMessageMatches "Invalid warning level '6'" |> ignore - [] + [] let ``nowarn_fs --warnaserror`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror"] |> compileAndRun |> shouldSucceed |> ignore - [] + [] let ``warn40_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -117,9 +128,10 @@ module TestCompilerWarningLevel = ] |> ignore - [] + [] let ``warn40_fs --warnaserror`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror"] |> compile @@ -131,27 +143,30 @@ module TestCompilerWarningLevel = ] |> ignore - [] + [] let ``warn40_fs --nowarn:40;21`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:40;21"] |> compileAndRun |> shouldSucceed |> ignore - [] + [] let ``warn40_fs --nowarn:NU0000;FS40;NU0001`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:NU0000;FS40;NU0001;FS21"] |> compileAndRun |> shouldSucceed |> ignore - [] + [] let ``warn40_fs --nowarn:FS0040`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:FS0040"; "--nowarn:FS0021"] |> compileAndRun diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs index 130c7058c6f..c726ecbde87 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs @@ -6,13 +6,14 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module warnon = +module CompilerWarnOn = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/warnon) //The value 'n' is unused$ - [] + [] let ``warnon - warnon01_fs - --warnon:1182 --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnon:1182"; "--test:ErrorRanges"] |> compile @@ -23,9 +24,10 @@ module warnon = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/warnon) //The value 'n' is unused$ - [] + [] let ``warnon - warnon01_fs - --warnon:NU0001;FS1182;NU0001 --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnon:NU0001;FS1182;NU0001"; "--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution.fs deleted file mode 100644 index f6145c01abc..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution.fs +++ /dev/null @@ -1,485 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Conformance.BasicGrammarElements - -open Xunit -open FSharp.Test.Compiler - -module MethodResolution = - - [] - let ``Method with optional and out parameters resolves correctly (sanity test)`` () = - FSharp """ -open System.Runtime.InteropServices - -type Thing = - static member Do(o: outref, []i: int) = - o <- i - i = 7 - -// We expect return value to be false, and out value to be 42 here. -let returnvalue1, value1 = Thing.Do(i = 42) -// Have explicit boolean check for readability here: -if returnvalue1 <> false && value1 <> 42 then - failwith "Mismatch: Return value should be false, and out value should be 42" - -// Here, we expect return value to be true, and out value to be 7 -let returnvalue2, value2 = Thing.Do() -// Have explicit boolean check for readability here: -if returnvalue2<> true && value2 <> 7 then - failwith "Mismatch: Return value should be true, and out value should be 7" - """ - |> typecheck - |> shouldSucceed - |> ignore - - [] - let ``Method with optional and out parameters resolves correctly withRealInternalSignatureOff (verify IL)`` () = - FSharp """ -module OutOptionalTests -open System.Runtime.InteropServices - -type Thing = - static member Do(o: outref, []i: int) = - o <- i - i = 7 -let (_:bool), (_:int) = Thing.Do(i = 42) -let (_:bool), (_:int) = Thing.Do() - """ - |> ignoreWarnings - |> withRealInternalSignatureOff - |> compile - |> shouldSucceed - |> verifyIL [ - """ -.class public abstract auto ansi sealed OutOptionalTests -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 Thing - extends [runtime]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 static bool Do([out] int32& o, - [opt] int32 i) cil managed - { - .param [2] = int32(0x00000001) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stobj [runtime]System.Int32 - IL_0007: ldarg.1 - IL_0008: ldc.i4.7 - IL_0009: ceq - IL_000b: ret - } - - } - - .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::patternInput@9 - IL_0005: ret - } - - .method assembly specialname static int32 get_outArg@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$OutOptionalTests::outArg@9 - IL_0005: ret - } - - .method assembly specialname static void set_outArg@9(int32 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 ''.$OutOptionalTests::outArg@9 - IL_0006: ret - } - - .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@10-1'() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::'patternInput@10-1' - IL_0005: ret - } - - .method assembly specialname static int32 'get_outArg@10-1'() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$OutOptionalTests::'outArg@10-1' - IL_0005: ret - } - - .method assembly specialname static void 'set_outArg@10-1'(int32 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 ''.$OutOptionalTests::'outArg@10-1' - IL_0006: ret - } - - .property class [runtime]System.Tuple`2 - patternInput@9() - { - .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 [runtime]System.Tuple`2 OutOptionalTests::get_patternInput@9() - } - .property int32 outArg@9() - { - .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 ) - .set void OutOptionalTests::set_outArg@9(int32) - .get int32 OutOptionalTests::get_outArg@9() - } - .property class [runtime]System.Tuple`2 - 'patternInput@10-1'() - { - .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 [runtime]System.Tuple`2 OutOptionalTests::'get_patternInput@10-1'() - } - .property int32 'outArg@10-1'() - { - .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 ) - .set void OutOptionalTests::'set_outArg@10-1'(int32) - .get int32 OutOptionalTests::'get_outArg@10-1'() - } -} - """ - """ -.class private abstract auto ansi sealed ''.$OutOptionalTests -extends [runtime]System.Object -{ - .field static assembly initonly class [runtime]System.Tuple`2 patternInput@9 - .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 outArg@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly initonly class [runtime]System.Tuple`2 'patternInput@10-1' - .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 'outArg@10-1' - .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: ldc.i4.0 - IL_0001: stsfld int32 ''.$OutOptionalTests::outArg@9 - IL_0006: ldsflda int32 ''.$OutOptionalTests::outArg@9 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.s 42 - IL_000f: stobj [runtime]System.Int32 - IL_0014: ldc.i4.0 - IL_0015: call int32 OutOptionalTests::get_outArg@9() - IL_001a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_001f: stsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::patternInput@9 - IL_0024: ldc.i4.0 - IL_0025: stsfld int32 ''.$OutOptionalTests::'outArg@10-1' - IL_002a: ldsflda int32 ''.$OutOptionalTests::'outArg@10-1' - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: ldc.i4.1 - IL_0032: stobj [runtime]System.Int32 - IL_0037: ldc.i4.0 - IL_0038: call int32 OutOptionalTests::'get_outArg@10-1'() - IL_003d: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0042: stsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::'patternInput@10-1' - IL_0047: ret - } - -} - """] - - [] - let ``Method with optional and out parameters resolves correctly withRealInternalSignatureOn (verify IL)`` () = - FSharp """ -module OutOptionalTests -open System.Runtime.InteropServices - -type Thing = - static member Do(o: outref, []i: int) = - o <- i - i = 7 -let (_:bool), (_:int) = Thing.Do(i = 42) -let (_:bool), (_:int) = Thing.Do() - """ - |> ignoreWarnings - |> withRealInternalSignatureOn - |> compile - |> shouldSucceed - |> verifyIL [ - """ -.class public abstract auto ansi sealed OutOptionalTests - 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 Thing - extends [runtime]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 static bool Do([out] int32& o, - [opt] int32 i) cil managed - { - .param [2] = int32(0x00000001) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stobj [runtime]System.Int32 - IL_0007: ldarg.1 - IL_0008: ldc.i4.7 - IL_0009: ceq - IL_000b: ret - } - - } - - .field static assembly class [runtime]System.Tuple`2 patternInput@9 - .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 outArg@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [runtime]System.Tuple`2 'patternInput@10-1' - .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 'outArg@10-1' - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::patternInput@9 - IL_0005: ret - } - - .method assembly specialname static int32 get_outArg@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 OutOptionalTests::outArg@9 - IL_0005: ret - } - - .method assembly specialname static void set_outArg@9(int32 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 OutOptionalTests::outArg@9 - IL_0006: ret - } - - .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@10-1'() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::'patternInput@10-1' - IL_0005: ret - } - - .method assembly specialname static int32 'get_outArg@10-1'() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 OutOptionalTests::'outArg@10-1' - IL_0005: ret - } - - .method assembly specialname static void 'set_outArg@10-1'(int32 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 OutOptionalTests::'outArg@10-1' - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$OutOptionalTests::init@ - IL_0006: ldsfld int32 ''.$OutOptionalTests::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 4 - .locals init (int32& V_0) - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 OutOptionalTests::outArg@9 - IL_0006: ldsflda int32 OutOptionalTests::outArg@9 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.s 42 - IL_000f: stobj [runtime]System.Int32 - IL_0014: ldc.i4.0 - IL_0015: call int32 OutOptionalTests::get_outArg@9() - IL_001a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_001f: stsfld class [runtime]System.Tuple`2 OutOptionalTests::patternInput@9 - IL_0024: ldc.i4.0 - IL_0025: stsfld int32 OutOptionalTests::'outArg@10-1' - IL_002a: ldsflda int32 OutOptionalTests::'outArg@10-1' - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: ldc.i4.1 - IL_0032: stobj [runtime]System.Int32 - IL_0037: ldc.i4.0 - IL_0038: call int32 OutOptionalTests::'get_outArg@10-1'() - IL_003d: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0042: stsfld class [runtime]System.Tuple`2 OutOptionalTests::'patternInput@10-1' - IL_0047: ret - } - - .property class [runtime]System.Tuple`2 - patternInput@9() - { - .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 [runtime]System.Tuple`2 OutOptionalTests::get_patternInput@9() - } - .property int32 outArg@9() - { - .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 ) - .set void OutOptionalTests::set_outArg@9(int32) - .get int32 OutOptionalTests::get_outArg@9() - } - .property class [runtime]System.Tuple`2 - 'patternInput@10-1'() - { - .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 [runtime]System.Tuple`2 OutOptionalTests::'get_patternInput@10-1'() - } - .property int32 'outArg@10-1'() - { - .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 ) - .set void OutOptionalTests::'set_outArg@10-1'(int32) - .get int32 OutOptionalTests::'get_outArg@10-1'() - } -} - -.class private abstract auto ansi sealed ''.$OutOptionalTests - 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 8 - IL_0000: call void OutOptionalTests::staticInitialization@() - IL_0005: ret - } - -} - """] - - [] - let ``Method with optional and out parameters resolves correctly (examples from original issue: https://github.com/dotnet/fsharp/issues/12515)`` () = - Fsx """ -open System.Runtime.InteropServices; - -// Define a member with both outref and default parameters. The compiler's implicit outref handling can handle this -// if required and optional parameters are provided, but not if the default parameters are left out - -type Thing = - static member Do(x: int, - fast: outref, - think: outref, - [] - token: System.Threading.CancellationToken - ) : bool = - true - static member Also(x: int, - [] - token: System.Threading.CancellationToken, - fast: outref, - think: outref - ) : bool = true - -// Works, was error because we can't strip the default `token` parameter for some reason -let ok, fast, think = Thing.Do(1) - -// works because the outrefs are detected and provided by the compiler -let ok2, fast2, think2 = Thing.Do(1, token = System.Threading.CancellationToken.None) - -// Works, was error because we can't strip the default `token` parameter for some reason -let ok3, fast3, think3 = Thing.Also(1) - -// works because the outrefs are detected and provided by the compiler -let ok4, fast4, think4 = Thing.Also(1, token = System.Threading.CancellationToken.None) - -// works but requires a lot of work for the user -let mutable fast5 = Unchecked.defaultof -let mutable think5 = Unchecked.defaultof - -let ok5 = Thing.Do(1, &fast5, &think5) - """ - - [] - let ``Method with same optional and out parameter does not resolve`` () = - Fsx """ -open System.Runtime.InteropServices - -type Thing = - static member Do([]i: outref) = true -let _, _ = Thing.Do() - """ - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 501, Line 6, Col 12, Line 6, Col 22, "The member or object constructor 'Do' takes 1 argument(s) but is here given 0. The required signature is 'static member Thing.Do: [] i: outref -> bool'.") - ] - - [] - let ``optional and ParamArray parameter resolves correctly `` () = - Fsx """ -open System.Runtime.InteropServices - -type Thing = - static member Do( - [] something: string, - [] args: obj[]) = something, args - static member Do2( - [] something: string, - outvar: outref, - [] args: obj[]) = - - outvar <- 1 - something, args -let _, _ = Thing.Do() -let _, _ = Thing.Do("123") -let _, _ = Thing.Do("123", 1, 2, 3, 4) - -let _, _ = Thing.Do2() -let _, _ = Thing.Do2("123") -let _ = - let mutable x = 0 - Thing.Do2("123", &x) -let _ = - let mutable x = 0 - Thing.Do2("123", &x, 1, 2, 3, 4) - """ - |> typecheck - |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/MethodResolution.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/MethodResolution.fs new file mode 100644 index 00000000000..74713d082ac --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/MethodResolution.fs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.BasicGrammarElements + +open FSharp.Test +open FSharp.Test.Compiler +open Xunit + +module MethodResolution = + + [] + let ``Method with optional and out parameters resolves correctly (sanity test)`` () = + FSharp """ +open System.Runtime.InteropServices + +type Thing = + static member Do(o: outref, []i: int) = + o <- i + i = 7 + +// We expect return value to be false, and out value to be 42 here. +let returnvalue1, value1 = Thing.Do(i = 42) +// Have explicit boolean check for readability here: +if returnvalue1 <> false && value1 <> 42 then + failwith "Mismatch: Return value should be false, and out value should be 42" + +// Here, we expect return value to be true, and out value to be 7 +let returnvalue2, value2 = Thing.Do() +// Have explicit boolean check for readability here: +if returnvalue2<> true && value2 <> 7 then + failwith "Mismatch: Return value should be true, and out value should be 7" + """ + |> typecheck + |> shouldSucceed + |> ignore + + [] + let ``OptionalAndOutParameters_fs`` compilation = + compilation + |> getCompilation + |> ignoreWarnings + |> verifyILBaseline + + [] + let ``Method with optional and out parameters resolves correctly (examples from original issue: https://github.com/dotnet/fsharp/issues/12515)`` () = + Fsx """ +open System.Runtime.InteropServices; + +// Define a member with both outref and default parameters. The compiler's implicit outref handling can handle this +// if required and optional parameters are provided, but not if the default parameters are left out + +type Thing = + static member Do(x: int, + fast: outref, + think: outref, + [] + token: System.Threading.CancellationToken + ) : bool = + true + static member Also(x: int, + [] + token: System.Threading.CancellationToken, + fast: outref, + think: outref + ) : bool = true + +// Works, was error because we can't strip the default `token` parameter for some reason +let ok, fast, think = Thing.Do(1) + +// works because the outrefs are detected and provided by the compiler +let ok2, fast2, think2 = Thing.Do(1, token = System.Threading.CancellationToken.None) + +// Works, was error because we can't strip the default `token` parameter for some reason +let ok3, fast3, think3 = Thing.Also(1) + +// works because the outrefs are detected and provided by the compiler +let ok4, fast4, think4 = Thing.Also(1, token = System.Threading.CancellationToken.None) + +// works but requires a lot of work for the user +let mutable fast5 = Unchecked.defaultof +let mutable think5 = Unchecked.defaultof + +let ok5 = Thing.Do(1, &fast5, &think5) + """ + + [] + let ``Method with same optional and out parameter does not resolve`` () = + Fsx """ +open System.Runtime.InteropServices + +type Thing = + static member Do([]i: outref) = true +let _, _ = Thing.Do() + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 501, Line 6, Col 12, Line 6, Col 22, "The member or object constructor 'Do' takes 1 argument(s) but is here given 0. The required signature is 'static member Thing.Do: [] i: outref -> bool'.") + ] + + [] + let ``optional and ParamArray parameter resolves correctly `` () = + Fsx """ +open System.Runtime.InteropServices + +type Thing = + static member Do( + [] something: string, + [] args: obj[]) = something, args + static member Do2( + [] something: string, + outvar: outref, + [] args: obj[]) = + + outvar <- 1 + something, args +let _, _ = Thing.Do() +let _, _ = Thing.Do("123") +let _, _ = Thing.Do("123", 1, 2, 3, 4) + +let _, _ = Thing.Do2() +let _, _ = Thing.Do2("123") +let _ = + let mutable x = 0 + Thing.Do2("123", &x) +let _ = + let mutable x = 0 + Thing.Do2("123", &x, 1, 2, 3, 4) + """ + |> typecheck + |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs new file mode 100644 index 00000000000..29f58ce0db6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs @@ -0,0 +1,9 @@ +module OutOptionalTests +open System.Runtime.InteropServices + +type Thing = + static member Do(o: outref, []i: int) = + o <- i + i = 7 +let (_:bool), (_:int) = Thing.Do(i = 42) +let (_:bool), (_:int) = Thing.Do() diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl new file mode 100644 index 00000000000..ab736a3c457 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl @@ -0,0 +1,182 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.dll + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed OutOptionalTests + 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 Thing + extends [runtime]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 static bool Do([out] int32& o, + [opt] int32 i) cil managed + { + .param [2] = int32(0x00000001) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stobj [runtime]System.Int32 + IL_0007: ldarg.1 + IL_0008: ldc.i4.7 + IL_0009: ceq + IL_000b: ret + } + + } + + .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@8() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::patternInput@8 + IL_0005: ret + } + + .method assembly specialname static int32 get_outArg@8() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$OutOptionalTests::outArg@8 + IL_0005: ret + } + + .method assembly specialname static void set_outArg@8(int32 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::outArg@8 + IL_0006: ret + } + + .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@9-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::'patternInput@9-1' + IL_0005: ret + } + + .method assembly specialname static int32 'get_outArg@9-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$OutOptionalTests::'outArg@9-1' + IL_0005: ret + } + + .method assembly specialname static void 'set_outArg@9-1'(int32 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::'outArg@9-1' + IL_0006: ret + } + + .property class [runtime]System.Tuple`2 + patternInput@8() + { + .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 [runtime]System.Tuple`2 OutOptionalTests::get_patternInput@8() + } + .property int32 outArg@8() + { + .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 ) + .set void OutOptionalTests::set_outArg@8(int32) + .get int32 OutOptionalTests::get_outArg@8() + } + .property class [runtime]System.Tuple`2 + 'patternInput@9-1'() + { + .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 [runtime]System.Tuple`2 OutOptionalTests::'get_patternInput@9-1'() + } + .property int32 'outArg@9-1'() + { + .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 ) + .set void OutOptionalTests::'set_outArg@9-1'(int32) + .get int32 OutOptionalTests::'get_outArg@9-1'() + } +} + +.class private abstract auto ansi sealed ''.$OutOptionalTests + extends [runtime]System.Object +{ + .field static assembly initonly class [runtime]System.Tuple`2 patternInput@8 + .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 outArg@8 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly initonly class [runtime]System.Tuple`2 'patternInput@9-1' + .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 'outArg@9-1' + .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: ldc.i4.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::outArg@8 + IL_0006: ldsflda int32 ''.$OutOptionalTests::outArg@8 + IL_000b: stloc.0 + IL_000c: ldloc.0 + IL_000d: ldc.i4.s 42 + IL_000f: stobj [runtime]System.Int32 + IL_0014: ldc.i4.0 + IL_0015: call int32 OutOptionalTests::get_outArg@8() + IL_001a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_001f: stsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::patternInput@8 + IL_0024: ldc.i4.0 + IL_0025: stsfld int32 ''.$OutOptionalTests::'outArg@9-1' + IL_002a: ldsflda int32 ''.$OutOptionalTests::'outArg@9-1' + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: ldc.i4.1 + IL_0032: stobj [runtime]System.Int32 + IL_0037: ldc.i4.0 + IL_0038: call int32 OutOptionalTests::'get_outArg@9-1'() + IL_003d: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0042: stsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::'patternInput@9-1' + IL_0047: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl new file mode 100644 index 00000000000..6ef8ee296d3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl @@ -0,0 +1,201 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.dll + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed OutOptionalTests + 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 Thing + extends [runtime]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 static bool Do([out] int32& o, + [opt] int32 i) cil managed + { + .param [2] = int32(0x00000001) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stobj [runtime]System.Int32 + IL_0007: ldarg.1 + IL_0008: ldc.i4.7 + IL_0009: ceq + IL_000b: ret + } + + } + + .field static assembly class [runtime]System.Tuple`2 patternInput@8 + .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 outArg@8 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [runtime]System.Tuple`2 'patternInput@9-1' + .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 'outArg@9-1' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@8() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::patternInput@8 + IL_0005: ret + } + + .method assembly specialname static int32 get_outArg@8() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 OutOptionalTests::outArg@8 + IL_0005: ret + } + + .method assembly specialname static void set_outArg@8(int32 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld int32 OutOptionalTests::outArg@8 + IL_0006: ret + } + + .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@9-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::'patternInput@9-1' + IL_0005: ret + } + + .method assembly specialname static int32 'get_outArg@9-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 OutOptionalTests::'outArg@9-1' + IL_0005: ret + } + + .method assembly specialname static void 'set_outArg@9-1'(int32 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld int32 OutOptionalTests::'outArg@9-1' + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::init@ + IL_0006: ldsfld int32 ''.$OutOptionalTests::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 4 + .locals init (int32& V_0) + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 OutOptionalTests::outArg@8 + IL_0006: ldsflda int32 OutOptionalTests::outArg@8 + IL_000b: stloc.0 + IL_000c: ldloc.0 + IL_000d: ldc.i4.s 42 + IL_000f: stobj [runtime]System.Int32 + IL_0014: ldc.i4.0 + IL_0015: call int32 OutOptionalTests::get_outArg@8() + IL_001a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_001f: stsfld class [runtime]System.Tuple`2 OutOptionalTests::patternInput@8 + IL_0024: ldc.i4.0 + IL_0025: stsfld int32 OutOptionalTests::'outArg@9-1' + IL_002a: ldsflda int32 OutOptionalTests::'outArg@9-1' + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: ldc.i4.1 + IL_0032: stobj [runtime]System.Int32 + IL_0037: ldc.i4.0 + IL_0038: call int32 OutOptionalTests::'get_outArg@9-1'() + IL_003d: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0042: stsfld class [runtime]System.Tuple`2 OutOptionalTests::'patternInput@9-1' + IL_0047: ret + } + + .property class [runtime]System.Tuple`2 + patternInput@8() + { + .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 [runtime]System.Tuple`2 OutOptionalTests::get_patternInput@8() + } + .property int32 outArg@8() + { + .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 ) + .set void OutOptionalTests::set_outArg@8(int32) + .get int32 OutOptionalTests::get_outArg@8() + } + .property class [runtime]System.Tuple`2 + 'patternInput@9-1'() + { + .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 [runtime]System.Tuple`2 OutOptionalTests::'get_patternInput@9-1'() + } + .property int32 'outArg@9-1'() + { + .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 ) + .set void OutOptionalTests::'set_outArg@9-1'(int32) + .get int32 OutOptionalTests::'get_outArg@9-1'() + } +} + +.class private abstract auto ansi sealed ''.$OutOptionalTests + 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 8 + IL_0000: call void OutOptionalTests::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs index 21505f43355..0b6ac8b6347 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs @@ -10,9 +10,10 @@ module BasicApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) //Unexpected identifier in expression$ - [] + [] let ``E_PostfixType01_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -23,9 +24,10 @@ module BasicApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) //Unexpected identifier in member definition$ - [] + [] let ``E_PostfixType03_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -37,9 +39,10 @@ module BasicApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) // - [] + [] let ``PostfixType02_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/BindingExpressions/BindingExpressions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/BindingExpressions/BindingExpressions.fs index cf2f4a833cc..f3f3d9d9d34 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/BindingExpressions/BindingExpressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/BindingExpressions/BindingExpressions.fs @@ -22,9 +22,10 @@ module BindingExpressions = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) // SOURCE=AmbigLetBinding.fs # AmbigLetBinding - [] + [] let ``AmbigLetBinding_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -33,9 +34,10 @@ module BindingExpressions = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) // NoMT SOURCE=in01.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in01.fs - [] + [] let ``in01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -44,9 +46,10 @@ module BindingExpressions = ] // NoMT SOURCE=in01.fsx FSIMODE=PIPE SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in01.fsx - [] + [] let ``in01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -54,9 +57,10 @@ module BindingExpressions = ] // NoMT SOURCE=in02.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in02.fs - [] + [] let ``in02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -64,16 +68,18 @@ module BindingExpressions = ] // NoMT SOURCE=in02.fsx FSIMODE=PIPE SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in02.fsx - [] + [] let ``in02_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // NoMT SOURCE=in03.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in03.fs - [] + [] let ``in03_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -81,16 +87,18 @@ module BindingExpressions = ] // NoMT SOURCE=in03.fsx FSIMODE=PIPE SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in03.fsx - [] + [] let ``in03_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // NoMT SOURCE=in04.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in04.fs - [] + [] let ``in04_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -98,16 +106,18 @@ module BindingExpressions = ] // NoMT SOURCE=in04.fsx FSIMODE=PIPE SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in04.fsx - [] + [] let ``in04_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // NoMT SOURCE=in05.fs SCFLAGS="--warnaserror+ --test:ErrorRanges --flaterrors" COMPILE_ONLY=1 # in05.fs - [] + [] let ``in05_fs`` compilation = compilation + |> getCompilation |> verifyCompileAsExe |> shouldFail |> withDiagnostics [ @@ -116,9 +126,10 @@ module BindingExpressions = ] // NoMT SOURCE=in05.fsx FSIMODE=PIPE SCFLAGS="--warnaserror+ --test:ErrorRanges --flaterrors" COMPILE_ONLY=1 # in05.fsx - [] + [] let ``in05_fsx`` compilation = compilation + |> getCompilation |> withOptions ["--test:ErrorRanges"] |> compile |> shouldFail @@ -127,27 +138,30 @@ module BindingExpressions = ] // SOURCE=MutableLocals01.fs SCFLAGS="--warnon:3180 --optimize+ --test:ErrorRanges" - [] + [] let ``MutableLocals01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:3370"; "--test:ErrorRanges"] |> compileAndRun |> shouldSucceed // SOURCE=W_TypeInferforGenericType.fs SCFLAGS="--test:ErrorRanges" # W_TypeInferforGenericType.fs - [] + [] let ``W_TypeInferforGenericType_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ (Warning 64, Line 10, Col 32, Line 10, Col 33, "This construct causes code to be less generic than indicated by the type annotations. The type variable 'b has been constrained to be type ''a'.") ] - [] + [] let ``UpperBindingPattern_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -176,9 +190,10 @@ module BindingExpressions = (Warning 49, Line 122, Col 12, Line 122, Col 15, "Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name.") ] - [] + [] let ``UpperBindingPattern_fs preview`` compilation = compilation + |> getCompilation |> asExe |> withLangVersionPreview |> withOptions ["--test:ErrorRanges"] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs index 9f8b10bc05b..2f88587276e 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs @@ -10,9 +10,10 @@ module PatternMatching = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/PatternMatching) - [] + [] let ``W_PatternMatchingCounterExample01_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -23,9 +24,10 @@ module PatternMatching = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/PatternMatching) - [] + [] let ``W_PatternMatchingCounterExample02_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -36,9 +38,10 @@ module PatternMatching = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/PatternMatching) - [] + [] let ``W_PatternMatchingCounterExample03_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs index 478fcaebf2b..322ea5be52b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs @@ -10,9 +10,10 @@ module SequenceIteration = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/SequenceIteration) - [] + [] let ``W_IncompleteMatchFor01_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs index 40199c38d3a..b0e0d389b2f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module TyperelatedExpressions = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] + [] let ``E_rigidtypeannotation02_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldFail @@ -22,9 +23,10 @@ module TyperelatedExpressions = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] + [] let ``E_rigidtypeannotation02b_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldFail @@ -34,17 +36,19 @@ module TyperelatedExpressions = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] + [] let ``rigidtypeannotation01_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] + [] let ``staticcoercion01_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldFail @@ -56,9 +60,10 @@ module TyperelatedExpressions = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] + [] let ``staticcoercion01b_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Diags/Attributes_Diags.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Diags/Attributes_Diags.fs index 47e9d048841..644d6bdd757 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Diags/Attributes_Diags.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Diags/Attributes_Diags.fs @@ -10,9 +10,10 @@ open FSharp.Test.Compiler module Attributes_Diags = // SOURCE=E_AdjustUses01a.fs SCFLAGS=--test:ErrorRanges # E_AdjustUses01a.fs - [] + [] let``E_AdjustUses01a_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -21,9 +22,10 @@ module Attributes_Diags = ] // SOURCE=E_AdjustUses01b.fs SCFLAGS=--test:ErrorRanges # E_AdjustUses01b.fs - [] + [] let``E_AdjustUses01b_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Legacy/Attributes_Legacy.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Legacy/Attributes_Legacy.fs index 9f45c66a2ca..8af1481ceda 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Legacy/Attributes_Legacy.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Legacy/Attributes_Legacy.fs @@ -10,9 +10,10 @@ open FSharp.Test.Compiler module AttributesLegacy = // SOURCE=Test01.fs SCFLAGS="--test:ErrorRanges" # Test01.fs - [] + [] let``Test01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -23,9 +24,10 @@ module AttributesLegacy = ] // SOURCE=Test02.fs SCFLAGS="--test:ErrorRanges" # Test02.fs - [] + [] let``Test02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -36,9 +38,10 @@ module AttributesLegacy = ] // SOURCE=Test03.fs SCFLAGS="--test:ErrorRanges" # Test03.fs - [] + [] let``Test03_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -48,9 +51,10 @@ module AttributesLegacy = ] // SOURCE=Test04.fs SCFLAGS="--test:ErrorRanges" # Test04.fs - [] + [] let``Test04_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -61,9 +65,10 @@ module AttributesLegacy = ] // SOURCE=Test05.fs SCFLAGS="--test:ErrorRanges" # Test05.fs - [] + [] let``Test05_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -74,9 +79,10 @@ module AttributesLegacy = ] // SOURCE=Test06.fs SCFLAGS="--test:ErrorRanges" # Test06.fs - [] + [] let``Test06_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -86,9 +92,10 @@ module AttributesLegacy = ] // SOURCE=Test07.fs SCFLAGS="--test:ErrorRanges" # Test07.fs - [] + [] let``Test07_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -98,9 +105,10 @@ module AttributesLegacy = ] // SOURCE=Test08.fs SCFLAGS="--test:ErrorRanges" # Test08.fs - [] + [] let``Test08_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -110,9 +118,10 @@ module AttributesLegacy = ] // SOURCE=Test09.fs SCFLAGS="--test:ErrorRanges" # Test09.fs - [] + [] let``Test09_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -121,9 +130,10 @@ module AttributesLegacy = ] // SOURCE=Test10.fs SCFLAGS="--test:ErrorRanges" # Test10.fs - [] + [] let``Test10_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -134,9 +144,10 @@ module AttributesLegacy = ] // SOURCE=Test11.fs SCFLAGS="--test:ErrorRanges" # Test11.fs - [] + [] let``Test11_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -147,9 +158,10 @@ module AttributesLegacy = ] // SOURCE=Test12.fs SCFLAGS="--test:ErrorRanges" # Test12.fs - [] + [] let``Test12_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -159,9 +171,10 @@ module AttributesLegacy = ] // SOURCE=Test13.fs SCFLAGS="--test:ErrorRanges" # Test13.fs - [] + [] let``Test13_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -172,9 +185,10 @@ module AttributesLegacy = ] // SOURCE=Test14.fs SCFLAGS="--test:ErrorRanges" # Test14.fs - [] + [] let``Test14_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -185,9 +199,10 @@ module AttributesLegacy = ] // SOURCE=Test15.fs SCFLAGS="--test:ErrorRanges" # Test15.fs - [] + [] let``Test15_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -197,9 +212,10 @@ module AttributesLegacy = ] // SOURCE=Test16.fs SCFLAGS="--test:ErrorRanges" # Test16.fs - [] + [] let``Test16_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -209,9 +225,10 @@ module AttributesLegacy = ] // SOURCE=Test17.fs SCFLAGS="--test:ErrorRanges" # Test17.fs - [] + [] let``Test17_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -221,9 +238,10 @@ module AttributesLegacy = ] // SOURCE=Test18.fs SCFLAGS="--test:ErrorRanges" # Test18.fs - [] + [] let``Test18_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -232,9 +250,10 @@ module AttributesLegacy = ] // SOURCE=Test19.fs SCFLAGS="--test:ErrorRanges" # Test19.fs - [] + [] let``Test19_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -244,9 +263,10 @@ module AttributesLegacy = ] // SOURCE=Test20.fs SCFLAGS="--test:ErrorRanges" # Test20.fs - [] + [] let``Test20_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -256,9 +276,10 @@ module AttributesLegacy = ] // SOURCE=Test21.fs SCFLAGS="--test:ErrorRanges" # Test21.fs - [] + [] let``Test21_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -267,9 +288,10 @@ module AttributesLegacy = ] // SOURCE=Test22.fs SCFLAGS="--test:ErrorRanges" # Test22.fs - [] + [] let``Test22_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -279,9 +301,10 @@ module AttributesLegacy = ] // SOURCE=Test23.fs SCFLAGS="--test:ErrorRanges" # Test23.fs - [] + [] let``Test23_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -291,9 +314,10 @@ module AttributesLegacy = ] // SOURCE=Test24.fs SCFLAGS="--test:ErrorRanges" # Test24.fs - [] + [] let``Test24_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -302,9 +326,10 @@ module AttributesLegacy = ] // SOURCE=Test25.fs SCFLAGS="--test:ErrorRanges" # Test25.fs - [] + [] let``Test25_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -313,9 +338,10 @@ module AttributesLegacy = ] // SOURCE=Test26.fs SCFLAGS="--test:ErrorRanges" # Test26.fs - [] + [] let``Test26_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -324,18 +350,20 @@ module AttributesLegacy = ] // SOURCE=Test27.fs SCFLAGS="--test:ErrorRanges" # Test27.fs - [] + [] let``Test27_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--test:ErrorRanges"; "--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=Test28.fs SCFLAGS="--test:ErrorRanges" # Test28.fs - [] + [] let``Test28_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/New/Attributes_New.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/New/Attributes_New.fs index 8797695481d..c0941454ee2 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/New/Attributes_New.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/New/Attributes_New.fs @@ -10,9 +10,10 @@ open FSharp.Test.Compiler module AttributesNew = // SOURCE=Test01.fs SCFLAGS="--test:ErrorRanges" # Test01.fs - [] + [] let``Test01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -21,9 +22,10 @@ module AttributesNew = ] // SOURCE=Test02.fs SCFLAGS="--test:ErrorRanges" # Test02.fs - [] + [] let``Test02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -34,9 +36,10 @@ module AttributesNew = ] // SOURCE=Test03.fs SCFLAGS="--test:ErrorRanges" # Test03.fs - [] + [] let``Test03_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -45,9 +48,10 @@ module AttributesNew = ] // SOURCE=Test04.fs SCFLAGS="--test:ErrorRanges" # Test04.fs - [] + [] let``Test04_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -57,9 +61,10 @@ module AttributesNew = ] // SOURCE=Test05.fs SCFLAGS="--test:ErrorRanges" # Test05.fs - [] + [] let``Test05_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -70,9 +75,10 @@ module AttributesNew = ] // SOURCE=Test06.fs SCFLAGS="--test:ErrorRanges" # Test06.fs - [] + [] let``Test06_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -82,9 +88,10 @@ module AttributesNew = ] // SOURCE=Test07.fs SCFLAGS="--test:ErrorRanges" # Test07.fs - [] + [] let``Test07_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -93,9 +100,10 @@ module AttributesNew = ] // SOURCE=Test08.fs SCFLAGS="--test:ErrorRanges" # Test08.fs - [] + [] let``Test08_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -105,17 +113,19 @@ module AttributesNew = ] // SOURCE=Test09.fs SCFLAGS="--test:ErrorRanges" # Test09.fs - [] + [] let``Test09_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Test10.fs SCFLAGS="--test:ErrorRanges" # Test10.fs - [] + [] let``Test10_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -124,9 +134,10 @@ module AttributesNew = ] // SOURCE=Test11.fs SCFLAGS="--test:ErrorRanges" # Test11.fs - [] + [] let``Test11_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -137,9 +148,10 @@ module AttributesNew = ] // SOURCE=Test12.fs SCFLAGS="--test:ErrorRanges" # Test12.fs - [] + [] let``Test12_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -148,9 +160,10 @@ module AttributesNew = ] // SOURCE=Test13.fs SCFLAGS="--test:ErrorRanges" # Test13.fs - [] + [] let``Test13_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -159,9 +172,10 @@ module AttributesNew = ] // SOURCE=Test14.fs SCFLAGS="--test:ErrorRanges" # Test14.fs - [] + [] let``Test14_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -172,9 +186,10 @@ module AttributesNew = ] // SOURCE=Test15.fs SCFLAGS="--test:ErrorRanges" # Test15.fs - [] + [] let``Test15_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -183,9 +198,10 @@ module AttributesNew = ] // SOURCE=Test16.fs SCFLAGS="--test:ErrorRanges" # Test16.fs - [] + [] let``Test16_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -194,9 +210,10 @@ module AttributesNew = ] // SOURCE=Test17.fs SCFLAGS="--test:ErrorRanges" # Test17.fs - [] + [] let``Test17_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -208,25 +225,28 @@ module AttributesNew = ] // SOURCE=Test18.fs SCFLAGS="--test:ErrorRanges" # Test18.fs - [] + [] let``Test18_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Test19.fs SCFLAGS="--test:ErrorRanges" # Test19.fs - [] + [] let``Test19_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Test20.fs SCFLAGS="--test:ErrorRanges" # Test20.fs - [] + [] let``Test20_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -237,9 +257,10 @@ module AttributesNew = ] // SOURCE=Test21.fs SCFLAGS="--test:ErrorRanges" # Test21.fs - [] + [] let``Test21_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -248,9 +269,10 @@ module AttributesNew = ] // SOURCE=Test22.fs SCFLAGS="--test:ErrorRanges" # Test22.fs - [] + [] let``Test22_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -259,9 +281,10 @@ module AttributesNew = ] // SOURCE=Test23.fs SCFLAGS="--test:ErrorRanges" # Test23.fs - [] + [] let``Test23_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -272,9 +295,10 @@ module AttributesNew = ] // SOURCE=Test24.fs SCFLAGS="--test:ErrorRanges" # Test24.fs - [] + [] let``Test24_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -283,9 +307,10 @@ module AttributesNew = ] // SOURCE=Test25.fs SCFLAGS="--test:ErrorRanges" # Test25.fs - [] + [] let``Test25_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -294,9 +319,10 @@ module AttributesNew = ] // SOURCE=Test26.fs SCFLAGS="--test:ErrorRanges" # Test26.fs - [] + [] let``Test26_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -307,18 +333,20 @@ module AttributesNew = ] // SOURCE=Test27.fs SCFLAGS="--test:ErrorRanges" # Test27.fs - [] + [] let``Test27_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--test:ErrorRanges"; "--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=Test28.fs SCFLAGS="--test:ErrorRanges" # Test28.fs - [] + [] let``Test28_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Basic/Basic.fs index c3a239e07f0..03d9d4035ce 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Basic/Basic.fs @@ -10,25 +10,28 @@ open FSharp.Test.Compiler module Basic = // SOURCE=Arrays.fsx # Arrays.fsx - [] + [] let``Arrays_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Comparison01.fs # Comparison01.fs - [] + [] let``Comparison01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=CustomEquality01.fs # CustomEquality01.fs - [] + [] let``CustomEquality01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -36,9 +39,10 @@ module Basic = (Warning 988, Line 37, Col 1, Line 37, Col 1, "Main module of program is empty: nothing will happen when it is run") ] - [] + [] let``E_CustomEqualityEquals01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -52,9 +56,10 @@ module Basic = ] // SOURCE=E_CustomEqualityGetHashCode01.fs SCFLAGS="--test:ErrorRanges" # E_CustomEqualityGetHashCode01.fs - [] + [] let``E_CustomEqualityGetHashCode01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -71,9 +76,10 @@ module Basic = ] // SOURCE=E_ExceptionsNoComparison.fs SCFLAGS="--test:ErrorRanges" # E_ExceptionsNoComparison.fs - [] + [] let``E_ExceptionsNoComparison_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -84,122 +90,137 @@ module Basic = // SOURCE=EqualOnTuples01.fs # EqualOnTuples01.fs - [] + [] let``EqualOnTuples01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Equality01.fs # Equality01.fs - [] + [] let``Equality01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Exceptions.fsx # Exceptions.fsx - [] + [] let``Exceptions_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Generated_Record.fsx # Generated_Record.fsx - [] + [] let``Generated_Record_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Hashing01.fs # Hashing01.fs - [] + [] let``Hashing01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Lists.fsx # Lists.fsx - [] + [] let``Lists_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=NeverGenerated_Class.fsx # NeverGenerated_Class.fsx - [] + [] let``NeverGenerated_Class_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=NeverGenerated_Delegate.fsx # NeverGenerated_Delegate.fsx - [] + [] let``NeverGenerated_Delegate_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=NeverGenerated_Enum.fsx # NeverGenerated_Enum.fsx - [] + [] let``NeverGenerated_Enum_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=NeverGenerated_Interface.fsx # NeverGenerated_Interface.fsx - [] + [] let``NeverGenerated_Interface_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Options.fsx # Options.fsx - [] + [] let``Options_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Sample_Records.fsx # Sample_Records.fsx - [] + [] let``Sample_Records_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Sample_Tuples.fsx # Sample_Tuples.fsx - [] + [] let``Sample_Tuples_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Structs.fsx # Structs.fsx - [] + [] let``Structs_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Unions.fsx # Unions.fsx - [] + [] let``Unions_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/IComparison/IComparison.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/IComparison/IComparison.fs index f35a1720fe3..7ceb03c3881 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/IComparison/IComparison.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/IComparison/IComparison.fs @@ -9,36 +9,40 @@ open FSharp.Test.Compiler module IComparison = // SOURCE=DU.fs # DU.fs - [] + [] let``DU_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:342"] |> compileAndRun |> shouldSucceed // SOURCE=Record.fs # Record.fs - [] + [] let``Record_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:342"] |> compileAndRun |> shouldSucceed // SOURCE=Struct.fs # Struct.fs - [] + [] let``Struct_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:342"] |> compileAndRun |> shouldSucceed // SOURCE=W_ImplIComparable.fs # W_ImplIComparable.fs - [] + [] let``W_ImplIComparable_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs index 073111d8504..533369961e0 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs @@ -30,14 +30,17 @@ module ByrefSafetyAnalysis = |> compileAndRun // SOURCE=Migrated02.fs SCFLAGS="--test:ErrorRanges" # Migrated02.fs - [] + [] let``MigratedTest02_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - + compilation + |> getCompilation + |> verifyCompileAndRun |> shouldSucceed + // SOURCE=E_Migrated02.fs SCFLAGS="--test:ErrorRanges" # E_Migrated02.fs - [] + [] let``E_Migrated02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -108,26 +111,28 @@ module ByrefSafetyAnalysis = ] // SOURCE=Migrated03.fs SCFLAGS="--test:ErrorRanges" # Migrated03.fs - [] + [] let``MigratedTest03_fs`` compilation = let csharpLib = CSharpFromPath (__SOURCE_DIRECTORY__ ++ "MigratedTest03CSharpLib.cs") |> withName "CSharpLib3" compilation + |> getCompilation |> withReferences [ csharpLib ] |> withOptions ["--nowarn:3370"] |> compileExeAndRun |> shouldSucceed // SOURCE=E_Migrated03.fs SCFLAGS="--test:ErrorRanges" # E_Migrated03.fs - [] + [] let``E_Migrated03_fs`` compilation = let csharpLib = CSharpFromPath (__SOURCE_DIRECTORY__ ++ "MigratedTest03CSharpLib.cs") |> withName "CSharpLib3" compilation + |> getCompilation |> asExe |> withReferences [ csharpLib ] |> withNoWarn 52 @@ -149,94 +154,155 @@ The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In'") (Error 3239, Line 46, Col 17, Line 46, Col 25, "Cannot partially apply the extension method 'Test2' because the first parameter is a byref type.") ] - [] + [] let``TryGetValue_fs`` compilation = - compilation |> withPrelude |> compileExeAndRun |> shouldSucceed + compilation + |> getCompilation + |> withPrelude |> compileExeAndRun |> shouldSucceed - [] + [] let``CompareExchange_fs`` compilation = compilation + |> getCompilation |> withPrelude |> withOptions ["--nowarn:3370"] |> compileExeAndRun |> shouldSucceed - [] + [] let``ByRefParam_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun |> shouldSucceed + + [] let``ByRefParam_ExplicitOutAttribute_fs`` compilation = - compilation |> withPrelude |> withOptions ["--nowarn:3370"] |> compileExeAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> withPrelude + |> withOptions ["--nowarn:3370"] |> compileExeAndRun |> shouldSucceed + + [] let``ByRefParam_ExplicitInAttribute_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun |> shouldSucceed + + [] let``ByRefReturn_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``Slot_ByRefReturn_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefReturn_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``Slot_InRefReturn_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``OutRefParam_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``OutRefParam_ExplicitOutAttribute_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``Slot_OutRefParam_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``ByRefParam_OverloadedTest_ExplicitOutAttribute_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``OutRefParam_Overloaded_ExplicitOutAttribute_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``OutRefParam_Overloaded_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParam_ExplicitInAttribute_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParam_ExplicitInAttributeDateTime_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParam`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParamOverload_ExplicitAddressOfAtCallSite`` compilation = - compilation |> withNoWarn 52 |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParamOverload_ImplicitAddressOfAtCallSite`` compilation = - compilation |> withNoWarn 52 |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParamOverload_ImplicitAddressOfAtCallSite2`` compilation = - compilation |> withNoWarn 52 |> verifyCompileAndRun |> shouldSucceed - + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompileAndRun + |> shouldSucceed + // TODO: Delete this, move into feature branch, or finish this. See: https://github.com/dotnet/fsharp/pull/7989#discussion_r369841104 #if IMPLICIT_ADDRESS_OF module FeatureImplicitAddressOf = @@ -262,14 +328,20 @@ The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In'") compilation |> verifyCompileAndRun |> shouldSucceed #endif - [] + [] let``InRefParam_Generic_ExplicitAddressOfAttCallSite1`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParam_Generic_ExplicitAddressOfAttCallSite2`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + module ByrefReturn = [] let``TestImmediateReturn`` compilation = @@ -492,13 +564,18 @@ The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In'") let``TestStructRecord`` compilation = compilation |> withNoWarn 988 |> withNoWarn 3560 |> verifyCompileAndRun |> shouldSucceed - [] + [] let``NoTailcallToByrefsWithModReq`` compilation = - compilation |> withNoWarn 20 |> verifyCompileAndRun |> shouldSucceed + compilation + |> getCompilation + |> withNoWarn 20 + |> verifyCompileAndRun + |> shouldSucceed - [] + [] let``E_CantTakeAddressOfExpressionReturningReferenceType`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -722,9 +799,10 @@ type outref<'T> with // SOURCE=E_ByrefAsArrayElement.fs SCFLAGS="--test:ErrorRanges" # E_ByrefAsArrayElement.fs - [] + [] let``E_ByrefAsArrayElement_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -736,9 +814,10 @@ type outref<'T> with ] // SOURCE=E_ByrefAsGenericArgument01.fs SCFLAGS="--test:ErrorRanges" # E_ByrefAsGenericArgument01.fs - [] + [] let``E_ByrefAsGenericArgument01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -749,18 +828,20 @@ type outref<'T> with ] // NoMT SOURCE=ByrefInFSI1.fsx FSIMODE=PIPE COMPILE_ONLY=1 # ByrefInFSI1.fsx - [] + [] let``ByrefInFSI1_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=E_ByrefUsedInInnerLambda01.fs SCFLAGS="--test:ErrorRanges" # E_ByrefUsedInInnerLambda01.fs - [] + [] let``E_ByrefUsedInInnerLambda01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -769,9 +850,10 @@ type outref<'T> with ] // SOURCE=E_ByrefUsedInInnerLambda02.fs SCFLAGS="--test:ErrorRanges" # E_ByrefUsedInInnerLambda02.fs - [] + [] let``E_ByrefUsedInInnerLambda02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -780,9 +862,10 @@ type outref<'T> with ] // SOURCE=E_ByrefUsedInInnerLambda03.fs SCFLAGS="--test:ErrorRanges" # E_ByrefUsedInInnerLambda03.fs - [] + [] let``E_ByrefUsedInInnerLambda03_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -791,9 +874,10 @@ type outref<'T> with ] // SOURCE=E_SetFieldToByref01.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref01.fs - [] + [] let``E_SetFieldToByref01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -804,9 +888,10 @@ type outref<'T> with ] // SOURCE=E_SetFieldToByref02.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref02.fs - [] + [] let``E_SetFieldToByref02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -814,9 +899,10 @@ type outref<'T> with (Error 431, Line 8, Col 9, Line 8, Col 17, "A byref typed value would be stored here. Top-level let-bound byref values are not permitted.") ] // SOURCE=E_SetFieldToByref03.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref03.fs - [] + [] let``E_SetFieldToByref03_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -827,9 +913,10 @@ type outref<'T> with ] // SOURCE=E_SetFieldToByref04.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref04.fs - [] + [] let``E_SetFieldToByref04_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -840,9 +927,10 @@ type outref<'T> with ] // SOURCE=E_SetFieldToByref05.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref05.fs - [] + [] let``E_SetFieldToByref05_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -854,9 +942,10 @@ type outref<'T> with ] // SOURCE=E_FirstClassFuncTakesByref.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_FirstClassFuncTakesByref.fs - [] + [] let``E_FirstClassFuncTakesByref_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -865,9 +954,10 @@ type outref<'T> with ] // SOURCE=E_StaticallyResolvedByRef01.fs SCFLAGS="--test:ErrorRanges" # E_StaticallyResolvedByRef01.fs - [] + [] let``E_StaticallyResolvedByRef01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -880,9 +970,10 @@ type outref<'T> with ] // SOURCE=UseByrefInLambda01.fs # UseByrefInLambda01.fs - [] + [] let``UseByrefInLambda01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun @@ -890,17 +981,19 @@ type outref<'T> with #if NET7_0_OR_GREATER // This constructor added in .NET 7: https://learn.microsoft.com/en-us/dotnet/api/system.span-1.-ctor?view=net-7.0#system-span-1-ctor(-0@) - [] + [] let``ReturnFieldSetBySpan_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed - [] + [] let``ReturnSpan01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun @@ -908,9 +1001,10 @@ type outref<'T> with #endif #if NETSTANDARD2_1_OR_GREATER - [] + [] let``E_TopLevelByref_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -918,9 +1012,10 @@ type outref<'T> with (Error 431, Line 6, Col 5, Line 6, Col 13, "A byref typed value would be stored here. Top-level let-bound byref values are not permitted.") ] - [] + [] let``E_SpanUsedInInnerLambda01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -928,9 +1023,10 @@ type outref<'T> with (Error 406, Line 8, Col 34, Line 8, Col 45, "The byref-typed variable 'span' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions.") ] - [] + [] let``E_SpanUsedInInnerLambda02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs index 52bf8601869..ecc99ef26e7 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs @@ -15,9 +15,10 @@ module RecursiveSafetyAnalysis = |> compileExeAndRun // SOURCE=E_CyclicReference01.fs SCFLAGS="--mlcompatibility --test:ErrorRanges --flaterrors" # E_CyclicReference01.fs - [] + [] let ``E_CyclicReference01_fs`` compilation = compilation + |> getCompilation |> withOptions ["--mlcompatibility"; "--flaterrors"] |> withLangVersion50 |> asExe @@ -29,9 +30,10 @@ module RecursiveSafetyAnalysis = ] // SOURCE=E_DuplicateRecursiveRecords.fs SCFLAGS="--test:ErrorRanges" # E_DuplicateRecursiveRecords.fs - [] + [] let``E_DuplicateRecursiveRecords_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -39,9 +41,10 @@ module RecursiveSafetyAnalysis = (Error 37, Line 10, Col 5, Line 10, Col 8, "Duplicate definition of type, exception or module 'Foo'") ] - [] + [] let ``E_RecursiveInline_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -53,9 +56,10 @@ module RecursiveSafetyAnalysis = ] // SOURCE=E_TypeDeclaration01.fs SCFLAGS="--langversion:5.0 --test:ErrorRanges" COMPILE_ONLY=1 # E_TypeDeclaration01.fs - [] + [] let ``E_TypeDeclaration01`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -64,9 +68,10 @@ module RecursiveSafetyAnalysis = ] //Type constraint mismatch - [] + [] let ``E_TypeDeclaration02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -78,9 +83,10 @@ module RecursiveSafetyAnalysis = ] // SOURCE=E_VariationsOnRecursiveStruct.fs SCFLAGS="--test:ErrorRanges" # E_VariationsOnRecursiveStruct.fs - [] + [] let ``E_VariationsOnRecursiveStruct_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -89,35 +95,39 @@ module RecursiveSafetyAnalysis = (Error 912, Line 6, Col 6, Line 6, Col 8, "This declaration element is not permitted in an augmentation") ] - [] + [] let ``InfiniteRecursiveExplicitConstructor_fs`` compilation = compilation + |> getCompilation |> asFsx |> compile |> shouldSucceed // SOURCE=RecursiveTypeDeclarations01.fs # RecursiveTypeDeclarations01.fs - [] + [] let ``RecursiveTypeDeclarations01_fs`` compilation = compilation + |> getCompilation |> asExe |> ignoreWarnings |> compile |> shouldSucceed // SOURCE=RecursiveValueDeclarations01.fs # RecursiveValueDeclarations01.fs - [] + [] let ``RecursiveValueDeclarations01_fs`` compilation = compilation + |> getCompilation |> asExe |> ignoreWarnings |> compile |> shouldSucceed // SOURCE=RecursiveTypeDeclarations02.fs # RecursiveTypeDeclarations02.fs - [] + [] let ``RecursiveTypeDeclarations02_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:3370"] |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs index 8602b1e5633..a52b3d380c2 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module HashLight = // This test was automatically generated (moved from FSharpQA suite - Conformance/LexicalFiltering/HashLight) - [] + [] let ``IndentationWithComputationExpression01_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs index 5665bbcd675..4ec5b1b53d1 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs @@ -10,9 +10,10 @@ module HighPrecedenceApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/LexicalFiltering/HighPrecedenceApplication) // - [] + [] let ``RangeOperator01_fs`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["-a"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs index dee88a3c5fa..2be0b9897db 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs @@ -9,23 +9,22 @@ open FSharp.Test.Compiler.Assertions.StructuredResultsAsserts module OffsideExceptions = - type FileAttribute(file) = - inherit DirectoryAttribute(__SOURCE_DIRECTORY__, Includes=[|file|]) - // This test was automatically generated (moved from FSharpQA suite - Conformance/LexicalFiltering/Basic/OffsideExceptions) // - [] + [] let InfixTokenPlusOne compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldSucceed |> shouldSucceed |> ignore - [] + [] let RelaxWhitespace2 compilation = compilation + |> getCompilation |> asFsx |> withLangVersion60 |> withOptions ["--nowarn:25"] // Incomplete pattern matches on this expression. @@ -33,9 +32,10 @@ module OffsideExceptions = |> shouldSucceed |> ignore - [] + [] let RelaxWhitespace2_Warning25 compilation = compilation + |> getCompilation |> asFsx |> withLangVersion60 |> verifyBaseline @@ -488,9 +488,10 @@ raise (new Exception("exit 1")) Message = "Unexpected end of input in type definition" } ] |> ignore - [] + [] let RelaxWhitespace2_Fs50 compilation = compilation + |> getCompilation |> asFsx |> withLangVersion50 |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/And/And.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/And/And.fs index 7f46ad02250..b92c1e57c29 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/And/And.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/And/And.fs @@ -8,43 +8,48 @@ open FSharp.Test.Compiler module And = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/And) - [] + [] let ``And - andPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/And) - [] + [] let ``And - andPattern02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/And) - [] + [] let ``And - andPattern03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - [] + [] let ``And - andPattern04_fs`` compilation = compilation + |> getCompilation |> asFs |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/And) - [] + [] let ``And - E_IdentBoundTwice_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Array/Array.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Array/Array.fs index 5d686020f22..190b12d316d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Array/Array.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Array/Array.fs @@ -8,36 +8,40 @@ open FSharp.Test.Compiler module Array = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Array) - [] + [] let ``Array - arrayMatch01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Array) - [] + [] let ``Array - arrayMatch02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Array) - [] + [] let ``Array - arrayMatch03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Array) - [] + [] let ``Array - TrailingSemi01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/As/As.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/As/As.fs index 81867fed44a..b4074b0b2cf 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/As/As.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/As/As.fs @@ -8,18 +8,20 @@ open FSharp.Test.Compiler module As = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/As) - [] + [] let ``Simple - asPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/As) - [] + [] let ``Simple - asPattern02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/ConsList/ConsList.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/ConsList/ConsList.fs index d0f92838187..6292d3b78fa 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/ConsList/ConsList.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/ConsList/ConsList.fs @@ -8,18 +8,20 @@ open FSharp.Test.Compiler module ConsList = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/ConsList) - [] + [] let ``ConsList - consPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/ConsList) - [] + [] let ``ConsList - E_consOnNonList_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -36,9 +38,10 @@ but here has type ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/ConsList) - [] + [] let ``ConsList - E_consPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -49,9 +52,10 @@ but here has type ''a list' ") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/ConsList) - [] + [] let ``ConsList - OutsideMatch01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Decimal/Decimal.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Decimal/Decimal.fs index 1f168db110f..9f51d0f9747 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Decimal/Decimal.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Decimal/Decimal.fs @@ -8,9 +8,10 @@ open FSharp.Test.Compiler module Decimal = - [] + [] let ``Decimal - literal01.fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/DynamicTypeTest/DynamicTypeTest.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/DynamicTypeTest/DynamicTypeTest.fs index 358471ba5e5..79fa9270343 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/DynamicTypeTest/DynamicTypeTest.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/DynamicTypeTest/DynamicTypeTest.fs @@ -8,27 +8,30 @@ open FSharp.Test.Compiler module DynamicTypeTest = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - consPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - dynamicTypeTest01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - dynamicTypeTest02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -37,49 +40,54 @@ module DynamicTypeTest = (Warning 26, Line 31, Col 7, Line 31, Col 17, "This rule will never be matched") (Warning 26, Line 32, Col 7, Line 32, Col 16, "This rule will never be matched") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - dynamicTypeTest03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - dynamicTypeTest04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 64, Line 8, Col 7, Line 8, Col 11, "This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near 'dynamicTypeTest04.fs(8,9)-(8,10)' has been constrained to be type 'exn'.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - dynTestSealedType01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - E_DynamicTestPrimType01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Error 16, Line 11, Col 7, Line 11, Col 15, "The type 'int' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - E_DynamTyTestVarType01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -89,47 +97,52 @@ module DynamicTypeTest = to obj involves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - genericType01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - Regression01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - Regression02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - TwoAtOnce01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - W_RedundantPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -138,20 +151,22 @@ involves an indeterminate type based on information prior to this program point. (Warning 26, Line 12, Col 7, Line 12, Col 16, "This rule will never be matched") (Warning 26, Line 18, Col 7, Line 18, Col 16, "This rule will never be matched") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - W_TypeTestWillAlwaysHold01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 67, Line 13, Col 7, Line 13, Col 13, "This type test or downcast will always hold")// This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - - [] + + [] let ``DynamicTypeTest - E_DynamicTest01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -159,10 +174,11 @@ involves an indeterminate type based on information prior to this program point. |> withDiagnostics [ (Warning 26, Line 3, Col 3, Line 3, Col 54, "This rule will never be matched") ] - - [] + + [] let ``DynamicTypeTest - E_DynamicTest02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -170,10 +186,11 @@ involves an indeterminate type based on information prior to this program point. |> withDiagnostics [ (Warning 26, Line 4, Col 7, Line 4, Col 11, "This rule will never be matched") ] - - [] + + [] let ``DynamicTypeTest - E_DynamicTest03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Expression/Expression.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Expression/Expression.fs index 2c82340ad76..fc9ed2de733 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Expression/Expression.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Expression/Expression.fs @@ -8,37 +8,41 @@ open FSharp.Test.Compiler module Expression = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - E_CounterExample01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 25, Line 7, Col 11, Line 7, Col 12, "Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s).") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - NoCounterExampleTryWith01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - patterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - patterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -48,11 +52,12 @@ module Expression = (Warning 25, Line 7, Col 24, Line 7, Col 25, "Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s).") (Warning 25, Line 8, Col 35, Line 8, Col 36, "Incomplete pattern matches on this expression.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - W_CounterExampleWithEnum01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -65,11 +70,12 @@ module Expression = (Warning 25, Line 30, Col 10, Line 30, Col 18, "Incomplete pattern matches on this expression. For example, the value '[_;_;_]' may indicate a case not covered by the pattern(s).") (Warning 25, Line 34, Col 10, Line 34, Col 18, "Incomplete pattern matches on this expression. For example, the value '[|_; 1|]' may indicate a case not covered by the pattern(s).") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - W_CounterExampleWithEnum02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -82,11 +88,12 @@ module Expression = (Warning 25, Line 27, Col 10, Line 27, Col 18, "Incomplete pattern matches on this expression. For example, the value 'T.Y' may indicate a case not covered by the pattern(s).") (Warning 25, Line 30, Col 10, Line 30, Col 18, "Incomplete pattern matches on this expression. For example, the value 'T.Y' may indicate a case not covered by the pattern(s).") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - W_whenGuards01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -94,38 +101,42 @@ module Expression = |> withDiagnostics [ (Warning 25, Line 11, Col 9, Line 11, Col 10, "Incomplete pattern matches on this expression. For example, the value '1' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - whenGuards01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - whenGuards02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - whenGuardss01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - whenGuardss02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs index 8f7d5a12362..c1bfa90f03d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs @@ -8,96 +8,107 @@ open FSharp.Test.Compiler module Named = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - ActivePatternOutsideMatch01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - ActivePatternOutsideMatch02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns05_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns06_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns07_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns08_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - [] + [] let ``Named - activePatterns09_fs`` compilation = compilation + |> getCompilation |> asFs |> typecheck |> shouldSucceed - - [] + + [] let ``Named - activePatterns10_fs`` compilation = compilation + |> getCompilation |> asFs |> typecheck |> shouldFail @@ -113,66 +124,73 @@ module Named = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - ActivePatternUnconstrained01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> ignoreWarnings |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - AsHighOrderFunc01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - discUnion01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - _DiscUnion01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ActivePatternHasNoFields_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Error 3174, Line 10, Col 24, Line 10, Col 25, "Active patterns do not have fields. This syntax is invalid.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ActivePatternNotAFunction_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Error 1209, Line 5, Col 6, Line 5, Col 11, "Active pattern '|A|B|' is not a function") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ActivePatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -187,11 +205,12 @@ module Named = (Error 624, Line 17, Col 9, Line 17, Col 17, "The '|' character is not permitted in active pattern case identifiers") (Error 623, Line 18, Col 7, Line 18, Col 9, "Active pattern case identifiers must begin with an uppercase letter") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ActivePatterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -201,9 +220,10 @@ module Named = (Warning 20, Line 6, Col 1, Line 6, Col 38, "The result of this expression has type 'int' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'.") ] - [] + [] let ``Named - E_ActivePatterns03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -270,11 +290,12 @@ but here has type (Error 39, Line 34, Col 8, Line 34, Col 18, "The pattern discriminator 'FooB++' is not defined.") (Warning 25, Line 34, Col 7, Line 34, Col 22, "Incomplete pattern matches on this expression.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ActivePatternUnconstrained01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -286,9 +307,10 @@ but here has type ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_LetRec01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -297,11 +319,12 @@ but here has type 'Choice<'a,'b>' but here has type 'string' ") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_LetRec02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -313,12 +336,12 @@ but here has type but here has type 'string' ") ] - - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_LetRec03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -332,9 +355,10 @@ but here has type ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_LetRec04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -343,11 +367,12 @@ but here has type ''a option' but here has type 'string' ") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_NonParam01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -356,11 +381,12 @@ but here has type 'Choice<'a,'b>' but here has type 'string' ") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_NonParam02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -374,9 +400,10 @@ but here has type ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_NonParam03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -388,11 +415,12 @@ but here has type but here has type 'string' ") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_NonParam04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -401,11 +429,12 @@ but here has type ''a option' but here has type 'string' ") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_Param01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -414,11 +443,12 @@ but here has type 'Choice<'a,'b>' but here has type 'string' ") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_Param02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -430,11 +460,12 @@ but here has type but here has type 'string' ") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_Param03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -446,11 +477,12 @@ but here has type but here has type 'string' ") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_Param04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -461,11 +493,12 @@ but here has type but here has type 'string' ") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_LargeActivePat01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -474,11 +507,12 @@ but here has type (Error 265, Line 6, Col 6, Line 6, Col 47, "Active patterns cannot return more than 7 possibilities") (Error 265, Line 8, Col 6, Line 8, Col 23, "Active patterns cannot return more than 7 possibilities") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_MulticasePartialNotAllowed01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -488,21 +522,23 @@ but here has type (Error 3868, Line 22, Col 7, Line 22, Col 17, "This active pattern expects exactly one pattern argument, e.g., 'WhiteSpace pat'."); (Error 1107, Line 20, Col 7, Line 20, Col 21, "Partial active patterns may only generate one result") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ParameterRestrictions01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Error 722, Line 15, Col 23, Line 15, Col 34, "Only active patterns returning exactly one result may accept arguments") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_PatternMatchRegressions02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -512,57 +548,63 @@ but here has type (Warning 25, Line 30, Col 11, Line 30, Col 12, "Incomplete pattern matches on this expression.") (Error 1210, Line 22, Col 6, Line 22, Col 38, "Active pattern '|ClientExternalTypeUse|WillFail|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice = A x'") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - MultiActivePatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - NamedLiteral01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - NamedLiteral02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - ParameterizedPartialActivePattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - PatternMatchRegressions01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 25, Line 22, Col 11, Line 22, Col 12, "Incomplete pattern matches on this expression.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - PatternMatchRegressions02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -570,11 +612,12 @@ but here has type |> withDiagnostics [ (Warning 25, Line 20, Col 11, Line 20, Col 12, "Incomplete pattern matches on this expression.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - RecursiveActivePats_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Null/Null.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Null/Null.fs index 3faeae07f26..46fac3505cc 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Null/Null.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Null/Null.fs @@ -8,9 +8,10 @@ open FSharp.Test.Compiler module Null = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Null) - [] + [] let ``Null - E_notNullCompatible01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -18,9 +19,10 @@ module Null = |> withSingleDiagnostic (Error 43, Line 14, Col 7, Line 14, Col 11, "The type 'Foo' does not have 'null' as a proper value") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Null) - [] + [] let ``Null - matchNull01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Record/Record.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Record/Record.fs index a75f8910e5e..807025b3879 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Record/Record.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Record/Record.fs @@ -8,9 +8,10 @@ open FSharp.Test.Compiler module Record = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - E_RecordFieldNotDefined01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -19,11 +20,12 @@ module Record = (Error 39, Line 9, Col 13, Line 9, Col 14, "The record label 'X' is not defined.") (Error 39, Line 9, Col 20, Line 9, Col 21, "The record label 'Y' is not defined.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - E_RecTypesNotMatch01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -32,11 +34,12 @@ module Record = (Error 1129, Line 11, Col 13, Line 11, Col 14, "The record type 'R1' does not contain a label 'A'.") (Error 1129, Line 11, Col 20, Line 11, Col 21, "The record type 'R1' does not contain a label 'B'.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - E_SyntaxError01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -44,38 +47,42 @@ module Record = |> withDiagnostics [ (Error 10, Line 9, Col 14, Line 9, Col 15, "Unexpected symbol '}' in pattern. Expected '.', '=' or other token.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - recordPatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - recordPatterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - structRecordPatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - structRecordPatterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Simple/Simple.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Simple/Simple.fs index e161faded77..8b556d25cfa 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Simple/Simple.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Simple/Simple.fs @@ -9,10 +9,10 @@ open FSharp.Test.Compiler module Simple = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - - [] + [] let ``Simple - W_Incomplete01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -20,10 +20,10 @@ module Simple = |> withSingleDiagnostic (Warning 25, Line 92, Col 13, Line 92, Col 14, "Incomplete pattern matches on this expression. For example, the value 'Result (_)' may indicate a case not covered by the pattern(s).") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - - [] + [] let ``Simple - W_Incomplete02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -36,10 +36,10 @@ module Simple = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - - [] + [] let ``Simple - W_BindCapitalIdent_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -49,9 +49,10 @@ module Simple = (Warning 49, Line 10, Col 16, Line 10, Col 19, "Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name.") ] - [] + [] let ``Simple - W_BindCapitalIdent_fs preview - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> withLangVersionPreview |> asFsx |> withOptions ["--test:ErrorRanges"] @@ -63,48 +64,53 @@ module Simple = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - CodeGenReg01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - E_constPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldFail |> withSingleDiagnostic (Warning 104, Line 9, Col 11, Line 9, Col 14, "Enums may take values outside known cases. For example, the value 'enum (7)' may indicate a case not covered by the pattern(s).") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - E_namedLiberal01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldFail |> withSingleDiagnostic (Warning 104, Line 10, Col 11, Line 10, Col 14, "Enums may take values outside known cases. For example, the value 'enum (7)' may indicate a case not covered by the pattern(s).") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - E_SyntaxError01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldFail |> withSingleDiagnostic (Error 10, Line 8, Col 14, Line 8, Col 15, "Unexpected symbol'[' in pattern matching. Expected '->' or other token.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - E_ValueCapture01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -117,11 +123,12 @@ module Simple = int8 int") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - MatchFailureExn01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -130,101 +137,112 @@ module Simple = (Warning 25, Line 20, Col 28, Line 20, Col 29, "Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s).") (Warning 25, Line 24, Col 15, Line 24, Col 23, "Incomplete pattern matches on this expression.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns05_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns06_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns07_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns08_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns09_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns10_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns11_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -232,100 +250,111 @@ module Simple = |> withSingleDiagnostic (Warning 26, Line 10, Col 7, Line 10, Col 8, "This rule will never be matched") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns12_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns13_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns14_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns15_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns16_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns17_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldFail |> withSingleDiagnostic (Warning 25, Line 16, Col 13, Line 16, Col 17, "Incomplete pattern matches on this expression. For example, the value '``some-non-null-value``' may indicate a case not covered by the pattern(s).") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/AsPatterns) - [] + [] let ``Simple - simplePatterns18_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/AsPatterns) - [] + [] let ``Simple - simplePatterns19_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/AsPatterns) - [] + [] let ``Simple - simplePatterns20_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/AsPatterns) - [] + [] let ``Simple - ValueCapture01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/AsPatterns) - [] + [] let ``Simple - ValueCapture02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/SimpleConstant/SimpleConstant.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/SimpleConstant/SimpleConstant.fs index b2e120d025c..c9dca126573 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/SimpleConstant/SimpleConstant.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/SimpleConstant/SimpleConstant.fs @@ -8,18 +8,20 @@ open FSharp.Test.Compiler module SimpleConstant = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - DiffAssembly_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - E_NoRangeConst01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -27,9 +29,10 @@ module SimpleConstant = |> withSingleDiagnostic (Error 10, Line 9, Col 9, Line 9, Col 11, "Unexpected symbol '..' in pattern matching. Expected '->' or other token.") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - E_type_bigint_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -40,9 +43,10 @@ module SimpleConstant = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - E_type_bignum40_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -54,54 +58,60 @@ module SimpleConstant = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - FullyQualify01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - matchConst01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - matchConst02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - matchConst03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - matchConst04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - MatchLiteral01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -116,9 +126,10 @@ module SimpleConstant = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - MatchNaN_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -130,18 +141,20 @@ module SimpleConstant = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_bigint_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_bool_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -149,72 +162,80 @@ module SimpleConstant = |> withSingleDiagnostic (Warning 26, Line 10, Col 7, Line 10, Col 8, "This rule will never be matched") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_byte_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_byteArr_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_char_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_double_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_float32_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_int_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_int16_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_int64_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Wildcard/Wildcard.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Wildcard/Wildcard.fs index 2831e485b84..5bc1083de3b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Wildcard/Wildcard.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Wildcard/Wildcard.fs @@ -8,9 +8,10 @@ open FSharp.Test.Compiler module Wildcard = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Wildcard) - [] + [] let ``Wildcard - wildCardPatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs index f372668b108..356667c4b5c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs @@ -10,62 +10,66 @@ module ``PseudoCustomAttributes Test Cases`` = let ``PseudoCustomAttributes - Compile and Run`` compilation = compilation + |> getCompilation |> asExe |> compileAndRun |> shouldSucceed let ``PseudoCustomAttributes - Fail to compile`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail - [] + [] let ``PseudoCustomAttributes - AssemblyCompany_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyConfiguration_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyCopyright_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyDescription_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyFileVersion_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyInformationalVersion_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyTitle_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyTrademark_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyVersion_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyVersion_002_fs`` compilation = compilation + |> getCompilation |> asExe |> compileExeAndRun |> shouldSucceed - [] + [] let ``PseudoCustomAttributes - AssemblyVersion_003_fs`` compilation = compilation + |> getCompilation |> asExe |> withAssemblyVersion "4.5.6.7" |> ignoreWarnings diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs index 856c34bbfa6..bebf3652605 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs @@ -29,43 +29,49 @@ module RecordTypes = //# Fails due to stack overflow. //#ReqNOCov SOURCE=BigRecord01.fs # BigRecord01.fs - [] + [] let ``BigRecord01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds //# Renaming the .exe because for some weird reason on some OSes having 'DispatchSlot' in the .exe //# seems to trigger the UAC dialog... (e.g. Win7 x86) // SOURCE=DispatchSlot_Equals01.fsx SCFLAGS="-o dl_equals01.exe" # DispatchSlot_Equals01.fsx - [] + [] let ``DispatchSlot_Equals01_fsx`` compilation = compilation + |> getCompilation |> withName "dl_equals01" |> verifyCompileAndRunSucceeds // SOURCE=DispatchSlot_GetHashCode.fsx SCFLAGS="-o dl_gethashcode01.exe" # DispatchSlot_GetHashCode.fsx - [] + [] let ``DispatchSlot_GetHashCode_fsx`` compilation = compilation + |> getCompilation |> withName "dl_gethashcode01" |> verifyCompileAndRunSucceeds // SOURCE=DuckTypingRecords01.fs # DuckTypingRecords01.fs - [] + [] let ``DuckTypingRecords01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=EqualAndBoxing01.fs # EqualAndBoxing01.fs - [] + [] let ``EqualAndBoxing01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=E_InheritRecord01.fs SCFLAGS="--test:ErrorRanges" # E_InheritRecord01.fs - [] + [] let ``E_InheritRecord01_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -73,9 +79,10 @@ module RecordTypes = ] // SOURCE=E_Interface_IComparable.fsx SCFLAGS="--test:ErrorRanges" # E_Interface_IComparable.fsx - [] + [] let ``E_Interface_IComparable_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -85,9 +92,10 @@ module RecordTypes = // SOURCE=E_Interface_IStructuralHash.fsx # E_Interface_IStructuralHash.fsx - [] + [] let ``E_Interface_IStructuralHash_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -98,9 +106,10 @@ module RecordTypes = ] // SOURCE=E_MutableFields01.fsx SCFLAGS="--test:ErrorRanges" # E_MutableFields01.fsx - [] + [] let ``E_MutableFields01_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -113,9 +122,10 @@ module RecordTypes = ] // SOURCE=E_RecordCloning01.fs # E_RecordCloning01.fs - [] + [] let ``E_RecordCloning01_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -123,9 +133,10 @@ module RecordTypes = ] // SOURCE=E_RecordsNotNull01.fs # E_RecordsNotNull01.fs - [] + [] let ``E_RecordsNotNull01_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -133,15 +144,17 @@ module RecordTypes = ] // SOURCE=E_RecordsNotNull02.fs # E_RecordsNotNull02.fs - [] + [] let ``E_RecordsNotNull02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=E_Scoping01.fsx SCFLAGS="--test:ErrorRanges" # E_Scoping01.fsx - [] + [] let ``E_Scoping01_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -149,9 +162,10 @@ module RecordTypes = ] // SOURCE=E_Scoping02.fsx SCFLAGS=" --test:ErrorRanges --flaterrors" # E_Scoping02.fsx - [] + [] let ``E_Scoping02_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -159,9 +173,10 @@ module RecordTypes = ] // SOURCE=E_TypeInference01.fs SCFLAGS="--test:ErrorRanges" # E_TypeInference01.fs - [] + [] let ``E_TypeInference01_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -169,9 +184,10 @@ module RecordTypes = ] // SOURCE=E_TypeInference01b.fs SCFLAGS="--test:ErrorRanges" # E_TypeInference01b.fs - [] + [] let ``E_TypeInference01b_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -179,9 +195,10 @@ module RecordTypes = ] // SOURCE=E_TypeInference02.fs SCFLAGS="--test:ErrorRanges" # E_TypeInference02.fs - [] + [] let ``E_TypeInference02_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -189,9 +206,10 @@ module RecordTypes = ] // SOURCE=E_UnitType01.fsx SCFLAGS="-a --test:ErrorRanges" # E_UnitType01.fsx - [] + [] let ``E_UnitType01_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -199,184 +217,214 @@ module RecordTypes = ] // SOURCE=FieldBindingAfterWith01a.fs SCFLAGS=-a # FieldBindingAfterWith01a.fs - [] + [] let ``FieldBindingAfterWith01a_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheckAsFsxAsLibrary // SOURCE=FieldBindingAfterWith01b.fs SCFLAGS=-a # FieldBindingAfterWith01b.fs - [] + [] let ``FieldBindingAfterWith01b_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheckAsFsxAsLibrary // SOURCE=FullyQualify01.fs # FullyQualify01.fs - [] + [] let ``FullyQualify01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Interface01.fsx # Interface01.fsx - [] + [] let ``Interface01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Interface_Empty.fsx # Interface_Empty.fsx - [] + [] let ``Interface_Empty_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Interface_IComparable.fsx # Interface_IComparable.fsx - [] + [] let ``Interface_IComparable_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=ImplicitEquals01.fs # ImplicitEquals001.fs - [] + [] let ``ImplicitEquals01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=LongIdentifiers01.fsx # LongIdentifiers01.fsx - [] + [] let ``LongIdentifiers01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Member01.fsx # Member01.fsx - [] + [] let ``Member01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=MutableFields01.fsx # MutableFields01.fsx - [] + [] let ``MutableFields01_fsx`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:464"] |> verifyCompileAndRunSucceeds // SOURCE=MutableFields_SampleFromSpec02.fsx # MutableFields_SampleFromSpec02.fsx - [] + [] let ``MutableFields_SampleFromSpec02_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=NoClashMemberIFaceMember.fs SCFLAGS="--warnaserror+" # NoClashMemberIFaceMember.fs - [] + [] let ``NoClashMemberIFaceMember_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // NoMT SOURCE=Overload_Equals.fs COMPILE_ONLY=1 SCFLAGS=--warnaserror+ FSIMODE=PIPE # Overload_Equals.fs - fsi - [] + [] let ``Overload_Equals_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // NoMT SOURCE=Overload_GetHashCode.fs COMPILE_ONLY=1 SCFLAGS=--warnaserror+ FSIMODE=PIPE # Overload_GetHashCode.fs - fsi - [] + [] let ``Overload_GetHashCode_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // NoMT SOURCE=Overload_ToString.fs COMPILE_ONLY=1 SCFLAGS=--warnaserror+ FSIMODE=PIPE # Overload_ToString.fs - fsi - [] + [] let ``Overload_ToString_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=SampleFromSpec01.fsx # SampleFromSpec01.fsx - [] + [] let ``SampleFromSpec01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=SampleFromSpec03.fsx # SampleFromSpec03.fsx - [] + [] let ``SampleFromSpec03_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Scoping03.fsx # Scoping03.fsx - [] + [] let ``Scoping03_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Scoping04.fsx # Scoping04.fsx - [] + [] let ``Scoping04_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=RecordCloning01.fs # RecordCloning01.fs - [] + [] let ``RecordCloning01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=RecordCloning02.fs # RecordCloning02.fs - [] + [] let ``RecordCloning02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=RecordCloning03.fs # RecordCloning03.fs - [] + [] let ``RecordCloning03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=StructRecordCloning01.fs # StructRecordCloning01.fs - [] + [] let ``StructRecordCloning01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=StructRecordCloning02.fs # StructRecordCloning02.fs - [] + [] let ``StructRecordCloning02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=StructRecordCloning03.fs # StructRecordCloning03.fs - [] + [] let ``StructRecordCloning03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Syntax01.fs # Syntax01.fs - [] + [] let ``Syntax01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=TypeInference01.fs # TypeInference01.fs - [] + [] let ``TypeInference01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=TypeInference02.fs # TypeInference02.fs - [] + [] let ``TypeInference02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // This test was automatically generated (moved from FSharpQA suite - Conformance/BasicTypeAndModuleDefinitions/RecordTypes) - [] + [] let ``UnitType01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=W_Overrides01.fsx SCFLAGS="--test:ErrorRanges" # W_Overrides01.fsx - [] + [] let ``W_Overrides01_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructTypes.fs index 95e1cb2e4a6..8e2939c22fe 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructTypes.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module StructTypes = // This test was automatically generated (moved from FSharpQA suite - Conformance/StructTypes) - [] + [] let ``StructTypes - Overload_Equals_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"; "--nowarn:988"] |> typecheck @@ -19,9 +20,10 @@ module StructTypes = |> ignore // This test was automatically generated (moved from FSharpQA suite - Conformance/StructTypes) - [] + [] let ``StructTypes - Overload_GetHashCode_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"; "--nowarn:988"] |> typecheck @@ -29,18 +31,20 @@ module StructTypes = |> ignore // This test was automatically generated (moved from FSharpQA suite - Conformance/StructTypes) - [] + [] let ``StructTypes - Overload_ToString_f`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"; "--nowarn:988"] |> typecheck |> shouldSucceed |> ignore - [] + [] let ``StructTypes - E_Inheritance.fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"; "--nowarn:988"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs index 60d9132f5e4..9523a5301cd 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs @@ -10,9 +10,10 @@ 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 ``E_CannotInlineVirtualMethods1_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -23,9 +24,10 @@ 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 ``E_CannotInlineVirtualMethod2_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs index 942219ba172..5623ac08ca7 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs @@ -1228,10 +1228,11 @@ printf "%A" res""" [] #else // SOURCE=ConstrainedAndInterfaceCalls.fs # ConstrainedAndInterfaceCalls.fs - [] + [] #endif let ``ConstrainedAndInterfaceCalls.fs`` compilation = - compilation + compilation + |> getCompilation |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] |> verifyCompile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs index e12f72cd76b..356f418d19c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module LogicalPropertiesOfTypes = // This test was automatically generated (moved from FSharpQA suite - Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes) - [] + [] let ``TypeWithNullLiteral_NetRef_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["-a"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs index 0c61d444a9d..02b10b52b28 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs @@ -21,42 +21,47 @@ module UnionTypes = |> compileAndRun //SOURCE=BeginWithUppercase01.fsx SCFLAGS= # BeginWithUppercase01.fsx - [] + [] let ``BeginWithUppercase01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //# Renaming the .exe because for some weird reason on some OSes having 'DispatchSlot' in the .exe //# seems to trigger the UAC dialog... (e.g. Win7 x86) //SOURCE=DispatchSlot_Equals01.fsx SCFLAGS="-o dl_equals01.exe" # DispatchSlot_Equals01.fsx - [] + [] let ``DispatchSlot_Equals01_fsx`` compilation = compilation + |> getCompilation |> withName "dl_equals01" |> verifyCompileAndRun |> shouldSucceed //SOURCE=DispatchSlot_GetHashCode.fsx SCFLAGS="-o dl_gethashcode01.exe" # DispatchSlot_GetHashCode.fsx - [] + [] let ``DispatchSlot_GetHashCode_fsx`` compilation = compilation + |> getCompilation |> withName "dl_gethashcode01" |> verifyCompileAndRun |> shouldSucceed //SOURCE=EqualAndBoxing01.fs # EqualAndBoxing01.fs - [] + [] let ``EqualAndBoxing01_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed //SOURCE=E_BeginWithUppercase01.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase01.fsx - [] + [] let ``E_BeginWithUppercase01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -65,9 +70,10 @@ module UnionTypes = ] //SOURCE=E_BeginWithUppercase02.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase02.fsx - [] + [] let ``E_BeginWithUppercase02_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -75,9 +81,10 @@ module UnionTypes = ] //SOURCE=E_BeginWithUppercase03.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase03.fsx - [] + [] let ``E_BeginWithUppercase03_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -85,9 +92,10 @@ module UnionTypes = ] //SOURCE=E_BeginWithUppercase04.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase04.fsx - [] + [] let ``E_BeginWithUppercase04_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -95,9 +103,10 @@ module UnionTypes = ] //SOURCE=E_BeginWithUppercaseNoPipe01.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercaseNoPipe01.fsx - [] + [] let ``E_BeginWithUppercaseNoPipe01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -107,9 +116,10 @@ module UnionTypes = ] //SOURCE=E_GenericFunctionValuedStaticProp01.fs SCFLAGS="--test:ErrorRanges --warnaserror-" # E_GenericFunctionValuedStaticProp01.fs - [] + [] let ``E_GenericFunctionValuedStaticProp01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -118,9 +128,10 @@ module UnionTypes = ] //SOURCE=E_Interface_IComparable.fsx SCFLAGS="--test:ErrorRanges" # E_Interface_IComparable.fsx - [] + [] let ``E_Interface_IComparable_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -129,9 +140,10 @@ module UnionTypes = ] //SOURCE=E_Member_Duplicate01.fsx SCFLAGS="--test:ErrorRanges" # E_Member_Duplicate01.fsx - [] + [] let ``E_Member_Duplicate01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -141,9 +153,10 @@ module UnionTypes = ] //SOURCE=E_ScopeAndDataConstrAndPattern01.fsx SCFLAGS="--test:ErrorRanges" # E_ScopeAndDataConstrAndPattern01.fsx - [] + [] let ``E_ScopeAndDataConstrAndPattern01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -151,9 +164,10 @@ module UnionTypes = ] //SOURCE=E_Interface_IStructuralHash.fsx # E_Interface_IStructuralHash.fsx - [] + [] let ``E_Interface_IStructuralHash_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -164,9 +178,10 @@ module UnionTypes = ] //SOURCE=E_FieldNameUsedMulti.fs SCFLAGS="--test:ErrorRanges" # E_FieldNameUsedMulti.fs - [] + [] let ``E_FieldNameUsedMulti_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -176,9 +191,10 @@ module UnionTypes = ] //SOURCE=E_FieldMemberClash.fs SCFLAGS="--test:ErrorRanges" # E_FieldMemberClash.fs - [] + [] let ``E_FieldMemberClash_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -189,9 +205,10 @@ module UnionTypes = ] //SOURCE=E_InheritUnion.fs # E_InheritUnion.fs - [] + [] let ``E_InheritUnion_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -200,9 +217,10 @@ module UnionTypes = ] //SOURCE=E_LowercaseDT.fs # E_LowercaseDT.fs - [] + [] let ``E_LowercaseDT_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -210,9 +228,10 @@ module UnionTypes = ] //SOURCE=E_Overload_Equals.fs SCFLAGS="--test:ErrorRanges" # E_Overload_Equals.fs - [] + [] let ``E_Overload_Equals_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -221,9 +240,10 @@ module UnionTypes = ] //SOURCE=E_Overload_GetHashCode.fs SCFLAGS="--test:ErrorRanges" # E_Overload_GetHashCode.fs - [] + [] let ``E_Overload_GetHashCode_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -232,9 +252,10 @@ module UnionTypes = ] //SOURCE=E_SampleFromSpec01d.fsx SCFLAGS="--test:ErrorRanges" # E_SampleFromSpec01d.fsx - [] + [] let ``E_SampleFromSpec01d_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -242,9 +263,10 @@ module UnionTypes = ] //SOURCE=E_SampleFromSpec01d2.fsx SCFLAGS="--test:ErrorRanges" # E_SampleFromSpec01d2.fsx - [] + [] let ``E_SampleFromSpec01d2_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -252,9 +274,10 @@ module UnionTypes = ] //SOURCE=E_UnionConstructorBadFieldName.fs SCFLAGS="--test:ErrorRanges" # E_UnionConstructorBadFieldName.fs - [] + [] let ``E_UnionConstructorBadFieldName_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -266,9 +289,10 @@ module UnionTypes = ] //SOURCE=E_UnionFieldConflictingName.fs SCFLAGS="--test:ErrorRanges" # E_UnionFieldConflictingName.fs - [] + [] let ``E_UnionFieldConflictingName_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -278,9 +302,10 @@ module UnionTypes = ] //SOURCE=E_UnionFieldNamedTag.fs SCFLAGS="--test:ErrorRanges" # E_UnionFieldNamedTag.fs - [] + [] let ``E_UnionFieldNamedTag_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -288,9 +313,10 @@ module UnionTypes = ] //SOURCE=E_UnionFieldNamedTagNoDefault.fs SCFLAGS="--test:ErrorRanges" # E_UnionFieldNamedTagNoDefault.fs - [] + [] let ``E_UnionFieldNamedTagNoDefault_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -298,9 +324,10 @@ module UnionTypes = ] //SOURCE=E_UnionMemberNamedTag.fs SCFLAGS="--test:ErrorRanges" # E_UnionMemberNamedTag.fs - [] + [] let ``E_UnionMemberNamedTag_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -308,9 +335,10 @@ module UnionTypes = ] //SOURCE=E_UnionMemberNamedTagNoDefault.fs SCFLAGS="--test:ErrorRanges" # E_UnionMemberNamedTagNoDefault.fs - [] + [] let ``E_UnionMemberNamedTagNoDefault_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -318,9 +346,10 @@ module UnionTypes = ] //SOURCE=E_UnionMemberNamedTags.fs SCFLAGS="--test:ErrorRanges" # E_UnionMemberNamedTags.fs - [] + [] let ``E_UnionMemberNamedTags_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -328,9 +357,10 @@ module UnionTypes = ] //SOURCE=E_UnionMemberNamedTagsNoDefault.fs SCFLAGS="--test:ErrorRanges" # E_UnionMemberNamedTagsNoDefault.fs - [] + [] let ``E_UnionMemberNamedTagsNoDefault_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -338,9 +368,10 @@ module UnionTypes = ] //SOURCE=E_UnionsNotNull01.fs # E_UnionsNotNull01.fs - [] + [] let ``E_UnionsNotNull01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -348,191 +379,217 @@ module UnionTypes = ] //SOURCE=ImplicitEquals001.fs # ImplicitEquals001.fs - [] + [] let ``ImplicitEquals001_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Interface01.fsx SCFLAGS= # Interface01.fsx - [] + [] let ``Interface01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Interface_IComparable.fsx SCFLAGS= # Interface_IComparable.fsx - [] + [] let ``Interface_IComparable_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Member01.fsx # Member01.fsx - [] + [] let ``Member01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=NamedFields01.fsx SCFLAGS= # NamedFields01.fsx - [] + [] let ``NamedFields01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=NamedFields02.fsx SCFLAGS= # NamedFields02.fsx - [] + [] let ``NamedFields02_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=NamedFields03.fsx SCFLAGS= # NamedFields03.fsx - [] + [] let ``NamedFields03_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/BasicTypeAndModuleDefinitions/UnionTypes) - [] + [] let ``Overload_Equals_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/BasicTypeAndModuleDefinitions/UnionTypes) - [] + [] let ``Overload_GetHashCode_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/BasicTypeAndModuleDefinitions/UnionTypes) - [] + [] let ``Overload_ToString_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompile |> shouldSucceed //SOURCE=Overrides01.fsx # Overrides01.fsx - [] + [] let ``Overrides01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Parenthesis01.fsx # Parenthesis01.fsx - [] + [] let ``Parenthesis01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Parenthesis02.fsx # Parenthesis02.fsx - [] + [] let ``Parenthesis02_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Parenthesis03.fsx # Parenthesis03.fsx - [] + [] let ``Parenthesis03_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Recursive01.fsx SCFLAGS= # Recursive01.fsx - [] + [] let ``Recursive01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=ReflectionOnUnionTypes01.fs SCFLAGS= # ReflectionOnUnionTypes01.fs - [] + [] let ``ReflectionOnUnionTypes01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=SampleFromSpec01.fsx SCFLAGS # SampleFromSpec01.fsx - [] + [] let ``SampleFromSpec01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=SampleFromSpec01b.fsx SCFLAGS= # SampleFromSpec01b.fsx - [] + [] let ``SampleFromSpec01b_fsx`` compilation = compilation + |> getCompilation |> withOcamlCompat |> withLangVersion50 |> verifyCompileAndRun |> shouldSucceed //SOURCE=SampleFromSpec01d.fsx SCFLAGS= # SampleFromSpec01d.fsx - [] + [] let ``SampleFromSpec01d_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=ScopeAndDataConstrAndPattern01.fsx SCFLAGS= # ScopeAndDataConstrAndPattern01.fsx - [] + [] let ``ScopeAndDataConstrAndPattern01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=UnionCaseProduction01.fsx SCFLAGS=-a # UnionCaseProduction01.fsx - [] + [] let ``UnionCaseProduction01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=UnionCasesProduction01.fsx SCFLAGS=-a # UnionCasesProduction01.fsx - [] + [] let ``UnionCasesProduction01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=UnionsNotNull02.fs # UnionsNotNull02.fs - [] + [] let ``UnionsNotNull02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=LowercaseWhenRequireQualifiedAccess.fsx # LowercaseWhenRequireQualifiedAccess.fsx - [] + [] let ``LowercaseWhenRequireQualifiedAccess_fs in langversion 6`` compilation = compilation + |> getCompilation |> withLangVersion60 |> verifyCompile |> shouldFail //SOURCE=LowercaseWhenRequireQualifiedAccess.fsx # LowercaseWhenRequireQualifiedAccess.fsx - [] + [] let ``LowercaseWhenRequireQualifiedAccess_fs in preview`` compilation = compilation + |> getCompilation |> withLangVersion70 |> verifyCompileAndRun |> shouldSucceed //SOURCE=E_LowercaseWhenRequireQualifiedAccess.fsx # E_LowercaseWhenRequireQualifiedAccess.fsx - [] + [] let ``E_LowercaseWhenRequireQualifiedAccess_fs in preview`` compilation = compilation + |> getCompilation |> withLangVersion70 |> verifyCompile |> shouldFail @@ -552,9 +609,10 @@ module UnionTypes = ] //SOURCE=E_LowercaseWhenRequireQualifiedAccess.fsx # E_LowercaseWhenRequireQualifiedAccess.fsx - [] + [] let ``E_LowercaseWhenRequireQualifiedAccess_fs in langversion 6`` compilation = compilation + |> getCompilation |> withLangVersion60 |> verifyCompile |> shouldFail @@ -581,9 +639,10 @@ module UnionTypes = ] //SOURCE=W_GenericFunctionValuedStaticProp02.fs SCFLAGS="--test:ErrorRanges --warnaserror-" # W_GenericFunctionValuedStaticProp02.fs - [] + [] let ``W_GenericFunctionValuedStaticProp02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -591,9 +650,10 @@ module UnionTypes = ] //SOURCE=W_SampleFromSpec01c.fsx SCFLAGS="--test:ErrorRanges" # W_SampleFromSpec01c.fsx - [] + [] let ``W_SampleFromSpec01c_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -603,9 +663,10 @@ module UnionTypes = ] //SOURCE=W_UnionCaseProduction01.fsx SCFLAGS="-a --test:ErrorRanges" # W_UnionCaseProduction01.fsx - [] + [] let ``W_UnionCaseProduction01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs index 34942501f1d..24f3b6250c8 100644 --- a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs +++ b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace ConstraintSolver @@ -13,9 +13,10 @@ 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 + |> getCompilation |> verifyBaseline [] diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnionCasePatternMatchingErrors.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnionCasePatternMatchingErrors.fs index df94ca89e0e..6cffe31c236 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnionCasePatternMatchingErrors.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnionCasePatternMatchingErrors.fs @@ -1,12 +1,14 @@ -module ErrorMessages.UnionCasePatternMatchingErrors +namespace ErrorMessages open FSharp.Test open Xunit open FSharp.Test.Compiler -[] -let ``Union matching error - Incomplete union fields`` () = - FSharp """ +module UnionCasePatternMatchingErrors = + + [] + let ``Union matching error - Incomplete union fields`` () = + FSharp """ module Tests type U = | B of f1:int list * {|X:string|} * f3:U * f4: (int * System.String) @@ -15,18 +17,18 @@ let x : U = failwith "" let myVal = match x with | B -> 42""" - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Error 727, Line 9, Col 7, Line 9, Col 8, - "This union case expects 4 arguments in tupled form, but was given 0. The missing field arguments may be any of: + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 727, Line 9, Col 7, Line 9, Col 8, + "This union case expects 4 arguments in tupled form, but was given 0. The missing field arguments may be any of: \tf1: int list \t{| X: string |} \tf3: U \tf4: (int * System.String)") -[] -let ``Union matching error - Named args - Name used twice`` () = - FSharp """ + [] + let ``Union matching error - Named args - Name used twice`` () = + FSharp """ module Tests type U = | B of field: int * int @@ -34,13 +36,13 @@ let x : U = failwith "" let myVal = match x with | B (field = x; field = z) -> let y = x + z + 1 in ()""" - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Error 3175, Line 8, Col 21, Line 8, Col 26, "Union case/exception field 'field' cannot be used more than once.") + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 3175, Line 8, Col 21, Line 8, Col 26, "Union case/exception field 'field' cannot be used more than once.") -[] -let ``Union matching error - Multiple tupled args`` () = - FSharp """ + [] + let ``Union matching error - Multiple tupled args`` () = + FSharp """ module Tests type U = | B of field: int * int @@ -49,15 +51,15 @@ let x : U = failwith "" let myVal = match x with | B x z -> let y = x + z + 1 in ()""" - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Error 727, Line 9, Col 7, Line 9, Col 12, "This union case expects 2 arguments in tupled form, but was given 0. The missing field arguments may be any of: + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 727, Line 9, Col 7, Line 9, Col 12, "This union case expects 2 arguments in tupled form, but was given 0. The missing field arguments may be any of: \tfield: int \tint") -[] -let ``Union matching error - Missing field`` () = - FSharp """ + [] + let ``Union matching error - Missing field`` () = + FSharp """ module Tests type U = | A @@ -67,14 +69,14 @@ let myVal = match A with | A -> 15 | B (x, _) -> 16""" - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Error 727, Line 10, Col 7, Line 10, Col 15, "This union case expects 3 arguments in tupled form, but was given 2. The missing field arguments may be any of: + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 727, Line 10, Col 7, Line 10, Col 15, "This union case expects 3 arguments in tupled form, but was given 2. The missing field arguments may be any of: \tint") -[] -let ``Union Pattern discard not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Union Pattern discard not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type X = X @@ -83,14 +85,14 @@ let x: X = X let myVal = match x with | X _ -> ()""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Warning 3548, Line 9, Col 7, Line 9, Col 10, "Pattern discard is not allowed for union case that takes no data.") + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3548, Line 9, Col 7, Line 9, Col 10, "Pattern discard is not allowed for union case that takes no data.") -[] -let ``Union Pattern discard allowed for union case that takes no data with Lang version 7`` () = - FSharp """ + [] + let ``Union Pattern discard allowed for union case that takes no data with Lang version 7`` () = + FSharp """ module Tests type X = X @@ -99,13 +101,13 @@ let x: X = X let myVal = match x with | X _ -> ()""" - |> withLangVersion70 - |> typecheck - |> shouldSucceed + |> withLangVersion70 + |> typecheck + |> shouldSucceed -[] -let ``Union function Pattern discard allowed for union case that takes no data with Lang version 7`` () = - FSharp """ + [] + let ``Union function Pattern discard allowed for union case that takes no data with Lang version 7`` () = + FSharp """ module Tests type X = X @@ -114,13 +116,13 @@ let x: X = X let myVal = function | X _ -> ()""" - |> withLangVersion70 - |> typecheck - |> shouldSucceed + |> withLangVersion70 + |> typecheck + |> shouldSucceed -[] -let ``Union function Pattern discard not allowed for union case that takes no data with Lang version preview`` () = - FSharp """ + [] + let ``Union function Pattern discard not allowed for union case that takes no data with Lang version preview`` () = + FSharp """ module Tests type X = X @@ -129,14 +131,14 @@ let x: X = X let myVal = function | X _ -> ()""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Warning 3548, Line 9, Col 7, Line 9, Col 10, "Pattern discard is not allowed for union case that takes no data.") + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3548, Line 9, Col 7, Line 9, Col 10, "Pattern discard is not allowed for union case that takes no data.") -[] -let ``Pattern discard not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Pattern discard not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type U = | A @@ -150,14 +152,14 @@ let myVal = | A _ -> 15 | B (x, _, _) -> 16 | C _ -> 17""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") -[] -let ``Pattern function discard not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Pattern function discard not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type U = | A @@ -171,14 +173,14 @@ let myVal = | A _ -> 15 | B (x, _, _) -> 16 | C _ -> 17""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") -[] -let ``Pattern discard allowed for union case that takes no data with Lang version 7`` () = - FSharp """ + [] + let ``Pattern discard allowed for union case that takes no data with Lang version 7`` () = + FSharp """ module Tests type U = | A @@ -192,13 +194,13 @@ let myVal = | A _ -> 15 | B (x, _, _) -> 16 | C _ -> 17""" - |> withLangVersion70 - |> typecheck - |> shouldSucceed + |> withLangVersion70 + |> typecheck + |> shouldSucceed -[] -let ``Grouped Pattern discard not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Grouped Pattern discard not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type U = | A @@ -212,14 +214,14 @@ let myVal = | A _ | B _ | C _ -> 17""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") -[] -let ``Multiple pattern discards not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Multiple pattern discards not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type U = | A @@ -237,17 +239,17 @@ let myVal = | A _, D -> 15 | B (x, _, _), D _ -> 16 | C _, _ -> 17""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Warning 3548, Line 16, Col 7, Line 16, Col 10, "Pattern discard is not allowed for union case that takes no data.") - (Warning 3548, Line 17, Col 20, Line 17, Col 23, "Pattern discard is not allowed for union case that takes no data.") - ] + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 3548, Line 16, Col 7, Line 16, Col 10, "Pattern discard is not allowed for union case that takes no data.") + (Warning 3548, Line 17, Col 20, Line 17, Col 23, "Pattern discard is not allowed for union case that takes no data.") + ] -[] -let ``Multiple pattern discards not allowed for union case that takes no data with Lang 7`` () = - FSharp """ + [] + let ``Multiple pattern discards not allowed for union case that takes no data with Lang 7`` () = + FSharp """ module Tests type U = | A @@ -265,13 +267,13 @@ let myVal = | A _, D -> 15 | B (x, _, _), D _ -> 16 | C _, _ -> 17""" - |> withLangVersion70 - |> typecheck - |> shouldSucceed + |> withLangVersion70 + |> typecheck + |> shouldSucceed -[] -let ``Multiple function pattern discards is not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Multiple function pattern discards is not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type U = | A @@ -289,17 +291,17 @@ let myVal = | A _, D -> 15 | B (x, _, _), D _ -> 16 | C _, _ -> 17""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Warning 3548, Line 16, Col 7, Line 16, Col 10, "Pattern discard is not allowed for union case that takes no data.") - (Warning 3548, Line 17, Col 20, Line 17, Col 23, "Pattern discard is not allowed for union case that takes no data.") - ] + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 3548, Line 16, Col 7, Line 16, Col 10, "Pattern discard is not allowed for union case that takes no data.") + (Warning 3548, Line 17, Col 20, Line 17, Col 23, "Pattern discard is not allowed for union case that takes no data.") + ] -[] -let ``Multiple function pattern discards is not allowed for union case that takes no data with Lang 7`` () = - FSharp """ + [] + let ``Multiple function pattern discards is not allowed for union case that takes no data with Lang 7`` () = + FSharp """ module Tests type U = | A @@ -318,62 +320,64 @@ let myVal = | A _, D -> 15 | B (x, _, _), D _ -> 16 | C _, _ -> 17""" - |> withLangVersion70 - |> typecheck - |> shouldSucceed + |> withLangVersion70 + |> typecheck + |> shouldSucceed -[] -let ``Pattern named not allowed union case does not take any arguments with Lang 7`` compilation = - compilation - |> asFs - |> withLangVersion70 - |> withOptions ["--nowarn:25"] - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 725, Line 8, Col 3, Line 8, Col 9, "This union case does not take arguments"); - (Error 725, Line 11, Col 3, Line 11, Col 14, "This union case does not take arguments") - (Error 725, Line 14, Col 3, Line 14, Col 10, "This union case does not take arguments") - (Error 725, Line 17, Col 3, Line 17, Col 12, "This union case does not take arguments") - (Error 725, Line 20, Col 3, Line 20, Col 17, "This union case does not take arguments") - (Error 725, Line 23, Col 3, Line 23, Col 13, "This union case does not take arguments") - (Error 725, Line 26, Col 3, Line 26, Col 14, "This union case does not take arguments") - (Error 725, Line 29, Col 3, Line 29, Col 13, "This union case does not take arguments") - (Error 725, Line 35, Col 3, Line 35, Col 9, "This union case does not take arguments") - (Error 725, Line 38, Col 3, Line 38, Col 14, "This union case does not take arguments") - (Error 725, Line 42, Col 3, Line 42, Col 11, "This union case does not take arguments") - (Error 725, Line 48, Col 3, Line 48, Col 8, "This union case does not take arguments") - (Error 725, Line 51, Col 3, Line 51, Col 7, "This union case does not take arguments") - (Error 725, Line 55, Col 25, Line 55, Col 28, "This union case does not take arguments") - (Error 725, Line 57, Col 25, Line 57, Col 29, "This union case does not take arguments") - (Error 725, Line 59, Col 24, Line 59, Col 32, "This union case does not take arguments") - ] + [] + let ``Pattern named not allowed union case does not take any arguments with Lang 7`` compilation = + compilation + |> getCompilation + |> asFs + |> withLangVersion70 + |> withOptions ["--nowarn:25"] + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 725, Line 8, Col 3, Line 8, Col 9, "This union case does not take arguments"); + (Error 725, Line 11, Col 3, Line 11, Col 14, "This union case does not take arguments") + (Error 725, Line 14, Col 3, Line 14, Col 10, "This union case does not take arguments") + (Error 725, Line 17, Col 3, Line 17, Col 12, "This union case does not take arguments") + (Error 725, Line 20, Col 3, Line 20, Col 17, "This union case does not take arguments") + (Error 725, Line 23, Col 3, Line 23, Col 13, "This union case does not take arguments") + (Error 725, Line 26, Col 3, Line 26, Col 14, "This union case does not take arguments") + (Error 725, Line 29, Col 3, Line 29, Col 13, "This union case does not take arguments") + (Error 725, Line 35, Col 3, Line 35, Col 9, "This union case does not take arguments") + (Error 725, Line 38, Col 3, Line 38, Col 14, "This union case does not take arguments") + (Error 725, Line 42, Col 3, Line 42, Col 11, "This union case does not take arguments") + (Error 725, Line 48, Col 3, Line 48, Col 8, "This union case does not take arguments") + (Error 725, Line 51, Col 3, Line 51, Col 7, "This union case does not take arguments") + (Error 725, Line 55, Col 25, Line 55, Col 28, "This union case does not take arguments") + (Error 725, Line 57, Col 25, Line 57, Col 29, "This union case does not take arguments") + (Error 725, Line 59, Col 24, Line 59, Col 32, "This union case does not take arguments") + ] -[] -let ``Pattern named not allowed union case does not take any arguments with Lang preview`` compilation = - compilation - |> asFs - |> withLangVersion80 - |> withOptions ["--nowarn:25"] - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 725, Line 8, Col 3, Line 8, Col 9, "This union case does not take arguments") - (Error 725, Line 11, Col 3, Line 11, Col 14, "This union case does not take arguments") - (Error 725, Line 14, Col 3, Line 14, Col 10, "This union case does not take arguments") - (Error 725, Line 17, Col 3, Line 17, Col 12, "This union case does not take arguments") - (Error 725, Line 20, Col 3, Line 20, Col 17, "This union case does not take arguments") - (Error 725, Line 23, Col 3, Line 23, Col 13, "This union case does not take arguments") - (Error 725, Line 26, Col 3, Line 26, Col 14, "This union case does not take arguments") - (Error 725, Line 29, Col 3, Line 29, Col 13, "This union case does not take arguments") - (Warning 3548, Line 32, Col 3, Line 32, Col 9, "Pattern discard is not allowed for union case that takes no data.") - (Error 725, Line 35, Col 3, Line 35, Col 9, "This union case does not take arguments") - (Error 725, Line 38, Col 3, Line 38, Col 14, "This union case does not take arguments") - (Error 725, Line 42, Col 3, Line 42, Col 11, "This union case does not take arguments") - (Error 725, Line 48, Col 3, Line 48, Col 8, "This union case does not take arguments") - (Error 725, Line 51, Col 3, Line 51, Col 7, "This union case does not take arguments") - (Warning 3548, Line 53, Col 24, Line 53, Col 27, "Pattern discard is not allowed for union case that takes no data.") - (Error 725, Line 55, Col 25, Line 55, Col 28, "This union case does not take arguments") - (Error 725, Line 57, Col 25, Line 57, Col 29, "This union case does not take arguments") - (Error 725, Line 59, Col 24, Line 59, Col 32, "This union case does not take arguments") - ] \ No newline at end of file + [] + let ``Pattern named not allowed union case does not take any arguments with Lang preview`` compilation = + compilation + |> getCompilation + |> asFs + |> withLangVersion80 + |> withOptions ["--nowarn:25"] + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 725, Line 8, Col 3, Line 8, Col 9, "This union case does not take arguments") + (Error 725, Line 11, Col 3, Line 11, Col 14, "This union case does not take arguments") + (Error 725, Line 14, Col 3, Line 14, Col 10, "This union case does not take arguments") + (Error 725, Line 17, Col 3, Line 17, Col 12, "This union case does not take arguments") + (Error 725, Line 20, Col 3, Line 20, Col 17, "This union case does not take arguments") + (Error 725, Line 23, Col 3, Line 23, Col 13, "This union case does not take arguments") + (Error 725, Line 26, Col 3, Line 26, Col 14, "This union case does not take arguments") + (Error 725, Line 29, Col 3, Line 29, Col 13, "This union case does not take arguments") + (Warning 3548, Line 32, Col 3, Line 32, Col 9, "Pattern discard is not allowed for union case that takes no data.") + (Error 725, Line 35, Col 3, Line 35, Col 9, "This union case does not take arguments") + (Error 725, Line 38, Col 3, Line 38, Col 14, "This union case does not take arguments") + (Error 725, Line 42, Col 3, Line 42, Col 11, "This union case does not take arguments") + (Error 725, Line 48, Col 3, Line 48, Col 8, "This union case does not take arguments") + (Error 725, Line 51, Col 3, Line 51, Col 7, "This union case does not take arguments") + (Warning 3548, Line 53, Col 24, Line 53, Col 27, "Pattern discard is not allowed for union case that takes no data.") + (Error 725, Line 55, Col 25, Line 55, Col 28, "This union case does not take arguments") + (Error 725, Line 57, Col 25, Line 57, Col 29, "This union case does not take arguments") + (Error 725, Line 59, Col 24, Line 59, Col 32, "This union case does not take arguments") + ] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 3ff3f070dc0..b96aba6777b 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -64,7 +64,7 @@ - + diff --git a/tests/FSharp.Compiler.ComponentTests/Globalization/GlobalizationTestCases.fs b/tests/FSharp.Compiler.ComponentTests/Globalization/GlobalizationTestCases.fs index 536ad488203..d5fad6b87ca 100644 --- a/tests/FSharp.Compiler.ComponentTests/Globalization/GlobalizationTestCases.fs +++ b/tests/FSharp.Compiler.ComponentTests/Globalization/GlobalizationTestCases.fs @@ -10,56 +10,57 @@ module ``Globalization Test Cases`` = let ``Compile global source file`` compilation = compilation + |> getCompilation |> asExe |> ignoreWarnings |> compile |> shouldSucceed |> withDiagnostics [ ] - [] + [] let ``Compile Arabic source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile gb18030 source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile HexCharEncode source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Hindi source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Mongolian source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile RightToLeft source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Surrogates source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Tamil source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Tibetan source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile utf16 source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile utf8 source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Yi source file`` compilation = ``Compile global source file`` compilation diff --git a/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs index 9d98106bcdb..d64262e856b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs @@ -1,22 +1,23 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -// Run sequentially because of shared fsiSession. -[] -module Language.SequenceExpression.SequenceExpressionTests +namespace Language open FSharp.Test open Xunit open FSharp.Test.Compiler open FSharp.Test.ScriptHelpers +// Run sequentially because of shared fsiSession. +[] +module SequenceExpression = -let fsiSession = getSessionForEval [||] LangVersion.Preview + let fsiSession = getSessionForEval [||] LangVersion.Preview -let runCode = evalInSharedSession fsiSession + let runCode = evalInSharedSession fsiSession -[] -let ``Basic recursive case uses tail recursion``() = - Fsx """ + [] + let ``Basic recursive case uses tail recursion``() = + Fsx """ let rec f () = seq { try yield 123 @@ -25,44 +26,44 @@ let rec f () = seq { yield 789 yield! f() } - """ - |> withLangVersion80 - |> compile - |> verifyIL [" - .class auto ansi serializable sealed nested assembly beforefieldinit 'f@3-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class Test/'f@3-1' @_instance - .method assembly specialname rtspecialname - instance void .ctor() 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 ) + """ + |> withLangVersion80 + |> compile + |> verifyIL [" + .class auto ansi serializable sealed nested assembly beforefieldinit 'f@3-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Test/'f@3-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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: ret - } - - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerable`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } + + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerable`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { - .maxstack 8 - IL_0000: ldc.i4.s 123 - IL_0002: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) - IL_0007: ldsfld class Test/'f@5-2' Test/'f@5-2'::@_instance - IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0011: tail. - IL_0013: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Append(class [runtime]System.Collections.Generic.IEnumerable`1, - class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0018: ret - } "] - -[] -let ``A seq{try/with} happy path with multiple language elements``() = - Fsx """ + .maxstack 8 + IL_0000: ldc.i4.s 123 + IL_0002: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_0007: ldsfld class Test/'f@5-2' Test/'f@5-2'::@_instance + IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0011: tail. + IL_0013: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Append(class [runtime]System.Collections.Generic.IEnumerable`1, + class [runtime]System.Collections.Generic.IEnumerable`1) + IL_0018: ret + } "] + + [] + let ``A seq{try/with} happy path with multiple language elements``() = + Fsx """ let rec mySeq inputEnumerable = seq { for x in inputEnumerable do @@ -85,13 +86,13 @@ let rec mySeq inputEnumerable = if (mySeq [0..5] |> Seq.sum) <> (1+(1+3)+3+4+5+5) then failwith $"Sum was {(mySeq [0..5] |> Seq.sum)} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``Inner try-finally's Dispose is executed before yielding from outer try-with``() = - Fsx """ + [] + let ``Inner try-finally's Dispose is executed before yielding from outer try-with``() = + Fsx """ let mutable l = [] let s() = seq { try @@ -124,16 +125,16 @@ let expectedList = "After sum"] if l<> expectedList then failwith $" List is %A{l}" - """ - |> runCode - |> shouldSucceed - -[] -[] -[] -[] -let ``A sequence expression can recurse itself from with clause``(recLevel:int) = - Fsx $""" + """ + |> runCode + |> shouldSucceed + + [] + [] + [] + [] + let ``A sequence expression can recurse itself from with clause``(recLevel:int) = + Fsx $""" let rec f () = seq {{ try yield 1 @@ -144,13 +145,13 @@ let rec f () = seq {{ let topNsum = f() |> Seq.take {recLevel} |> Seq.sum if topNsum <> {recLevel} then failwith $"Sum was {{topNsum}} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can yield from with clause``() = - Fsx """ + [] + let ``A sequence expression can yield from with clause``() = + Fsx """ let sum = seq { for x in [0;1] do @@ -162,13 +163,13 @@ let sum = |> Seq.sum if sum <> 110 then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can have try-with around foreach``() = - Fsx """ + [] + let ``A sequence expression can have try-with around foreach``() = + Fsx """ let mySeq (providedInput: seq) = seq { try @@ -180,13 +181,13 @@ let mySeq (providedInput: seq) = let mySum = (mySeq [3;2;1;0]) |> Seq.sum if mySum <> (6/3 + 6/2 + 6/1 + 100) then failwith $"Sum was {mySum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can have try-with around while``() = - Fsx """ + [] + let ``A sequence expression can have try-with around while``() = + Fsx """ let mySeq () = seq { let mutable x = 3 @@ -200,13 +201,13 @@ let mySeq () = let mySum = (mySeq () |> Seq.truncate 10) |> Seq.sum if mySum <> (6/3 + 6/2 + 6/1 + 100) then failwith $"Sum was {mySum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can yield! from with clause``() = - Fsx """ + [] + let ``A sequence expression can yield! from with clause``() = + Fsx """ let sum = seq { for x in [0;1] do @@ -218,13 +219,13 @@ let sum = |> Seq.sum if sum <> 16 then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can fail later in try/with and still get caught``() = - Fsx """ + [] + let ``A sequence expression can fail later in try/with and still get caught``() = + Fsx """ let sum = seq { try @@ -238,13 +239,13 @@ let sum = |> Seq.sum if sum <> (1+2+3) then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can have inner seq{try/with} in an outer try/with``() = - Fsx """ + [] + let ``A sequence expression can have inner seq{try/with} in an outer try/with``() = + Fsx """ let sum = seq { try @@ -256,13 +257,13 @@ let sum = |> Seq.sum if sum <> (1+1+1) then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can do multiple yields from try/with clause``() = - Fsx """ + [] + let ``A sequence expression can do multiple yields from try/with clause``() = + Fsx """ let sum = seq { for x in [0;1] do @@ -277,13 +278,13 @@ let sum = |> Seq.sum if sum <> (1+100+100+1+10+2) then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can yield from try and have empty with``() = - Fsx """ + [] + let ``A sequence expression can yield from try and have empty with``() = + Fsx """ let sum = seq { for x in [1;0] do @@ -295,13 +296,13 @@ let sum = |> Seq.sum if sum <> 10 then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can yield from with and have empty try``() = - Fsx """ + [] + let ``A sequence expression can yield from with and have empty try``() = + Fsx """ let sum = seq { for x in [1;0] do @@ -314,14 +315,14 @@ let sum = |> Seq.sum if sum <> 100 then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can have implicit yields in try-with``() = - Fsx """ + [] + let ``A sequence expression can have implicit yields in try-with``() = + Fsx """ let sum = seq { for x in [0;1] do @@ -333,14 +334,14 @@ let sum = |> Seq.sum if sum <> 110 then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``With clause in seq expression can bind specific exn type``() = + [] + let ``With clause in seq expression can bind specific exn type``() = - Fsx """ + Fsx """ open System let whatIsIt = seq { @@ -350,24 +351,24 @@ let whatIsIt = | :? AggregateException as exc when (exc.InnerException :? OperationCanceledException) -> () } |> Seq.head - """ - |> compile - |> verifyIL [ - """IL_0000: ldarg.1 - IL_0001: isinst [runtime]System.AggregateException - IL_0006: stloc.0 - IL_0007: ldloc.0"""; - - """IL_000a: ldloc.0 - IL_000b: callvirt instance class [runtime]System.Exception [runtime]System.Exception::get_InnerException() - IL_0010: stloc.1 - IL_0011: ldloc.1 - IL_0012: isinst [runtime]System.OperationCanceledException"""] - -[] -let ``With clause in seq expression can bind many exn subtypes``() = - - Fsx """ + """ + |> compile + |> verifyIL [ + """IL_0000: ldarg.1 + IL_0001: isinst [runtime]System.AggregateException + IL_0006: stloc.0 + IL_0007: ldloc.0"""; + + """IL_000a: ldloc.0 + IL_000b: callvirt instance class [runtime]System.Exception [runtime]System.Exception::get_InnerException() + IL_0010: stloc.1 + IL_0011: ldloc.1 + IL_0012: isinst [runtime]System.OperationCanceledException"""] + + [] + let ``With clause in seq expression can bind many exn subtypes``() = + + Fsx """ open System let whatIsIt = seq { @@ -381,17 +382,17 @@ let whatIsIt = | _ -> yield 1 } |> Seq.head - """ - |> runCode - |> shouldSucceed - -[] -[] -[] -[] -[] -let ``Propper type matching in seq{try/with} with implicit yield``(valInTry,valInWith1,valInWith2) = - Fsx $""" + """ + |> runCode + |> shouldSucceed + + [] + [] + [] + [] + [] + let ``Propper type matching in seq{try/with} with implicit yield``(valInTry,valInWith1,valInWith2) = + Fsx $""" let typedSeq = seq {{ for x in [0;1] do @@ -401,16 +402,16 @@ let typedSeq = |_ when x = 0 -> %s{valInWith1} |_ when x = 0 -> %s{valInWith2} }} - """ - |> withLangVersion80 - |> typecheck - |> shouldSucceed - -[] -[] -[] -let ``seq{try/with} using yield or implicit must be consistent``(valInTry,valInWith1,valInWith2) = - Fsx $""" + """ + |> withLangVersion80 + |> typecheck + |> shouldSucceed + + [] + [] + [] + let ``seq{try/with} using yield or implicit must be consistent``(valInTry,valInWith1,valInWith2) = + Fsx $""" let typedSeq = seq {{ for x in [0;1] do @@ -420,16 +421,16 @@ let typedSeq = |_ when x = 0 -> %s{valInWith1} |_ when x = 0 -> %s{valInWith2} }} - """ - |> withLangVersion80 - |> typecheck - |> shouldSucceed - -[] -[] -[] -let ``seq{try/with} mismatch implicit vs yield``(valInTry,valInWith1,valInWith2) = - Fsx $""" + """ + |> withLangVersion80 + |> typecheck + |> shouldSucceed + + [] + [] + [] + let ``seq{try/with} mismatch implicit vs yield``(valInTry,valInWith1,valInWith2) = + Fsx $""" let typedSeq = seq {{ for x in [0;1] do @@ -439,19 +440,19 @@ let typedSeq = |_ when x = 0 -> %s{valInWith1} |_ when x = 0 -> %s{valInWith2} }} - """ - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withDiagnosticMessageMatches "This expression returns a value of type 'int' but is implicitly discarded." - |> withDiagnosticMessageMatches "If you intended to use the expression as a value in the sequence then use an explicit 'yield'." - -[] -[] -[] -[] -let ``Type mismatch error in seq{try/with}``(valInTry,valInWith1,valInWith2) = - Fsx $""" + """ + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withDiagnosticMessageMatches "This expression returns a value of type 'int' but is implicitly discarded." + |> withDiagnosticMessageMatches "If you intended to use the expression as a value in the sequence then use an explicit 'yield'." + + [] + [] + [] + [] + let ``Type mismatch error in seq{try/with}``(valInTry,valInWith1,valInWith2) = + Fsx $""" let typedSeq = seq {{ for x in [0;1] do @@ -461,22 +462,22 @@ let typedSeq = |_ when x = 0 -> %s{valInWith1} |_ when x = 0 -> %s{valInWith2} }} - """ - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withErrorCode 1 - |> withDiagnosticMessageMatches "This expression was expected to have type" - - -[] -let printCode = """ printfn "Hello there" """ - -[] -[] -[] -let ``Missing result type in seq{try/with}``(valInTry,valInWith1,valInWith2) = - Fsx $""" + """ + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withErrorCode 1 + |> withDiagnosticMessageMatches "This expression was expected to have type" + + + [] + let printCode = """ printfn "Hello there" """ + + [] + [] + [] + let ``Missing result type in seq{try/with}``(valInTry,valInWith1,valInWith2) = + Fsx $""" let typedSeq = seq {{ for x in [0;1] do @@ -486,157 +487,161 @@ let typedSeq = |_ when x = 0 -> %s{valInWith1} |_ when x = 0 -> %s{valInWith2} }} - """ - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withErrorCode 30 - |> withDiagnosticMessageMatches "Value restriction: The value 'typedSeq' has an inferred generic type" - |> withDiagnosticMessageMatches "val typedSeq: '_a seq" + """ + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withErrorCode 30 + |> withDiagnosticMessageMatches "Value restriction: The value 'typedSeq' has an inferred generic type" + |> withDiagnosticMessageMatches "val typedSeq: '_a seq" -[] -let ``yield may only be used within list, array, and sequence expressions``() = - Fsx """ + [] + let ``yield may only be used within list, array, and sequence expressions``() = + Fsx """ let f1 = yield [ 3; 4 ] let f2 = yield! [ 3; 4 ] - """ - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 747, Line 2, Col 10, Line 2, Col 15, "This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq { ... }', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements"); - (Error 747, Line 3, Col 10, Line 3, Col 16, "This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq { ... }', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements") - ] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 747, Line 2, Col 10, Line 2, Col 15, "This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq { ... }', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements"); + (Error 747, Line 3, Col 10, Line 3, Col 16, "This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq { ... }', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements") + ] -[] -let ``return may only be used within list, array, and sequence expressions``() = - Fsx """ + [] + let ``return may only be used within list, array, and sequence expressions``() = + Fsx """ let f1 = return [ 3; 4 ] let f2 = return! [ 3; 4 ] - """ - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 748, Line 2, Col 10, Line 2, Col 16, "This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'."); - (Error 748, Line 3, Col 10, Line 3, Col 17, "This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'.") - ] - -[] -let ``Sequence(SynExpr.Sequential) expressions should be of the form 'seq { ... } lang version 9``() = - Fsx """ + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 748, Line 2, Col 10, Line 2, Col 16, "This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'."); + (Error 748, Line 3, Col 10, Line 3, Col 17, "This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'.") + ] + + [] + let ``Sequence(SynExpr.Sequential) expressions should be of the form 'seq { ... } lang version 9``() = + Fsx """ { 1;10 } [| { 1;10 } |] let a = { 1;10 } let b = [| { 1;10 } |] let c = [ { 1;10 } ] - """ - |> withOptions [ "--nowarn:0020" ] - |> withLangVersion90 - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 740, Line 2, Col 1, Line 2, Col 9, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 3, Col 4, Line 3, Col 12, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 4, Col 9, Line 4, Col 17, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 5, Col 12, Line 5, Col 20, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 6, Col 11, Line 6, Col 19, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - ] + """ + |> withOptions [ "--nowarn:0020" ] + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 740, Line 2, Col 1, Line 2, Col 9, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 3, Col 4, Line 3, Col 12, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 4, Col 9, Line 4, Col 17, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 5, Col 12, Line 5, Col 20, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 6, Col 11, Line 6, Col 19, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + ] -[] -let ``Sequence(SynExpr.Sequential) expressions should be of the form 'seq { ... } lang version preview``() = - Fsx """ + [] + let ``Sequence(SynExpr.Sequential) expressions should be of the form 'seq { ... } lang version preview``() = + Fsx """ { 1;10 } [| { 1;10 } |] let a = { 1;10 } let b = [| { 1;10 } |] let c = [ { 1;10 } ] - """ - |> withOptions [ "--nowarn:0020" ] - |> withLangVersionPreview - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 740, Line 2, Col 1, Line 2, Col 9, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 3, Col 4, Line 3, Col 12, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 4, Col 9, Line 4, Col 17, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 5, Col 12, Line 5, Col 20, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 6, Col 11, Line 6, Col 19, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - ] - -// SOURCE=E_SequenceExpressions01.fs # E_SequenceExpressions01.fs -[] -let ``E_SequenceExpressions01 lang version 9`` compilation = - compilation - |> withOptions [ "--nowarn:0020" ] - |> withLangVersion90 - |> typecheck - |> shouldSucceed - -// SOURCE=E_SequenceExpressions01.fs # E_SequenceExpressions01.fs -[] -let ``E_SequenceExpressions01 lang version preview`` compilation = - compilation - |> withOptions [ "--nowarn:0020" ] - |> withLangVersionPreview - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Warning 3873, Line 1, Col 1, Line 1, Col 10, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 3, Col 1, Line 3, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 5, Col 4, Line 5, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 7, Col 4, Line 7, Col 16, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 9, Col 9, Line 9, Col 18, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 11, Col 10, Line 11, Col 23, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 13, Col 12, Line 13, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 15, Col 13, Line 15, Col 26, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 17, Col 11, Line 17, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 19, Col 4, Line 19, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 21, Col 10, Line 21, Col 19, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 23, Col 3, Line 23, Col 12, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 25, Col 3, Line 25, Col 16, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 27, Col 9, Line 27, Col 18, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 29, Col 9, Line 29, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 31, Col 13, Line 31, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 33, Col 13, Line 33, Col 26, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 35, Col 34, Line 35, Col 51, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 37, Col 35, Line 37, Col 52, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 39, Col 10, Line 39, Col 19, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 41, Col 10, Line 41, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 45, Col 12, Line 45, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 47, Col 13, Line 47, Col 25, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 49, Col 14, Line 49, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 51, Col 33, Line 51, Col 50, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 55, Col 12, Line 55, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 57, Col 1, Line 57, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 59, Col 28, Line 59, Col 34, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 61, Col 44, Line 61, Col 52, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 61, Col 53, Line 61, Col 61, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 61, Col 62, Line 61, Col 71, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 65, Col 17, Line 65, Col 23, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 65, Col 34, Line 65, Col 44, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 67, Col 7, Line 67, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 67, Col 15, Line 67, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 67, Col 23, Line 67, Col 30, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 69, Col 14, Line 69, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 71, Col 24, Line 71, Col 32, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 73, Col 25, Line 73, Col 33, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 74, Col 25, Line 74, Col 33, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 76, Col 13, Line 76, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - ] - -// SOURCE=SequenceExpressions01.fs # SequenceExpressions01.fs -[] -let ``SequenceExpressions01 lang version 9`` compilation = - compilation - |> withOptions [ "--nowarn:0020" ] - |> withLangVersion90 - |> typecheck - |> shouldSucceed + """ + |> withOptions [ "--nowarn:0020" ] + |> withLangVersionPreview + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 740, Line 2, Col 1, Line 2, Col 9, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 3, Col 4, Line 3, Col 12, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 4, Col 9, Line 4, Col 17, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 5, Col 12, Line 5, Col 20, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 6, Col 11, Line 6, Col 19, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + ] + + // SOURCE=E_SequenceExpressions01.fs # E_SequenceExpressions01.fs + [] + let ``E_SequenceExpressions01 lang version 9`` compilation = + compilation + |> getCompilation + |> withOptions [ "--nowarn:0020" ] + |> withLangVersion90 + |> typecheck + |> shouldSucceed + + // SOURCE=E_SequenceExpressions01.fs # E_SequenceExpressions01.fs + [] + let ``E_SequenceExpressions01 lang version preview`` compilation = + compilation + |> getCompilation + |> withOptions [ "--nowarn:0020" ] + |> withLangVersionPreview + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 3873, Line 1, Col 1, Line 1, Col 10, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 3, Col 1, Line 3, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 5, Col 4, Line 5, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 7, Col 4, Line 7, Col 16, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 9, Col 9, Line 9, Col 18, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 11, Col 10, Line 11, Col 23, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 13, Col 12, Line 13, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 15, Col 13, Line 15, Col 26, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 17, Col 11, Line 17, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 19, Col 4, Line 19, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 21, Col 10, Line 21, Col 19, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 23, Col 3, Line 23, Col 12, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 25, Col 3, Line 25, Col 16, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 27, Col 9, Line 27, Col 18, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 29, Col 9, Line 29, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 31, Col 13, Line 31, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 33, Col 13, Line 33, Col 26, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 35, Col 34, Line 35, Col 51, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 37, Col 35, Line 37, Col 52, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 39, Col 10, Line 39, Col 19, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 41, Col 10, Line 41, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 45, Col 12, Line 45, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 47, Col 13, Line 47, Col 25, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 49, Col 14, Line 49, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 51, Col 33, Line 51, Col 50, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 55, Col 12, Line 55, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 57, Col 1, Line 57, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 59, Col 28, Line 59, Col 34, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 61, Col 44, Line 61, Col 52, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 61, Col 53, Line 61, Col 61, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 61, Col 62, Line 61, Col 71, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 65, Col 17, Line 65, Col 23, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 65, Col 34, Line 65, Col 44, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 67, Col 7, Line 67, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 67, Col 15, Line 67, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 67, Col 23, Line 67, Col 30, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 69, Col 14, Line 69, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 71, Col 24, Line 71, Col 32, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 73, Col 25, Line 73, Col 33, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 74, Col 25, Line 74, Col 33, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 76, Col 13, Line 76, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + ] + + // SOURCE=SequenceExpressions01.fs # SequenceExpressions01.fs + [] + let ``SequenceExpressions01 lang version 9`` compilation = + compilation + |> getCompilation + |> withOptions [ "--nowarn:0020" ] + |> withLangVersion90 + |> typecheck + |> shouldSucceed -// SOURCE=SequenceExpressions01.fs # SequenceExpressions01.fs -[] -let ``SequenceExpressions01 lang version preview`` compilation = - compilation - |> withOptions [ "--nowarn:0020" ] - |> withLangVersionPreview - |> typecheck - |> shouldSucceed \ No newline at end of file + // SOURCE=SequenceExpressions01.fs # SequenceExpressions01.fs + [] + let ``SequenceExpressions01 lang version preview`` compilation = + compilation + |> getCompilation + |> withOptions [ "--nowarn:0020" ] + |> withLangVersionPreview + |> typecheck + |> shouldSucceed \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Miscellaneous/ListLiterals.fs b/tests/FSharp.Compiler.ComponentTests/Miscellaneous/ListLiterals.fs index 8c560628592..c866b61212d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Miscellaneous/ListLiterals.fs +++ b/tests/FSharp.Compiler.ComponentTests/Miscellaneous/ListLiterals.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace Miscellaneous @@ -8,9 +8,10 @@ open FSharp.Test.Compiler module ListLiterals = - [] + [] let ``List literals still have limited length in langversion 6`` compilation = compilation + |> getCompilation |> asFsx |> withLangVersion60 |> compile @@ -18,9 +19,10 @@ module ListLiterals = |> withErrorCode 742 |> withDiagnosticMessageMatches "This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList." - [] + [] let ``List literals have no limited length in langversion preview`` compilation = compilation + |> getCompilation |> asFsx |> withLangVersion70 |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/OCamlCompat/OCamlCompat.fs b/tests/FSharp.Compiler.ComponentTests/OCamlCompat/OCamlCompat.fs index f3155e4c5cb..0e880debc61 100644 --- a/tests/FSharp.Compiler.ComponentTests/OCamlCompat/OCamlCompat.fs +++ b/tests/FSharp.Compiler.ComponentTests/OCamlCompat/OCamlCompat.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module ``OCamlCompat test cases`` = // SOURCE=E_IndentOff01.fs COMPILE_ONLY=1 SCFLAGS="--warnaserror --test:ErrorRanges" # E_IndentOff01.fs - [] + [] let ``E_IndentOff01_fs --warnaserror --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -21,9 +22,10 @@ module ``OCamlCompat test cases`` = ] - [] + [] let ``IndentOff02_fs --warnaserror"; "--mlcompatibility`` compilation = compilation + |> getCompilation |> asFsx |> withOcamlCompat |> withLangVersion50 @@ -32,9 +34,10 @@ module ``OCamlCompat test cases`` = //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'\.$ - [] + [] let ``W_IndentOff03_fs --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -45,9 +48,10 @@ module ``OCamlCompat test cases`` = //NoMT SOURCE=IndentOff04.fsx COMPILE_ONLY=1 SCFLAGS="--warnaserror --mlcompatibility" FSIMODE=PIPE # IndentOff04.fsx - [] + [] let ``IndentOff04_fsx --warnaserror --mlcompatibility`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> withOcamlCompat @@ -59,9 +63,10 @@ module ``OCamlCompat test cases`` = //NoMT SOURCE=W_IndentOff05.fsx COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" FSIMODE=PIPE # W_IndentOff05.fsx - [] + [] let ``W_IndentOff05_fsx --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -72,9 +77,10 @@ module ``OCamlCompat test cases`` = //NoMT SOURCE=E_IndentOff06.fsx COMPILE_ONLY=1 SCFLAGS="--warnaserror" FSIMODE=PIPE # E_IndentOff06.fsx - [] + [] let ``E_IndentOff06_fsx --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -85,18 +91,20 @@ module ``OCamlCompat test cases`` = // SOURCE=E_mlExtension01.ml COMPILE_ONLY=1 SCFLAGS="--warnaserror --test:ErrorRanges" # E_mlExtension01.ml - [] + [] let ``E_mlExtension01_ml --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed // SOURCE=mlExtension02.ml COMPILE_ONLY=1 SCFLAGS="--warnaserror --mlcompatibility" # mlExtension02.ml - [] + [] let ``mlExtension02_ml --warnaserror --mlcompatibility`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror"; "--mlcompatibility"] |> withLangVersion50 @@ -105,9 +113,10 @@ module ``OCamlCompat test cases`` = // SOURCE=W_mlExtension03.ml COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # W_mlExtension03.ml - [] + [] let `` W_mlExtension03_ml --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--test:ErrorRanges"] |> compile @@ -115,9 +124,10 @@ module ``OCamlCompat test cases`` = // SOURCE=Hat01.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # Hat01.fs - [] + [] let ``Hat01_fs --warnaserror --mlcompatibility`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror"; "--mlcompatibility"] |> withLangVersion50 @@ -126,9 +136,10 @@ module ``OCamlCompat test cases`` = // SOURCE=W_Hat01.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # W_Hat01.fs - [] + [] let ``W_Hat01_fs --warnaserror --mlcompatibility`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--test:ErrorRanges"; "--mlcompatibility"] |> withLangVersion50 @@ -137,18 +148,20 @@ module ``OCamlCompat test cases`` = // SOURCE=NoParensInLet01.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # NoParensInLet01.fs - [] + [] let ``NoParensInLet01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=W_MultiArgumentGenericType.fs # W_MultiArgumentGenericType.fs - [] + [] let ``W_MultiArgumentGenericType_fs``compilation = compilation + |> getCompilation |> asExe |> ignoreWarnings |> compile @@ -159,9 +172,10 @@ module ``OCamlCompat test cases`` = // SOURCE=OCamlStyleArrayIndexing.fs SCFLAGS="--mlcompatibility" # OCamlStyleArrayIndexing.fs - [] + [] let ``OCamlStyleArrayIndexing_fs --mlcompatibility`` compilation = compilation + |> getCompilation |> asExe |> withOcamlCompat |> withLangVersion50 From 26f710b99bd33d8e1847bce97658d4bf7c76bd7b Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Wed, 8 Jan 2025 05:35:03 -0800 Subject: [PATCH 05/21] Even more tests (#18197) Co-authored-by: Petr --- .../AssemblyBoundary/AssemblyBoundary.fs | 18 +- .../AsyncExpressionStepping.fs | 72 +- .../AttributeTargets/AttributeTargets.fs | 36 +- .../CCtorDUWithMember/CCtorDUWithMember.fs | 60 +- .../CompiledNameAttribute.fs | 22 +- ...atureOff.fs => CompiledNameAttribute04.fs} | 0 ...lInternalSignatureOff.il.net472.debug.bsl} | 0 ...nternalSignatureOff.il.net472.release.bsl} | 0 ...InternalSignatureOff.il.netcore.debug.bsl} | 0 ...ternalSignatureOff.il.netcore.release.bsl} | 0 ...ternalSignatureOn.fs.il.netcore.debug.bsl} | 0 ...alInternalSignatureOn.il.net472.debug.bsl} | 0 ...InternalSignatureOn.il.net472.release.bsl} | 0 ...nternalSignatureOn.il.netcore.release.bsl} | 0 ...NameAttribute04_RealInternalSignatureOn.fs | 51 - .../ComputationExpressions.fs | 85 +- .../ComputedCollections.fs | 39 +- .../ForXInArray_ToArray.fs.il.bsl | 1062 ++++++++--------- .../DoNotBoxStruct/DoNotBoxStruct.fs | 39 +- ...alInternalSignatureOff.fs => GenIter04.fs} | 0 ...Iter04.fs.RealInternalSignatureOff.il.bsl} | 0 ...nIter04.fs.RealInternalSignatureOn.il.bsl} | 0 .../GenIter04_RealInternalSignatureOn.fs | 4 - .../GeneratedIterators/GeneratedIterators.fs | 22 +- .../GenericComparison/GenericComparison.fs | 138 ++- .../InequalityComparison.fs | 15 +- .../EmittedIL/Inlining/Inlining.fs | 20 +- ...RealInternalSignatureOff.fs => Match01.fs} | 0 ...lInternalSignatureOff.il.net472.debug.bsl} | 0 ...nternalSignatureOff.il.net472.release.bsl} | 0 ...InternalSignatureOff.il.netcore.debug.bsl} | 0 ...ternalSignatureOff.il.netcore.release.bsl} | 0 ...alInternalSignatureOn.il.net472.debug.bsl} | 0 ...InternalSignatureOn.il.net472.release.bsl} | 0 ...lInternalSignatureOn.il.netcore.debug.bsl} | 0 ...nternalSignatureOn.il.netcore.release.bsl} | 0 .../Match01_RealInternalSignatureOn.fs | 18 - .../ListExpressionStepping.fs | 69 +- .../MethodImplAttribute.fs | 30 +- .../EmittedIL/Misc/ForLoop01.fs | 6 - ...rLoop01.fs.RealInternalSignatureOff.il.bsl | 115 -- ...orLoop01.fs.RealInternalSignatureOn.il.bsl | 144 --- .../EmittedIL/Misc/ForLoop02.fs | 7 - ...rLoop02.fs.RealInternalSignatureOff.il.bsl | 90 -- ...orLoop02.fs.RealInternalSignatureOn.il.bsl | 109 -- .../EmittedIL/Misc/ForLoop03.fs | 14 - ....fs.RealInternalSignatureOff.il.net472.bsl | 173 --- ...fs.RealInternalSignatureOff.il.netcore.bsl | 167 --- ...3.fs.RealInternalSignatureOn.il.net472.bsl | 189 --- ....fs.RealInternalSignatureOn.il.netcore.bsl | 183 --- ...enElse01.fs.RealInternalSignatureOn.il.bsl | 54 +- .../EmittedIL/Misc/Misc.fs | 284 +---- .../EmittedIL/Nullness/NullnessMetadata.fs | 381 +++--- .../EmittedIL/Platform/Platform.fs | 50 +- .../QueryExpressionStepping.fs | 129 +- .../SeqExpressionStepping.fs | 91 +- .../SeqExpressionTailCalls.fs | 6 +- .../SerializableAttribute.fs | 53 +- .../EmittedIL/StaticInit/StaticInit.fs | 52 +- .../EmittedIL/SteppingMatch/SteppingMatch.fs | 27 +- .../StringEncoding/StringEncoding.fs | 11 +- ...atsAndDoubles_1.fs => FloatsAndDoubles.fs} | 0 ....fs.RealInternalSignatureOff.il.debug.bsl} | 0 ...s.RealInternalSignatureOff.il.release.bsl} | 0 ...s.fs.RealInternalSignatureOn.il.debug.bsl} | 0 ...fs.RealInternalSignatureOn.il.release.bsl} | 0 .../EmittedIL/Structure/FloatsAndDoubles_2.fs | 39 - .../Structure/StructFieldEquality.fs | 3 +- .../EmittedIL/Structure/Structure.fs | 88 +- ...nalSignatureOff.fs => TestFunction09b4.fs} | 0 ...on09b4.fs.RealInternalSignatureOff.il.bsl} | 0 ...ion09b4.fs.RealInternalSignatureOn.il.bsl} | 0 ...estFunction09b4_RealInternalSignatureOn.fs | 14 - ...ernalSignatureOff.fs => TestFunction22.fs} | 0 ...fs.RealInternalSignatureOff.il.net472.bsl} | 0 ...s.RealInternalSignatureOff.il.netcore.bsl} | 0 ....fs.RealInternalSignatureOn.il.net472.bsl} | 0 ...fs.RealInternalSignatureOn.il.netcore.bsl} | 0 .../TestFunction22_RealInternalSignatureOn.fs | 3 - ...rnalSignatureOff.fs => TestFunction22b.fs} | 0 ...fs.RealInternalSignatureOff.il.net472.bsl} | 0 ...s.RealInternalSignatureOff.il.netcore.bsl} | 0 ....fs.RealInternalSignatureOn.il.net472.bsl} | 0 ...fs.RealInternalSignatureOn.il.netcore.bsl} | 0 ...TestFunction22b_RealInternalSignatureOn.fs | 3 - ...rnalSignatureOff.fs => TestFunction22c.fs} | 0 ...fs.RealInternalSignatureOff.il.net472.bsl} | 0 ...s.RealInternalSignatureOff.il.netcore.bsl} | 0 ....fs.RealInternalSignatureOn.il.net472.bsl} | 0 ...fs.RealInternalSignatureOn.il.netcore.bsl} | 0 ...TestFunction22c_RealInternalSignatureOn.fs | 3 - ...rnalSignatureOff.fs => TestFunction22d.fs} | 0 ...fs.RealInternalSignatureOff.il.net472.bsl} | 0 ...s.RealInternalSignatureOff.il.netcore.bsl} | 0 ....fs.RealInternalSignatureOn.il.net472.bsl} | 0 ...fs.RealInternalSignatureOn.il.netcore.bsl} | 0 ...TestFunction22d_RealInternalSignatureOn.fs | 3 - ...rnalSignatureOff.fs => TestFunction22e.fs} | 0 ...fs.RealInternalSignatureOff.il.net472.bsl} | 0 ...s.RealInternalSignatureOff.il.netcore.bsl} | 0 ....fs.RealInternalSignatureOn.il.net472.bsl} | 0 ...fs.RealInternalSignatureOn.il.netcore.bsl} | 0 ...TestFunction22e_RealInternalSignatureOn.fs | 4 - ...rnalSignatureOff.fs => TestFunction22f.fs} | 0 ...fs.RealInternalSignatureOff.il.net472.bsl} | 0 ...s.RealInternalSignatureOff.il.netcore.bsl} | 0 ...tion22f.fs.RealInternalSignatureOn.il.bsl} | 0 ....fs.RealInternalSignatureOn.il.net472.bsl} | 0 ...s.RealInternalSignatureOn.il.netcore .bsl} | 0 ...TestFunction22f_RealInternalSignatureOn.fs | 5 - ...rnalSignatureOff.fs => TestFunction22g.fs} | 0 ...fs.RealInternalSignatureOff.il.net472.bsl} | 0 ...s.RealInternalSignatureOff.il.netcore.bsl} | 0 ....fs.RealInternalSignatureOn.il.net472.bsl} | 0 ...fs.RealInternalSignatureOn.il.netcore.bsl} | 0 ...TestFunction22g_RealInternalSignatureOn.fs | 3 - ...rnalSignatureOff.fs => TestFunction22h.fs} | 0 ...fs.RealInternalSignatureOff.il.net472.bsl} | 0 ...s.RealInternalSignatureOff.il.netcore.bsl} | 0 ...tion22h.fs.RealInternalSignatureOn.il.bsl} | 0 ....fs.RealInternalSignatureOn.il.net472.bsl} | 0 ...s.RealInternalSignatureOn.il.netcore .bsl} | 0 ...TestFunction22h_RealInternalSignatureOn.fs | 37 - .../EmittedIL/TestFunctions/TestFunctions.fs | 256 ++-- ...InternalSignatureOff.fs => Verify13043.fs} | 0 ...ealInternalSignatureOff.OptimizeOff.il.bsl | 391 ++++++ ...RealInternalSignatureOff.OptimizeOn.il.bsl | 391 ++++++ ....fs.RealInternalSignatureOff.il.debug.bsl} | 0 ...s.RealInternalSignatureOff.il.release.bsl} | 0 ...RealInternalSignatureOn.OptimizeOff.il.bsl | 391 ++++++ ....RealInternalSignatureOn.OptimizeOn.il.bsl | 391 ++++++ ...3.fs.RealInternalSignatureOn.il.debug.bsl} | 0 ...fs.RealInternalSignatureOn.il.release.bsl} | 0 .../Verify13043_RealInternalSignatureOn.fs | 44 - .../EmittedIL/TryCatch/TryCatch.fs | 118 +- .../Tuple06.fs.RealInternalSignatureOn.il.bsl | 12 +- .../EmittedIL/Tuples/Tuples.fs | 119 +- .../EmittedIL/operators/Operators.fs | 14 +- ...lSignatureOff.fs => decimal_comparison.fs} | 0 ...lInternalSignatureOff.il.net472.debug.bsl} | 14 +- ...nternalSignatureOff.il.net472.release.bsl} | 14 +- ...InternalSignatureOff.il.netcore.debug.bsl} | 14 +- ...ternalSignatureOff.il.netcore.release.bsl} | 16 +- ...alInternalSignatureOn.il.net472.debug.bsl} | 20 +- ...InternalSignatureOn.il.net472.release.bsl} | 20 +- ...lInternalSignatureOn.il.netcore.debug.bsl} | 20 +- ...nternalSignatureOn.il.netcore.release.bsl} | 22 +- ...imal_comparison_RealInternalSignatureOn.fs | 11 - 148 files changed, 3096 insertions(+), 3522 deletions(-) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/{CompiledNameAttribute04_RealInternalSignatureOff.fs => CompiledNameAttribute04.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/{CompiledNameAttribute04_RealInternalSignatureOff.fs.il.net472.debug.bsl => CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/{CompiledNameAttribute04_RealInternalSignatureOff.fs.il.net472.release.bsl => CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.release.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/{CompiledNameAttribute04_RealInternalSignatureOff.fs.il.netcore.debug.bsl => CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/{CompiledNameAttribute04_RealInternalSignatureOff.fs.il.netcore.release.bsl => CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.release.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/{CompiledNameAttribute04_RealInternalSignatureOn.fs.il.netcore.debug.bsl => CompiledNameAttribute04.fs.RealInternalSignatureOn.fs.il.netcore.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/{CompiledNameAttribute04_RealInternalSignatureOn.fs.il.net472.debug.bsl => CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/{CompiledNameAttribute04_RealInternalSignatureOn.fs.il.net472.release.bsl => CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.release.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/{CompiledNameAttribute04_RealInternalSignatureOn.fs.il.netcore.release.bsl => CompiledNameAttribute04.fs.RealInternalSignatureOn.il.netcore.release.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/{GenIter04_RealInternalSignatureOff.fs => GenIter04.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/{GenIter04_RealInternalSignatureOff.fs.il.bsl => GenIter04.fs.RealInternalSignatureOff.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/{GenIter04_RealInternalSignatureOn.fs.il.bsl => GenIter04.fs.RealInternalSignatureOn.il.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/{Match01_RealInternalSignatureOff.fs => Match01.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/{Match01_RealInternalSignatureOff.fs.il.net472.debug.bsl => Match01.fs.RealInternalSignatureOff.il.net472.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/{Match01_RealInternalSignatureOff.fs.il.net472.release.bsl => Match01.fs.RealInternalSignatureOff.il.net472.release.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/{Match01_RealInternalSignatureOff.fs.il.netcore.debug.bsl => Match01.fs.RealInternalSignatureOff.il.netcore.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/{Match01_RealInternalSignatureOff.fs.il.netcore.release.bsl => Match01.fs.RealInternalSignatureOff.il.netcore.release.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/{Match01_RealInternalSignatureOn.fs.il.net472.debug.bsl => Match01.fs.RealInternalSignatureOn.il.net472.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/{Match01_RealInternalSignatureOn.fs.il.net472.release.bsl => Match01.fs.RealInternalSignatureOn.il.net472.release.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/{Match01_RealInternalSignatureOn.fs.il.netcore.debug.bsl => Match01.fs.RealInternalSignatureOn.il.netcore.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/{Match01_RealInternalSignatureOn.fs.il.netcore.release.bsl => Match01.fs.RealInternalSignatureOn.il.netcore.release.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOff.il.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOn.il.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOff.il.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOn.il.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.net472.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.netcore.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.net472.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.netcore.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/{FloatsAndDoubles_1.fs => FloatsAndDoubles.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/{FloatsAndDoubles_1.fs.il.debug.bsl => FloatsAndDoubles.fs.RealInternalSignatureOff.il.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/{FloatsAndDoubles_1.fs.il.release.bsl => FloatsAndDoubles.fs.RealInternalSignatureOff.il.release.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/{FloatsAndDoubles_2.fs.il.debug.bsl => FloatsAndDoubles.fs.RealInternalSignatureOn.il.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/{FloatsAndDoubles_2.fs.il.release.bsl => FloatsAndDoubles.fs.RealInternalSignatureOn.il.release.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction09b4_RealInternalSignatureOff.fs => TestFunction09b4.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction09b4_RealInternalSignatureOff.fs.il.bsl => TestFunction09b4.fs.RealInternalSignatureOff.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction09b4_RealInternalSignatureOn.fs.il.bsl => TestFunction09b4.fs.RealInternalSignatureOn.il.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22_RealInternalSignatureOff.fs => TestFunction22.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22_RealInternalSignatureOff.fs.il.net472.bsl => TestFunction22.fs.RealInternalSignatureOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22_RealInternalSignatureOff.fs.il.netcore.bsl => TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22_RealInternalSignatureOn.fs.il.net472.bsl => TestFunction22.fs.RealInternalSignatureOn.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22_RealInternalSignatureOn.fs.il.netcore.bsl => TestFunction22.fs.RealInternalSignatureOn.il.netcore.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22b_RealInternalSignatureOff.fs => TestFunction22b.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22b_RealInternalSignatureOff.fs.il.net472.bsl => TestFunction22b.fs.RealInternalSignatureOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22b_RealInternalSignatureOff.fs.il.netcore.bsl => TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22b_RealInternalSignatureOn.fs.il.net472.bsl => TestFunction22b.fs.RealInternalSignatureOn.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22b_RealInternalSignatureOn.fs.il.netcore.bsl => TestFunction22b.fs.RealInternalSignatureOn.il.netcore.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22c_RealInternalSignatureOff.fs => TestFunction22c.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22c_RealInternalSignatureOff.fs.il.net472.bsl => TestFunction22c.fs.RealInternalSignatureOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22c_RealInternalSignatureOff.fs.il.netcore.bsl => TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22c_RealInternalSignatureOn.fs.il.net472.bsl => TestFunction22c.fs.RealInternalSignatureOn.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22c_RealInternalSignatureOn.fs.il.netcore.bsl => TestFunction22c.fs.RealInternalSignatureOn.il.netcore.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22d_RealInternalSignatureOff.fs => TestFunction22d.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22d_RealInternalSignatureOff.fs.il.net472.bsl => TestFunction22d.fs.RealInternalSignatureOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22d_RealInternalSignatureOff.fs.il.netcore.bsl => TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22d_RealInternalSignatureOn.fs.il.net472.bsl => TestFunction22d.fs.RealInternalSignatureOn.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22d_RealInternalSignatureOn.fs.il.netcore.bsl => TestFunction22d.fs.RealInternalSignatureOn.il.netcore.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22e_RealInternalSignatureOff.fs => TestFunction22e.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22e_RealInternalSignatureOff.fs.il.net472.bsl => TestFunction22e.fs.RealInternalSignatureOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22e_RealInternalSignatureOff.fs.il.netcore.bsl => TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22e_RealInternalSignatureOn.fs.il.net472.bsl => TestFunction22e.fs.RealInternalSignatureOn.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22e_RealInternalSignatureOn.fs.il.netcore.bsl => TestFunction22e.fs.RealInternalSignatureOn.il.netcore.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f_RealInternalSignatureOff.fs => TestFunction22f.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f_RealInternalSignatureOff.fs.il.net472.bsl => TestFunction22f.fs.RealInternalSignatureOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f_RealInternalSignatureOff.fs.il.netcore.bsl => TestFunction22f.fs.RealInternalSignatureOff.il.netcore.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f_RealInternalSignatureOn.fs.il.bsl => TestFunction22f.fs.RealInternalSignatureOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f_RealInternalSignatureOn.fs.il.net472.bsl => TestFunction22f.fs.RealInternalSignatureOn.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f_RealInternalSignatureOn.fs.il.netcore .bsl => TestFunction22f.fs.RealInternalSignatureOn.il.netcore .bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22g_RealInternalSignatureOff.fs => TestFunction22g.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22g_RealInternalSignatureOff.fs.il.net472.bsl => TestFunction22g.fs.RealInternalSignatureOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22g_RealInternalSignatureOff.fs.il.netcore.bsl => TestFunction22g.fs.RealInternalSignatureOff.il.netcore.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22g_RealInternalSignatureOn.fs.il.net472.bsl => TestFunction22g.fs.RealInternalSignatureOn.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22g_RealInternalSignatureOn.fs.il.netcore.bsl => TestFunction22g.fs.RealInternalSignatureOn.il.netcore.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h_RealInternalSignatureOff.fs => TestFunction22h.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h_RealInternalSignatureOff.fs.il.net472.bsl => TestFunction22h.fs.RealInternalSignatureOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h_RealInternalSignatureOff.fs.il.netcore.bsl => TestFunction22h.fs.RealInternalSignatureOff.il.netcore.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h_RealInternalSignatureOn.fs.il.bsl => TestFunction22h.fs.RealInternalSignatureOn.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h_RealInternalSignatureOn.fs.il.net472.bsl => TestFunction22h.fs.RealInternalSignatureOn.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h_RealInternalSignatureOn.fs.il.netcore .bsl => TestFunction22h.fs.RealInternalSignatureOn.il.netcore .bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{Verify13043_RealInternalSignatureOff.fs => Verify13043.fs} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{Verify13043_RealInternalSignatureOff.fs.il.debug.bsl => Verify13043.fs.RealInternalSignatureOff.il.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{Verify13043_RealInternalSignatureOff.fs.il.release.bsl => Verify13043.fs.RealInternalSignatureOff.il.release.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{Verify13043_RealInternalSignatureOn.fs.il.debug.bsl => Verify13043.fs.RealInternalSignatureOn.il.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{Verify13043_RealInternalSignatureOn.fs.il.release.bsl => Verify13043.fs.RealInternalSignatureOn.il.release.bsl} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/{decimal_comparison_RealInternalSignatureOff.fs => decimal_comparison.fs} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/{decimal_comparison_RealInternalSignatureOff.fs.il.netcore.debug.bsl => decimal_comparison.fs.RealInternalSignatureOff.il.net472.debug.bsl} (97%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/{decimal_comparison_RealInternalSignatureOff.fs.il.net472.debug.bsl => decimal_comparison.fs.RealInternalSignatureOff.il.net472.release.bsl} (97%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/{decimal_comparison_RealInternalSignatureOff.fs.il.netcore.release.bsl => decimal_comparison.fs.RealInternalSignatureOff.il.netcore.debug.bsl} (97%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/{decimal_comparison_RealInternalSignatureOff.fs.il.net472.release.bsl => decimal_comparison.fs.RealInternalSignatureOff.il.netcore.release.bsl} (97%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/{decimal_comparison_RealInternalSignatureOn.fs.il.netcore.debug.bsl => decimal_comparison.fs.RealInternalSignatureOn.il.net472.debug.bsl} (96%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/{decimal_comparison_RealInternalSignatureOn.fs.il.net472.debug.bsl => decimal_comparison.fs.RealInternalSignatureOn.il.net472.release.bsl} (96%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/{decimal_comparison_RealInternalSignatureOn.fs.il.netcore.release.bsl => decimal_comparison.fs.RealInternalSignatureOn.il.netcore.debug.bsl} (96%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/{decimal_comparison_RealInternalSignatureOn.fs.il.net472.release.bsl => decimal_comparison.fs.RealInternalSignatureOn.il.netcore.release.bsl} (96%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/AssemblyBoundary.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/AssemblyBoundary.fs index 011afc282a7..c1a38c2b6fa 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/AssemblyBoundary.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/AssemblyBoundary.fs @@ -17,7 +17,7 @@ module AssemblyBoundary = //NoMT SOURCE=test01.fs SCFLAGS="--optimize+ -r:lib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib01.fs" # test01.fs - [] + [] let ``test01_fs`` compilation = let lib01 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib01.fs")) @@ -25,11 +25,12 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [lib01] |> verifyCompileAndExecution //NoMT SOURCE=test01.fs SCFLAGS="--optimize+ -r:lib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib01.fs" # test01.fs - [] + [] let ``test02_fs`` compilation = let lib02 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib02.fs")) @@ -37,11 +38,12 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [lib02] |> verifyCompileAndExecution //NoMT SOURCE=test03.fs SCFLAGS="--optimize+ -r:lib03.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib03.fs" # test03.fs - [] + [] let ``test03_fs`` compilation = let lib03 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib03.fs")) @@ -49,11 +51,12 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [lib03] |> verifyCompileAndExecution //NoMT SOURCE=test04.fs SCFLAGS="--optimize+ -r:lib04.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib04.fs" # test04.fs - [] + [] let ``test04_fs`` compilation = let lib04 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib04.fs")) @@ -61,12 +64,13 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [lib04] |> verifyCompileAndExecution // SOURCE=InlineWithPrivateValues01.fs SCFLAGS="-r:TypeLib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ TypeLib01.fs" # InlineWithPrivateValuesStruct - [] + [] let ``InlineWithPrivateValues01_fs_TypeLib01_fs`` compilation = let typeLib01 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "TypeLib01.fs")) @@ -74,11 +78,12 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [typeLib01] |> verifyCompileAndExecution // SOURCE=InlineWithPrivateValues01.fs SCFLAGS="-r:TypeLib02.dll" PRECMD="\$FSC_PIPE -a --optimize+ TypeLib02.fs" # InlineWithPrivateValuesRef - [] + [] let ``InlineWithPrivateValues01_fs_TypeLib02_fs`` compilation = let typeLib02 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "TypeLib02.fs")) @@ -86,6 +91,7 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [typeLib02] |> verifyCompileAndExecution diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs index 89c1c62c7c0..70515578357 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs @@ -17,74 +17,38 @@ module AsyncExpressionStepping = |> verifyBaseline |> verifyILBaseline - [] - let ``AsyncExpressionSteppingTest1_RealInternalSignatureOn_fs`` compilation = + [] + let ``AsyncExpressionSteppingTest1_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - [] - let ``AsyncExpressionSteppingTest1_RealInternalSignatureOff_fs`` compilation = + [] + let ``AsyncExpressionSteppingTest2`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - [] - let ``AsyncExpressionSteppingTest2_RealInternalSignatureOnfs`` compilation = + [] + let ``AsyncExpressionSteppingTest3_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - [] - let ``AsyncExpressionSteppingTest2_RealInternalSignatureOff_fs`` compilation = + [] + let ``AsyncExpressionSteppingTest4_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - [] - let ``AsyncExpressionSteppingTest3_RealInternalSignatureOn_fs`` compilation = + [] + let ``AsyncExpressionSteppingTest5_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - [] - let ``AsyncExpressionSteppingTest3_RealInternalSignatureOff_fs`` compilation = + [] + let ``AsyncExpressionSteppingTest6_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest4_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest4_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest5_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest5_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest6_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest6_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs index 199fb7bda05..31831155036 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs @@ -17,38 +17,20 @@ module AttributeTargets = |> verifyBaseline |> verifyILBaseline - [] - let ``Default_RealInternalSignatureOn_fs`` compilation = + [] + let ``Default_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - [] - let ``Default_RealInternalSignatureOff_fs`` compilation = + [] + let ``Field_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - [] - let ``Field_RealInternalSignatureOn_fs`` compilation = + [] + let ``Property_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``Field_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - [] - let ``Property_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``Property_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs index 79dc02b6c4c..3c496e7dfbb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs @@ -17,74 +17,38 @@ module CCtorDUWithMember = |> verifyBaseline |> verifyILBaseline - [] - let ``CCtorDUWithMember01a_RealInternalSignatureOn_fs`` compilation = + [] + let ``CCtorDUWithMember01a_fs`` compilation = compilation + |> getCompilation |> asFs - |> withRealInternalSignatureOn |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember01.fs")) |> verifyCompilation - [] - let ``CCtorDUWithMember01a_RealInternalSignatureOff_fs`` compilation = + [] + let ``CCtorDUWithMember02a_fs`` compilation = compilation - |> asFs - |> withRealInternalSignatureOff - |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember01.fs")) - |> verifyCompilation - - [] - let ``CCtorDUWithMember02a_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> asFs |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember02.fs")) |> verifyCompilation - [] - let ``CCtorDUWithMember02a_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asFs - |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember02.fs")) - |> verifyCompilation - - [] - let ``CCtorDUWithMember03a_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asFs - |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember03.fs")) - |> verifyCompilation - - [] - let ``CCtorDUWithMember03a_RealInternalSignatureOff_fs`` compilation = + [] + let ``CCtorDUWithMember03a_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asFs |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember03.fs")) |> verifyCompilation - [] - let ``CCtorDUWithMember04a_RealInternalSignatureOn_fs`` compilation = + [] + let ``CCtorDUWithMember04a_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> asFs |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember04.fs")) |> verifyCompilation - [] - let ``CCtorDUWithMember04a_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asFs - |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember04.fs")) - |> verifyCompilation - - let withRealInternalSignature realSig compilation = - compilation - |> withOptions [if realSig then "--realsig+" else "--realsig-" ] - [] // RealSig [] // Regular [] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs index 7821dd195d0..12dadfdb824 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs @@ -18,36 +18,34 @@ module CompiledNameAttribute = |> verifyBaseline |> verifyILBaseline - [] + [] let ``CompiledNameAttribute01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``CompiledNameAttribute02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``CompiledNameAttribute03_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``CompiledNameAttribute04_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - [] - let ``CompiledNameAttribute04_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - [] + [] let ``CompiledNameAttribute05_fs`` compilation = compilation + |> getCompilation |> asFs |> asExe |> withEmbeddedPdb diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.fs.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.fs.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.netcore.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.netcore.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs deleted file mode 100644 index 24c007eee73..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs +++ /dev/null @@ -1,51 +0,0 @@ -// #Regression #NoMono #NoMT #CodeGen #EmittedIL #Attributes -// Regression test for FSharp1.0:4740 -// Title: Expose currying information in F# compiled form - -// Regression test for FSharp1.0:4661 -// Title: PreserveSigAttribute pseudo-custom attribute on COM interop interfaces does not compile correctly - -// 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 - - -let f1 x y = x + y -let f2 x = x - -[] -type C() = - member this.P = 1 - member this.M1 x y = x + y - [] - member this.M2 x = x - - abstract A1 : int -> int -> int - abstract A2 : int -> int - - -type IInterface = - interface - [] - abstract SomeMethod : int -> int - end - - -type S = - struct - [] - member this.M1 x = x - end - - -type ITestInterface = - interface - abstract M : int -> int - end - -let a = { new ITestInterface with - [] - member this.M x = x + 1 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs index 14a4a7e4270..b6520a2f363 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs @@ -32,87 +32,44 @@ module ComputationExpressions = |> ignoreWarnings |> verifyILBaseline - [] - let ``ComputationExpr01_realsig=true`` compilation = + [] + let ``ComputationExpr01_fs`` compilation = compilation - |> withRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr01_realsig=false`` compilation = + [] + let ``ComputationExpr02_fs`` compilation = compilation - |> withoutRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr02_realsig=true`` compilation = - compilation - |> withRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr02_realsig=false`` compilation = - compilation - |> withoutRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr03_realsig=true`` compilation = + [] + let ``ComputationExpr03_fs`` compilation = compilation - |> withRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr03_realsig=false`` compilation = - compilation - |> withoutRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr04_realsig=true`` compilation = - compilation - |> withRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr04_realsig=false`` compilation = - compilation - |> withoutRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr05_realsig=true`` compilation = - compilation - |> withRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr05_realsig=false`` compilation = + [] + let ``ComputationExpr04_fs`` compilation = compilation - |> withoutRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr06_realsig=true`` compilation = + [] + let ``ComputationExpr05_fs`` compilation = compilation - |> withRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr06_realsig=false`` compilation = + [] + let ``ComputationExpr06_fs`` compilation = compilation - |> withoutRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr07_realsig=true`` compilation = + [] + let ``ComputationExpr07_fs`` compilation = compilation - |> withRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr07_realsig=false`` compilation = - compilation - |> withoutRealInternalSignature - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs index 6b4788a5103..ebc7634013a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs @@ -8,68 +8,79 @@ module ComputedCollections = let verifyCompilation compilation = compilation |> asExe - |> withOptimize |> withEmbeddedPdb |> withEmbedAllSource |> ignoreWarnings |> verifyILBaseline - [] - let ``Int32RangeArrays_fs`` compilation = + [] + let Int32RangeArrays_fs (compilation: CompilationHelper) = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``Int32RangeLists_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``UInt64RangeArrays_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``UInt64RangeLists_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``ForNInRangeArrays_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``ForNInRangeLists_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``ForXInArray_ToArray_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``ForXInArray_ToList_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``ForXInList_ToArray_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``ForXInList_ToList_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``ForXInSeq_ToArray_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``ForXInSeq_ToList_fs`` compilation = compilation + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl index 2096075e184..f0ff9a65a6e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl @@ -1789,537 +1789,537 @@ } .method public static int8[] '[|for x in sbyteArray -> x|]'(int8[] xs) cil managed - { - - .maxstack 6 - .locals init (int8[] V_0, - int8[] V_1, - int32 V_2, - int8 V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.SByte - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i1 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i1 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static uint8[] '[|for x in byteArray -> x|]'(uint8[] xs) cil managed - { - - .maxstack 6 - .locals init (uint8[] V_0, - uint8[] V_1, - int32 V_2, - uint8 V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Byte - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.u1 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i1 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static int16[] '[|for x in int16Array -> x|]'(int16[] xs) cil managed - { - - .maxstack 6 - .locals init (int16[] V_0, - int16[] V_1, - int32 V_2, - int16 V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int16 - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i2 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i2 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static uint16[] '[|for x in uint16Array -> x|]'(uint16[] xs) cil managed - { - - .maxstack 6 - .locals init (uint16[] V_0, - uint16[] V_1, - int32 V_2, - uint16 V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.UInt16 - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.u2 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i2 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static char[] '[|for x in charArray -> x|]'(char[] xs) cil managed - { - - .maxstack 6 - .locals init (char[] V_0, - char[] V_1, - int32 V_2, - char V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Char - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.u2 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i2 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static int32[] '[|for x in intArray -> x|]'(int32[] xs) cil managed - { - - .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, - int32 V_2, - int32 V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i4 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static uint32[] '[|for x in uintArray -> x|]'(uint32[] xs) cil managed - { - - .maxstack 6 - .locals init (uint32[] V_0, - uint32[] V_1, - int32 V_2, - uint32 V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.UInt32 - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.u4 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static int64[] '[|for x in int64Array -> x|]'(int64[] xs) cil managed - { - - .maxstack 6 - .locals init (int64[] V_0, - int64[] V_1, - int32 V_2, - int64 V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int64 - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i8 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i8 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static uint64[] '[|for x in uint64Array -> x|]'(uint64[] xs) cil managed - { - - .maxstack 6 - .locals init (uint64[] V_0, - uint64[] V_1, - int32 V_2, - uint64 V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.UInt64 - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i8 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i8 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static native int[] '[|for x in nativeintArray -> x|]'(native int[] xs) cil managed - { - - .maxstack 6 - .locals init (native int[] V_0, - native int[] V_1, - int32 V_2, - native int V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.IntPtr - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static native uint[] '[|for x in unativeintArray -> x|]'(native uint[] xs) cil managed - { - - .maxstack 6 - .locals init (native uint[] V_0, - native uint[] V_1, - int32 V_2, - native uint V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.UIntPtr - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static float64[] '[|for x in floatArray -> x|]'(float64[] xs) cil managed - { - - .maxstack 6 - .locals init (float64[] V_0, - float64[] V_1, - int32 V_2, - float64 V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Double - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.r8 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.r8 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } - - .method public static float32[] '[|for x in float32Array -> x|]'(float32[] xs) cil managed - { - - .maxstack 6 - .locals init (float32[] V_0, - float32[] V_1, - int32 V_2, - float32 V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Single - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_001b - - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.r4 - IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.r4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret - } + { + + .maxstack 6 + .locals init (int8[] V_0, + int8[] V_1, + int32 V_2, + int8 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.SByte + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i1 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i1 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static uint8[] '[|for x in byteArray -> x|]'(uint8[] xs) cil managed + { + + .maxstack 6 + .locals init (uint8[] V_0, + uint8[] V_1, + int32 V_2, + uint8 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Byte + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.u1 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i1 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static int16[] '[|for x in int16Array -> x|]'(int16[] xs) cil managed + { + + .maxstack 6 + .locals init (int16[] V_0, + int16[] V_1, + int32 V_2, + int16 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int16 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i2 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i2 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static uint16[] '[|for x in uint16Array -> x|]'(uint16[] xs) cil managed + { + + .maxstack 6 + .locals init (uint16[] V_0, + uint16[] V_1, + int32 V_2, + uint16 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.UInt16 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.u2 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i2 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static char[] '[|for x in charArray -> x|]'(char[] xs) cil managed + { + + .maxstack 6 + .locals init (char[] V_0, + char[] V_1, + int32 V_2, + char V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Char + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.u2 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i2 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static int32[] '[|for x in intArray -> x|]'(int32[] xs) cil managed + { + + .maxstack 6 + .locals init (int32[] V_0, + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i4 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static uint32[] '[|for x in uintArray -> x|]'(uint32[] xs) cil managed + { + + .maxstack 6 + .locals init (uint32[] V_0, + uint32[] V_1, + int32 V_2, + uint32 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.UInt32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.u4 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i4 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static int64[] '[|for x in int64Array -> x|]'(int64[] xs) cil managed + { + + .maxstack 6 + .locals init (int64[] V_0, + int64[] V_1, + int32 V_2, + int64 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int64 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i8 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i8 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static uint64[] '[|for x in uint64Array -> x|]'(uint64[] xs) cil managed + { + + .maxstack 6 + .locals init (uint64[] V_0, + uint64[] V_1, + int32 V_2, + uint64 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.UInt64 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i8 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i8 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static native int[] '[|for x in nativeintArray -> x|]'(native int[] xs) cil managed + { + + .maxstack 6 + .locals init (native int[] V_0, + native int[] V_1, + int32 V_2, + native int V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.IntPtr + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static native uint[] '[|for x in unativeintArray -> x|]'(native uint[] xs) cil managed + { + + .maxstack 6 + .locals init (native uint[] V_0, + native uint[] V_1, + int32 V_2, + native uint V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.UIntPtr + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static float64[] '[|for x in floatArray -> x|]'(float64[] xs) cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + float64[] V_1, + int32 V_2, + float64 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Double + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.r8 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.r8 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } + + .method public static float32[] '[|for x in float32Array -> x|]'(float32[] xs) cil managed + { + + .maxstack 6 + .locals init (float32[] V_0, + float32[] V_1, + int32 V_2, + float32 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Single + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.r4 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.r4 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret + } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs index 883490978dc..d37be433345 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs @@ -24,79 +24,92 @@ module DoNotBoxStruct = |> 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 + |> getCompilation |> 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 + |> getCompilation |> 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 + |> getCompilation |> 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 + |> getCompilation |> 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 + |> getCompilation |> 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_FSInterface_fs`` compilation = compilation + |> getCompilation |> 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 + |> getCompilation |> 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 + |> getCompilation |> 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 + |> getCompilation |> 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 + |> getCompilation |> 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 + |> getCompilation |> 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 + |> getCompilation |> 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 + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOff.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOff.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs deleted file mode 100644 index 446e373977c..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs +++ /dev/null @@ -1,4 +0,0 @@ -// #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/EmittedIL/GeneratedIterators/GeneratedIterators.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs index 68899c67afe..244318ddf9b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs @@ -17,33 +17,29 @@ module GeneratedIterators = |> verifyILBaseline // SOURCE=GenIter01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter01.exe" # GenIter01.fs - - [] + [] let ``GenIter01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=GenIter02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter02.exe" # GenIter02.fs - - [] + [] let ``GenIter02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=GenIter03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter03.exe" # GenIter03.fs - - [] + [] let ``GenIter03_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=GenIter04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter04.exe" # GenIter04.fs - - [] - let ``GenIter04_RealInternalSignatureOff_fs`` compilation = + [] + let ``GenIter04_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=GenIter04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter04.exe" # GenIter04.fs - - [] - let ``GenIter04_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs index 2fc23ad345b..a17856a7da3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs @@ -17,274 +17,319 @@ module GenericComparison = |> verifyILBaseline // SOURCE=Compare01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare01.dll" # Compare01.fs - - [] + [] let ``Compare01_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare02.dll" # Compare02.fs - - [] + [] let ``Compare02_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare03.dll" # Compare03.fs - - [] + [] let ``Compare03_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare04.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare04.dll" # Compare04.fs - - [] + [] let ``Compare04_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare05.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare05.dll" # Compare05.fs - - [] + [] let ``Compare05_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare06.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare06.dll" # Compare06.fs - - [] + [] let ``Compare06_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare07.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare07.dll" # Compare07.fs - - [] + [] let ``Compare07_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare08.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare08.dll" # Compare08.fs - [] + [] let ``Compare08_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare09.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare09.dll" # Compare09.fs - [] + [] let ``Compare09_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare10.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare10.dll" # Compare10.fs - - [] + [] let ``Compare10_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare11.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare11.dll" # Compare11.fs - - [] + [] let ``Compare11_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash01.dll" # Hash01.fs - - [] + [] let ``Hash01_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash02.dll" # Hash02.fs - - [] + [] let ``Hash02_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash03.dll" # Hash03.fs - - [] + [] let ``Hash03_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash04.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash04.dll" # Hash04.fs - - [] + [] let ``Hash04_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash05.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash05.dll" # Hash05.fs - - [] + [] let ``Hash05_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash06.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash06.dll" # Hash06.fs - - [] + [] let ``Hash06_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash07.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash07.dll" # Hash07.fs - [] + [] let ``Hash07_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash08.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash08.dll" # Hash08.fs - - [] + [] let ``Hash08_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash09.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash09.dll" # Hash09.fs - - [] + [] let ``Hash09_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash10.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash10.dll" # Hash10.fs - [] + [] let ``Hash10_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash11.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash11.dll" # Hash11.fs - [] + [] let ``Hash11_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash12.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash12.dll" # Hash12.fs - - [] + [] let ``Hash12_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals01.dll" # Equals01.fs - - [] + [] let ``Equals01_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals02.dll" # Equals02.fs - - [] + [] let ``Equals02_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals03.dll" # Equals03.fs - - [] + [] let ``Equals03_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals04.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals04.dll" # Equals04.fs - - [] + [] let ``Equals04_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals05.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals05.dll" # Equals05.fs - - [] + [] let ``Equals05_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals06.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals06.dll" # Equals06.fs - - [] + [] let ``Equals06_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals07.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals07.dll" # Equals07.fs - - [] + [] let ``Equals07_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals08.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals08.dll" # Equals08.fs - - [] + [] let ``Equals08_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals09.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals09.dll" # Equals09.fs - - [] + [] let ``Equals09_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals10.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals10.dll" # Equals10.fs - - [] + [] let ``Equals10_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals11.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals11.dll" # Equals11.fs - - [] + [] let ``Equals11_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals12.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals12.dll" # Equals12.fs - - [] + [] let ``Equals12_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals13.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals13.dll" # Equals13.fs - - [] + [] let ``Equals13_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals14.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals14.dll" # Equals14.fs - - [] + [] let ``Equals14_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals15.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals15.dll" # Equals15.fs - - [] + [] let ``Equals15_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals16.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals16.dll" # Equals16.fs - - [] + [] let ``Equals16_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals17.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals17.dll" # Equals17.fs - - [] + [] let ``Equals17_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals18.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals18.dll" # Equals18.fs - - [] + [] let ``Equals18_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals19.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals19.dll" # Equals19.fs - - [] + [] let ``Equals19_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals20.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals20.dll" # Equals20.fs - - [] + [] let ``Equals20_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals21.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals21.dll" # Equals21.fs - - [] + [] let ``Equals21_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``NativeIntComparison_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptimize |> withEmbeddedPdb @@ -292,9 +337,10 @@ module GenericComparison = |> compileAndRun |> shouldSucceed - [] + [] let ``VoidPtrComparison_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptimize |> withEmbeddedPdb diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/InequalityComparison/InequalityComparison.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/InequalityComparison/InequalityComparison.fs index fb28c1eff54..03c94f28b5d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/InequalityComparison/InequalityComparison.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/InequalityComparison/InequalityComparison.fs @@ -17,32 +17,37 @@ module InequalityComparison = |> verifyILBaseline // SOURCE=InequalityComparison01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison01.exe" # x <= y - [] + [] let ``InequalityComparison01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=InequalityComparison02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison02.exe" # x >= y - [] + [] let ``InequalityComparison02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=InequalityComparison03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison03.exe" # x < y - [] + [] let ``InequalityComparison03_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=InequalityComparison04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison04.exe" # x > y - [] + [] let ``InequalityComparison04_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=InequalityComparison05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison05.exe" # if (x > y) then ... else ... - [] + [] let ``InequalityComparison05_fs`` compilation = compilation + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs index 391faa9067a..d226b4dc25f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs @@ -21,32 +21,26 @@ module Inlining = |> withOptions [if realSig then "--realsig+" else "--realsig-" ] // SOURCE=Match01.fs SCFLAGS="-a --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Match01.dll" # Match01.fs - [] - let ``Match01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Match01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=Match01.fs SCFLAGS="-a --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Match01.dll" # Match01.fs - [] - let ``Match01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Match02.fs SCFLAGS="-a --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Match02.dll" # Match02.fs - [] + [] let ``Match02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=StructUnion01.fs SCFLAGS="-a --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StructUnion01.dll" # StructUnion01.fs - [] + [] let ``StructUnion01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] let ``List contains inlining`` () = Fsx """module Test diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs deleted file mode 100644 index 455b569c200..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs +++ /dev/null @@ -1,18 +0,0 @@ -// #NoMono #CodeGen #Optimizations -module Match01 - -type Test1 = - | X11 of int - | X12 of int - | X13 of int - | X14 of int - -let select1 x = - match x with - | X11 x1 -> x1 - | X12 _ -> 2 - | X13 _ -> 3 - | X14 _ -> 4 - -// select1 is not supposed to be inlined here -let fm y = select1 y diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs index abdc6368d11..120d3a2ffd4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs @@ -17,85 +17,44 @@ module ListExpressionStepping = |> verifyILBaseline // SOURCE=ListExpressionSteppingTest1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest1.exe" # ListExpressionSteppingTest1.fs - - [] - let ``ListExpressionStepping01_RealInternalSignatureOn_fs`` compilation = + [] + let ``ListExpressionStepping01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ListExpressionSteppingTest1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest1.exe" # ListExpressionSteppingTest1.fs - - [] - let ``ListExpressionStepping01_RealInternalSignatureOn_Off`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ListExpressionSteppingTest2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest2.exe" # ListExpressionSteppingTest2.fs - - [] - let ``ListExpressionStepping02_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ListExpressionSteppingTest2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest2.exe" # ListExpressionSteppingTest2.fs - - [] - let ``ListExpressionStepping02_RealInternalSignatureOff_fs`` compilation = + [] + let ``ListExpressionStepping02_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ListExpressionSteppingTest3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest3.exe" # ListExpressionSteppingTest3.fs - [] + [] let ``ListExpressionStepping03_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ListExpressionSteppingTest3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest3.exe" # ListExpressionSteppingTest3.fs - [] - let ``ListExpressionStepping03_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ListExpressionSteppingTest4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest4.exe" # ListExpressionSteppingTest4.fs - - [] + [] let ``ListExpressionStepping04_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ListExpressionSteppingTest4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest4.exe" # ListExpressionSteppingTest4.fs - - [] - let ``ListExpressionStepping04_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ListExpressionSteppingTest5.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest5.exe" # ListExpressionSteppingTest5.fs - - [] + [] let ``ListExpressionStepping05_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ListExpressionSteppingTest5.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest5.exe" # ListExpressionSteppingTest5.fs - - [] - let ``ListExpressionStepping05_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ListExpressionSteppingTest6.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest6.exe" # ListExpressionSteppingTest6.fs - - [] + [] let ``ListExpressionStepping06_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - // SOURCE=ListExpressionSteppingTest6.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest6.exe" # ListExpressionSteppingTest6.fs - - [] - let ``ListExpressionStepping06_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs index bc83b54da00..9f3b2db8e02 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs @@ -17,63 +17,73 @@ module MethodImplAttribute = |> verifyILBaseline // SOURCE=MethodImplAttribute.ForwardRef.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.ForwardRef.dll" # MethodImplAttribute.ForwardRef.fs - [] + [] let ``ForwardRef_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.InternalCall.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.InternalCall.dll" # MethodImplAttribute.InternalCall.fs - [] + [] let ``InternalCall_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.NoInlining.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.NoInlining.dll" # MethodImplAttribute.NoInlining.fs - [] + [] let ``NoInlining_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``NoInlining_fs with inline keyword => should warn in preview version`` compilation = compilation + |> getCompilation |> withLangVersion80 |> typecheck |> withSingleDiagnostic (Warning 3151, Line 3, Col 12, Line 3, Col 19, "This member, function or value declaration may not be declared 'inline'") - [] + [] let ``NoInlining_fs with inline keyword => should not warn in F# 7 or older`` compilation = compilation + |> getCompilation |> withLangVersion70 |> typecheck |> withDiagnostics [] // SOURCE=MethodImplAttribute.AggressiveInlining.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.AggressiveInlining.dll" # MethodImplAttribute.AggressiveInlining.fs - [] + [] let ``AggressiveInlining_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.NoOptimization.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.NoOptimization.dll" # MethodImplAttribute.NoOptimization.fs - [] + [] let ``NoOptimization_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.PreserveSig.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.PreserveSig.dll" # MethodImplAttribute.PreserveSig.fs - [] + [] let ``PreserveSig_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.Synchronized.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.Synchronized.dll" # MethodImplAttribute.Synchronized.fs - [] + [] let ``Synchronized_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.Unmanaged.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.Unmanaged.dll" # MethodImplAttribute.Unmanaged.fs - [] + [] let ``Unmanaged_fs`` compilation = compilation + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs deleted file mode 100644 index 8d7d270e2c8..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs +++ /dev/null @@ -1,6 +0,0 @@ -// #Regression #NoMono #NoMT #CodeGen #EmittedIL -// Regression 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/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOff.il.bsl deleted file mode 100644 index cf3ef015691..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOff.il.bsl +++ /dev/null @@ -1,115 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 -} -.module assembly.exe - -.imagebase {value} -.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 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 public static void main@() cil managed - { - .entrypoint - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, - uint64 V_2, - int32 V_3, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, - int32 V_5) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.2 - IL_0003: ldc.i4.1 - IL_0004: stloc.3 - IL_0005: br.s IL_0019 - - IL_0007: ldloca.s V_1 - IL_0009: ldloc.3 - IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_000f: nop - IL_0010: ldloc.3 - IL_0011: ldc.i4.1 - IL_0012: add - IL_0013: stloc.3 - IL_0014: ldloc.2 - IL_0015: ldc.i4.1 - IL_0016: conv.i8 - IL_0017: add - IL_0018: stloc.2 - IL_0019: ldloc.2 - IL_001a: ldc.i4.3 - IL_001b: conv.i8 - IL_001c: blt.un.s IL_0007 - - IL_001e: ldloca.s V_1 - IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0025: stloc.0 - IL_0026: ldloc.0 - IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002c: stloc.s V_4 - IL_002e: br.s IL_005a - - IL_0030: ldloc.0 - IL_0031: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0036: stloc.s V_5 - IL_0038: ldstr "%A" - IL_003d: 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_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_004e: pop - IL_004f: ldloc.s V_4 - IL_0051: stloc.0 - IL_0052: ldloc.0 - IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0058: stloc.s V_4 - IL_005a: ldloc.s V_4 - IL_005c: brtrue.s IL_0030 - - IL_005e: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOn.il.bsl deleted file mode 100644 index 5914c20eb17..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOn.il.bsl +++ /dev/null @@ -1,144 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 ) - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, - uint64 V_2, - int32 V_3, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, - int32 V_5) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.2 - IL_0003: ldc.i4.1 - IL_0004: stloc.3 - IL_0005: br.s IL_0019 - - IL_0007: ldloca.s V_1 - IL_0009: ldloc.3 - IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_000f: nop - IL_0010: ldloc.3 - IL_0011: ldc.i4.1 - IL_0012: add - IL_0013: stloc.3 - IL_0014: ldloc.2 - IL_0015: ldc.i4.1 - IL_0016: conv.i8 - IL_0017: add - IL_0018: stloc.2 - IL_0019: ldloc.2 - IL_001a: ldc.i4.3 - IL_001b: conv.i8 - IL_001c: blt.un.s IL_0007 - - IL_001e: ldloca.s V_1 - IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0025: stloc.0 - IL_0026: ldloc.0 - IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002c: stloc.s V_4 - IL_002e: br.s IL_005a - - IL_0030: ldloc.0 - IL_0031: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0036: stloc.s V_5 - IL_0038: ldstr "%A" - IL_003d: 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_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_004e: pop - IL_004f: ldloc.s V_4 - IL_0051: stloc.0 - IL_0052: ldloc.0 - IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0058: stloc.s V_4 - IL_005a: ldloc.s V_4 - IL_005c: brtrue.s IL_0030 - - IL_005e: 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 public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs deleted file mode 100644 index 04882e0ec2c..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs +++ /dev/null @@ -1,7 +0,0 @@ -// #Regression #NoMono #NoMT #CodeGen #EmittedIL -// Regression 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/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOff.il.bsl deleted file mode 100644 index 9eabae75fe8..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOff.il.bsl +++ /dev/null @@ -1,90 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 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 public static void main@() cil managed - { - .entrypoint - - .maxstack 5 - .locals init (int32 V_0) - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: br.s IL_001e - - IL_0004: ldstr "%A" - IL_0009: 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_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 - 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 - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOn.il.bsl deleted file mode 100644 index 652e223cd59..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOn.il.bsl +++ /dev/null @@ -1,109 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 ) - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 5 - .locals init (int32 V_0) - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: br.s IL_001e - - IL_0004: ldstr "%A" - IL_0009: 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_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 - 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 - } - -} - -.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 public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs deleted file mode 100644 index 9ce6ae8b25d..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs +++ /dev/null @@ -1,14 +0,0 @@ -// #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/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.net472.bsl deleted file mode 100644 index c2d8e84b8d7..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.net472.bsl +++ /dev/null @@ -1,173 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 ) - .method public specialname static class [runtime]System.Collections.Generic.List`1 get_ra() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.List`1 ''.$assembly::ra@5 - IL_0005: ret - } - - .method public static void test1() cil managed - { - - .maxstack 5 - .locals init (int32 V_0, - int32 V_1, - class [runtime]System.Collections.Generic.List`1 V_2, - valuetype [runtime]System.Collections.Generic.List`1/Enumerator V_3, - int32 V_4) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_003f - - IL_0006: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() - IL_000b: stloc.2 - IL_000c: ldloc.2 - IL_000d: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() - IL_0012: stloc.3 - .try - { - IL_0013: br.s IL_0022 - - IL_0015: ldloca.s V_3 - IL_0017: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() - IL_001c: stloc.s V_4 - IL_001e: ldloc.0 - IL_001f: ldc.i4.1 - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloca.s V_3 - IL_0024: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() - IL_0029: brtrue.s IL_0015 - - IL_002b: leave.s IL_003b - - } - finally - { - IL_002d: ldloca.s V_3 - IL_002f: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator - IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003a: endfinally - } - IL_003b: ldloc.1 - IL_003c: ldc.i4.1 - IL_003d: add - IL_003e: stloc.1 - IL_003f: ldloc.1 - IL_0040: ldc.i4.1 - IL_0041: ldc.i4 0x989680 - IL_0046: add - IL_0047: blt.s IL_0006 - - IL_0049: ldstr "z = %d" - IL_004e: 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_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0058: ldloc.0 - IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_005e: pop - IL_005f: ret - } - - .property class [runtime]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 [runtime]System.Collections.Generic.List`1 assembly::get_ra() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly class [runtime]System.Collections.Generic.List`1 ra@5 - .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 public static void main@() cil managed - { - .entrypoint - - .maxstack 5 - .locals init (class [runtime]System.Collections.Generic.List`1 V_0, - int32 V_1) - IL_0000: ldc.i4.s 100 - IL_0002: newobj instance void class [runtime]System.Collections.Generic.List`1::.ctor(int32) - IL_0007: dup - IL_0008: stsfld class [runtime]System.Collections.Generic.List`1 ''.$assembly::ra@5 - IL_000d: stloc.0 - IL_000e: ldc.i4.0 - IL_000f: stloc.1 - IL_0010: br.s IL_0021 - - IL_0012: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() - IL_0017: ldloc.1 - IL_0018: callvirt instance void class [runtime]System.Collections.Generic.List`1::Add(!0) - IL_001d: ldloc.1 - IL_001e: ldc.i4.1 - IL_001f: add - IL_0020: stloc.1 - 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 - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.netcore.bsl deleted file mode 100644 index c23cb75c545..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.netcore.bsl +++ /dev/null @@ -1,167 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly extern System.Collections -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 9: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 -} -.module assembly.exe - -.imagebase {value} -.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 ) - .method public specialname static class [System.Collections]System.Collections.Generic.List`1 get_ra() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [System.Collections]System.Collections.Generic.List`1 ''.$assembly::ra@5 - IL_0005: ret - } - - .method public static void test1() cil managed - { - - .maxstack 5 - .locals init (int32 V_0, - int32 V_1, - class [System.Collections]System.Collections.Generic.List`1 V_2, - valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator V_3, - int32 V_4) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_003f - - IL_0006: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() - IL_000b: stloc.2 - IL_000c: ldloc.2 - IL_000d: callvirt instance valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator class [System.Collections]System.Collections.Generic.List`1::GetEnumerator() - IL_0012: stloc.3 - .try - { - IL_0013: br.s IL_0022 - - IL_0015: ldloca.s V_3 - IL_0017: call instance !0 valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::get_Current() - IL_001c: stloc.s V_4 - IL_001e: ldloc.0 - IL_001f: ldc.i4.1 - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloca.s V_3 - IL_0024: call instance bool valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::MoveNext() - IL_0029: brtrue.s IL_0015 - - IL_002b: leave.s IL_003b - - } - finally - { - IL_002d: ldloca.s V_3 - IL_002f: constrained. valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator - IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003a: endfinally - } - IL_003b: ldloc.1 - IL_003c: ldc.i4.1 - IL_003d: add - IL_003e: stloc.1 - IL_003f: ldloc.1 - IL_0040: ldc.i4.1 - IL_0041: ldc.i4 0x989680 - IL_0046: add - IL_0047: blt.s IL_0006 - - IL_0049: ldstr "z = %d" - IL_004e: 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_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0058: ldloc.0 - IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_005e: pop - IL_005f: ret - } - - .property class [System.Collections]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 [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly class [System.Collections]System.Collections.Generic.List`1 ra@5 - .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 public static void main@() cil managed - { - .entrypoint - - .maxstack 5 - .locals init (class [System.Collections]System.Collections.Generic.List`1 V_0, - int32 V_1) - IL_0000: ldc.i4.s 100 - IL_0002: newobj instance void class [System.Collections]System.Collections.Generic.List`1::.ctor(int32) - IL_0007: dup - IL_0008: stsfld class [System.Collections]System.Collections.Generic.List`1 ''.$assembly::ra@5 - IL_000d: stloc.0 - IL_000e: ldc.i4.0 - IL_000f: stloc.1 - IL_0010: br.s IL_0021 - - IL_0012: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() - IL_0017: ldloc.1 - IL_0018: callvirt instance void class [System.Collections]System.Collections.Generic.List`1::Add(!0) - IL_001d: ldloc.1 - IL_001e: ldc.i4.1 - IL_001f: add - IL_0020: stloc.1 - 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 - } - -} - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.net472.bsl deleted file mode 100644 index 771e4efe186..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.net472.bsl +++ /dev/null @@ -1,189 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 ) - .field static assembly class [runtime]System.Collections.Generic.List`1 ra@5 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static class [runtime]System.Collections.Generic.List`1 get_ra() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.List`1 assembly::ra@5 - IL_0005: ret - } - - .method public static void test1() cil managed - { - - .maxstack 5 - .locals init (int32 V_0, - int32 V_1, - class [runtime]System.Collections.Generic.List`1 V_2, - valuetype [runtime]System.Collections.Generic.List`1/Enumerator V_3, - int32 V_4) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_003f - - IL_0006: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() - IL_000b: stloc.2 - IL_000c: ldloc.2 - IL_000d: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() - IL_0012: stloc.3 - .try - { - IL_0013: br.s IL_0022 - - IL_0015: ldloca.s V_3 - IL_0017: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() - IL_001c: stloc.s V_4 - IL_001e: ldloc.0 - IL_001f: ldc.i4.1 - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloca.s V_3 - IL_0024: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() - IL_0029: brtrue.s IL_0015 - - IL_002b: leave.s IL_003b - - } - finally - { - IL_002d: ldloca.s V_3 - IL_002f: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator - IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003a: endfinally - } - IL_003b: ldloc.1 - IL_003c: ldc.i4.1 - IL_003d: add - IL_003e: stloc.1 - IL_003f: ldloc.1 - IL_0040: ldc.i4.1 - IL_0041: ldc.i4 0x989680 - IL_0046: add - IL_0047: blt.s IL_0006 - - IL_0049: ldstr "z = %d" - IL_004e: 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_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0058: ldloc.0 - IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_005e: pop - IL_005f: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 5 - .locals init (int32 V_0) - IL_0000: ldc.i4.s 100 - IL_0002: newobj instance void class [runtime]System.Collections.Generic.List`1::.ctor(int32) - IL_0007: stsfld class [runtime]System.Collections.Generic.List`1 assembly::ra@5 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: br.s IL_001f - - IL_0010: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() - IL_0015: ldloc.0 - IL_0016: callvirt instance void class [runtime]System.Collections.Generic.List`1::Add(!0) - IL_001b: ldloc.0 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.0 - IL_001f: ldloc.0 - IL_0020: ldc.i4.1 - IL_0021: ldc.i4.s 100 - IL_0023: add - IL_0024: blt.s IL_0010 - - IL_0026: ret - } - - .property class [runtime]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 [runtime]System.Collections.Generic.List`1 assembly::get_ra() - } -} - -.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 public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.netcore.bsl deleted file mode 100644 index 0efd6c82922..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.netcore.bsl +++ /dev/null @@ -1,183 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly extern System.Collections -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 9: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 -} -.module assembly.exe - -.imagebase {value} -.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 ) - .field static assembly class [System.Collections]System.Collections.Generic.List`1 ra@5 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static class [System.Collections]System.Collections.Generic.List`1 get_ra() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [System.Collections]System.Collections.Generic.List`1 assembly::ra@5 - IL_0005: ret - } - - .method public static void test1() cil managed - { - - .maxstack 5 - .locals init (int32 V_0, - int32 V_1, - class [System.Collections]System.Collections.Generic.List`1 V_2, - valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator V_3, - int32 V_4) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_003f - - IL_0006: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() - IL_000b: stloc.2 - IL_000c: ldloc.2 - IL_000d: callvirt instance valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator class [System.Collections]System.Collections.Generic.List`1::GetEnumerator() - IL_0012: stloc.3 - .try - { - IL_0013: br.s IL_0022 - - IL_0015: ldloca.s V_3 - IL_0017: call instance !0 valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::get_Current() - IL_001c: stloc.s V_4 - IL_001e: ldloc.0 - IL_001f: ldc.i4.1 - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloca.s V_3 - IL_0024: call instance bool valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::MoveNext() - IL_0029: brtrue.s IL_0015 - - IL_002b: leave.s IL_003b - - } - finally - { - IL_002d: ldloca.s V_3 - IL_002f: constrained. valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator - IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003a: endfinally - } - IL_003b: ldloc.1 - IL_003c: ldc.i4.1 - IL_003d: add - IL_003e: stloc.1 - IL_003f: ldloc.1 - IL_0040: ldc.i4.1 - IL_0041: ldc.i4 0x989680 - IL_0046: add - IL_0047: blt.s IL_0006 - - IL_0049: ldstr "z = %d" - IL_004e: 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_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0058: ldloc.0 - IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_005e: pop - IL_005f: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 5 - .locals init (int32 V_0) - IL_0000: ldc.i4.s 100 - IL_0002: newobj instance void class [System.Collections]System.Collections.Generic.List`1::.ctor(int32) - IL_0007: stsfld class [System.Collections]System.Collections.Generic.List`1 assembly::ra@5 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: br.s IL_001f - - IL_0010: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() - IL_0015: ldloc.0 - IL_0016: callvirt instance void class [System.Collections]System.Collections.Generic.List`1::Add(!0) - IL_001b: ldloc.0 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.0 - IL_001f: ldloc.0 - IL_0020: ldc.i4.1 - IL_0021: ldc.i4.s 100 - IL_0023: add - IL_0024: blt.s IL_0010 - - IL_0026: ret - } - - .property class [System.Collections]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 [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() - } -} - -.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 public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.il.bsl index 7a3b11fe451..44237b1f5c8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -171,6 +161,45 @@ IL_002a: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: call char assembly/M::m() + IL_0005: pop + IL_0006: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: call void assembly/M::staticInitialization@() + IL_0005: ret } } @@ -187,9 +216,8 @@ .entrypoint .maxstack 8 - IL_0000: call char assembly/M::m() - IL_0005: pop - IL_0006: ret + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs index 5e8206137b1..4e759a26c95 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs @@ -16,364 +16,204 @@ module Misc = |> ignoreWarnings |> verifyILBaseline - // SOURCE=AbstractClass.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AbstractClass.exe" # AbstractClass.fs - [] + [] let ``AbstractClass_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=AbstractClass.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AbstractClass.exe" # AbstractClass.fs - [] - let ``AbstractClass_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=AnonRecd.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AnonRecd.exe" # AnonRecd.fs - [] + [] let ``AnonRecd_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // SOURCE=CodeGenRenamings01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CodeGenRenamings01.exe" # CodeGenRenamings01.fs - - [] - let ``CodeGenRenamings01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=CodeGenRenamings01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CodeGenRenamings01.exe" # CodeGenRenamings01.fs - - [] - let ``CodeGenRenamings01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=ArgumentNamesInClosures01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ArgumentNamesInClosures01.dll" # ArgumentNamesInClosures01.fs - - [] - let ``ArgumentNamesInClosures01_RealInternalSignatureOn_fs`` compilation = + [] + let ``CodeGenRenamings01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> asExe |> verifyCompilation // SOURCE=ArgumentNamesInClosures01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ArgumentNamesInClosures01.dll" # ArgumentNamesInClosures01.fs - - [] - let ``ArgumentNamesInClosures01_RealInternalSignatureOff_fs`` compilation = + [] + let ``ArgumentNamesInClosures01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=Decimal01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Decimal01.exe" # Decimal01.fs - [] - let ``Decimal01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Decimal01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=Decimal01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Decimal01.exe" # Decimal01.fs - [] - let ``Decimal01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=EntryPoint01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd EntryPoint01.exe" # EntryPoint01.fs - [] + [] let ``EntryPoint01_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=EntryPoint01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd EntryPoint01.exe" # EntryPoint01.fs - [] - let ``EntryPoint01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=EqualsOnUnions01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd EqualsOnUnions01.exe" # EqualsOnUnions01.fs - - [] + [] let ``EqualsOnUnions01_fs`` compilation = compilation - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop01.exe" # ForLoop01.fs - - [] - let ``ForLoop01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop01.exe" # ForLoop01.fs - - [] - let ``ForLoop01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop02.exe" # ForLoop02.fs - [] - let ``ForLoop02_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop02.exe" # ForLoop02.fs - [] - let ``ForLoop02_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop03.exe" # ForLoop03.fs - [] - let ``ForLoop03_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop03.exe" # ForLoop03.fs - [] - let ``ForLoop03_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=NoBoxingOnDispose01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoBoxingOnDispose01.exe" # NoBoxingOnDispose01.fs - [] + [] let ``NoBoxingOnDispose01_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation //SOURCE=IfThenElse01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd IfThenElse01.dll" # IfThenElse01.fs - [] - let ``IfThenElse01_RealInternalSignatureOn_fs`` compilation = + [] + let ``IfThenElse01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - //SOURCE=IfThenElse01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd IfThenElse01.dll" # IfThenElse01.fs - [] - let ``IfThenElse01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=LetIfThenElse01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetIfThenElse01.exe" # LetIfThenElse01.fs - - [] - let ``LetIfThenElse01_RealInternalSignatureOn_fs`` compilation = + [] + let ``LetIfThenElse01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=LetIfThenElse01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetIfThenElse01.exe" # LetIfThenElse01.fs - - [] - let ``LetIfThenElse01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=Lock01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Lock01.exe" # Lock01.fs - - [] - let ``Lock01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Lock01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=Lock01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Lock01.exe" # Lock01.fs - - [] - let ``Lock01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=ModuleWithExpression01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ModuleWithExpression01.exe" # ModuleWithExpression01.fs - [] - let ``ModuleWithExpression01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> asExe |> verifyCompilation // SOURCE=ModuleWithExpression01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ModuleWithExpression01.exe" # ModuleWithExpression01.fs - [] - let ``ModuleWithExpression01_RealInternalSignatureOff_fs`` compilation = + [] + let ``ModuleWithExpression01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=NonEscapingArguments02.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NonEscapingArguments02.dll" # NonEscapingArguments02.fs - [] + [] let ``NonEscapingArguments02_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // SOURCE=Seq_for_all01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Seq_for_all01.exe" # Seq_for_all01.fs - [] - let ``Seq_for_all01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=Seq_for_all01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Seq_for_all01.exe" # Seq_for_all01.fs - [] - let ``Seq_for_all01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=StructsAsArrayElements01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StructsAsArrayElements01.dll" # StructsAsArrayElements01.fs - - [] - let ``StructsAsArrayElements01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Seq_for_all01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> asExe |> verifyCompilation // SOURCE=StructsAsArrayElements01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StructsAsArrayElements01.dll" # StructsAsArrayElements01.fs - - [] - let ``StructsAsArrayElements01_RealInternalSignatureOff_fs`` compilation = + [] + let ``StructsAsArrayElements01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=PreserveSig.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd PreserveSig.dll" # PreserveSig.fs - - [] + [] let ``PreserveSig_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // # 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 - [] + [] let ``TryWith_NoFilterBlocks01_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // # 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 - [] - let ``TryWith_NoFilterBlocks01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=Structs01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Structs01.exe" # Structs01.fs - - [] + [] let ``Structs01_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // SOURCE=Structs02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Structs02.exe" # Structs02.fs - - [] + [] let ``Structs02_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation - [] + [] let ``Structs02_asNetStandard20_fs`` compilation = compilation + |> getCompilation |>asLibrary |>asNetStandard20 |>verifyCompilation // SOURCE=Marshal.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Marshal.exe" # Marshal.fs - [] + [] let ``Marshal_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // SOURCE=MethodImplNoInline02.fs SCFLAGS="-O" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplNoInline02.exe" # MethodImplNoInline02.fs - [] - let ``MethodImplNoInline02_RealInternalSignatureOn_fs`` compilation = + [] + let ``MethodImplNoInline02_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=MethodImplNoInline02.fs SCFLAGS="-O" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplNoInline02.exe" # MethodImplNoInline02.fs - [] - let ``MethodImplNoInline02_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=CustomAttributeGenericParameter01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CustomAttributeGenericParameter01.exe" # CustomAttributeGenericParameter01.fs - - [] - let ``CustomAttributeGenericParameter01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> asExe |> verifyCompilation // SOURCE=CustomAttributeGenericParameter01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CustomAttributeGenericParameter01.exe" # CustomAttributeGenericParameter01.fs - - [] - let ``CustomAttributeGenericParameter01_RealInternalSignatureOff_fs`` compilation = + [] + let ``CustomAttributeGenericParameter01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=GenericTypeStaticField.fs SCFLAGS="-g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenericTypeStaticField.exe" # GenericTypeStaticField.fs - - [] + [] let ``GenericTypeStaticField_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // SOURCE=GenericTypeStaticField.fs SCFLAGS="-g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenericTypeStaticField.exe" # GenericTypeStaticField.fs - // SOURCE=GeneralizationOnUnions01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GeneralizationOnUnions01.exe" # GeneralizationOnUnions01.fs - [] - let ``GeneralizationOnUnions01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=GeneralizationOnUnions01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GeneralizationOnUnions01.exe" # GeneralizationOnUnions01.fs - [] - let ``GeneralizationOnUnions01_RealInternalSignatureOff_fs`` compilation = + [] + let ``GeneralizationOnUnions01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs index f9878aa42de..bc2bcbf9154 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs @@ -1,148 +1,167 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module EmittedIL.NullnessMetadata +namespace EmittedIL open Xunit open FSharp.Test open FSharp.Test.Compiler -type Optimize = Optimize | DoNotOptimize - -let verifyCompilation (o:Optimize) compilation = - compilation - |> withOptions ["--checknulls"] - |> (match o with | Optimize -> withOptimize | DoNotOptimize -> withNoOptimize) - |> withNoDebug - |> withNoInterfaceData - |> withNoOptimizationData - |> asLibrary - |> verifyILBaseline - -[] -let ``Nullable attr for module bindings`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for module functions`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for module functions optimize`` compilation = - compilation - |> verifyCompilation Optimize - -[] -let ``Nullable attr for curriedFunc optimize`` compilation = - compilation - |> verifyCompilation Optimize - -[] -let ``Nullable attr for anon records`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for records with generics`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for plain records`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for exception types`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for ref DUs`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for struct DUs`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for custom type`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for Option clones`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Generic struct DU`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable inheritance`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Custom pipe`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``SupportsNull`` compilation = - compilation - |> withNoWarn 52 - |> verifyCompilation DoNotOptimize - -[] -let ``GenericCode`` compilation = - compilation - |> withNoWarn 52 - |> verifyCompilation DoNotOptimize - -[] -let ``Downcasting and typetests`` compilation = - compilation - |> withNoWarn 52 - |> verifyCompilation DoNotOptimize - -[] -let ``Downcasting and typetests optimized`` compilation = - compilation - |> withNoWarn 52 - |> verifyCompilation Optimize - - -module Interop = - open System.IO - - let fsharpLibCreator = - FSharp - >> asLibrary - >> withName "MyFSharpLib" - >> withOptions ["--checknulls"] - - let csharpLibCompile fsLibReference = - CSharp - >> withReferences [fsLibReference] - >> withCSharpLanguageVersion CSharpLanguageVersion.Preview - >> asLibrary - >> withName "CsharpAppConsumingNullness" - >> compile - - let FsharpFromFile filename = - Path.Combine(__SOURCE_DIRECTORY__, filename) - |> File.ReadAllText - |> fsharpLibCreator - - [] - let ``Csharp understands option like type using UseNullAsTrueValue`` () = - let csharpCode = """ +module NullnessMetadata = + type Optimize = Optimize | DoNotOptimize + + let verifyCompilation (o:Optimize) compilation = + compilation + |> withOptions ["--checknulls"] + |> (match o with | Optimize -> withOptimize | DoNotOptimize -> withNoOptimize) + |> withNoDebug + |> withNoInterfaceData + |> withNoOptimizationData + |> asLibrary + |> verifyILBaseline + + [] + let ``Nullable attr for module bindings`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for module functions`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for module functions optimize`` compilation = + compilation + |> getCompilation + |> verifyCompilation Optimize + + [] + let ``Nullable attr for curriedFunc optimize`` compilation = + compilation + |> getCompilation + |> verifyCompilation Optimize + + [] + let ``Nullable attr for anon records`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for records with generics`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for plain records`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for exception types`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for ref DUs`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for struct DUs`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for custom type`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for Option clones`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Generic struct DU`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable inheritance`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Custom pipe`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``SupportsNull`` compilation = + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompilation DoNotOptimize + + [] + let ``GenericCode`` compilation = + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompilation DoNotOptimize + + [] + let ``Downcasting and typetests`` compilation = + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompilation DoNotOptimize + + [] + let ``Downcasting and typetests optimized`` compilation = + compilation + |> withNoWarn 52 + |> verifyCompilation Optimize + + + module Interop = + open System.IO + + let fsharpLibCreator = + FSharp + >> asLibrary + >> withName "MyFSharpLib" + >> withOptions ["--checknulls"] + + let csharpLibCompile fsLibReference = + CSharp + >> withReferences [fsLibReference] + >> withCSharpLanguageVersion CSharpLanguageVersion.Preview + >> asLibrary + >> withName "CsharpAppConsumingNullness" + >> compile + + let FsharpFromFile filename = + Path.Combine(__SOURCE_DIRECTORY__, filename) + |> File.ReadAllText + |> fsharpLibCreator + + [] + let ``Csharp understands option like type using UseNullAsTrueValue`` () = + let csharpCode = """ using System; using static TestModule; using static Microsoft.FSharp.Core.FuncConvert; @@ -168,14 +187,14 @@ public class C { Console.WriteLine(MyOptionWhichCannotHaveNullInTheInside.NewMyNotNullSome("").ToString()); // should NOT warn } -}""" - csharpCode - |> csharpLibCompile (FsharpFromFile "NullAsTrueValue.fs") - |> withDiagnostics [ Warning 8602, Line 12, Col 27, Line 12, Col 37, "Dereference of a possibly null reference."] - - [] - let ``Csharp understands Fsharp-produced struct unions via IsXXX flow analysis`` () = - let csharpCode = """ + }""" + csharpCode + |> csharpLibCompile (FsharpFromFile "NullAsTrueValue.fs") + |> withDiagnostics [ Warning 8602, Line 12, Col 27, Line 12, Col 37, "Dereference of a possibly null reference."] + + [] + let ``Csharp understands Fsharp-produced struct unions via IsXXX flow analysis`` () = + let csharpCode = """ #nullable enable public class C { public void M() { @@ -198,22 +217,22 @@ public class C { System.Console.Write(thisCreationIsBad.ToString() + thisCreationIsFine.ToString() ); } -}""" - csharpCode - |> csharpLibCompile (FsharpFromFile "StructDU.fs") - |> withDiagnostics [ - Warning 8600, Line 6, Col 35, Line 6, Col 57, "Converting null literal or possible null value to non-nullable type." - Warning 8600, Line 14, Col 78, Line 14, Col 97, "Converting null literal or possible null value to non-nullable type." - Warning 8602, Line 15, Col 34, Line 15, Col 89, "Dereference of a possibly null reference." - Warning 8625, Line 18, Col 62, Line 18, Col 66, "Cannot convert null literal to non-nullable reference type."] - - [] - let ``Csharp code understands Fsharp-produced generics`` () = - let fsharpcode = """ + }""" + csharpCode + |> csharpLibCompile (FsharpFromFile "StructDU.fs") + |> withDiagnostics [ + Warning 8600, Line 6, Col 35, Line 6, Col 57, "Converting null literal or possible null value to non-nullable type." + Warning 8600, Line 14, Col 78, Line 14, Col 97, "Converting null literal or possible null value to non-nullable type." + Warning 8602, Line 15, Col 34, Line 15, Col 89, "Dereference of a possibly null reference." + Warning 8625, Line 18, Col 62, Line 18, Col 66, "Cannot convert null literal to non-nullable reference type."] + + [] + let ``Csharp code understands Fsharp-produced generics`` () = + let fsharpcode = """ module MyFSharpLib -let stringTupleInOut(x:struct(string * string|null)) = x """ - let fsLib = fsharpLibCreator fsharpcode - let csharpCode = """ +let stringTupleInOut(x:struct(string * string|null)) = x""" + let fsLib = fsharpLibCreator fsharpcode + let csharpCode = """ #nullable enable public class C { public void M() { @@ -221,22 +240,22 @@ public class C { MyFSharpLib.stringTupleInOut(("a good string here",nullString)); } }""" - csharpCode - |> csharpLibCompile fsLib - |> withDiagnostics [] - - [] - let ``Csharp code can work with annotated FSharp module`` () = - Path.Combine(__SOURCE_DIRECTORY__,"CsharpConsumer.cs") - |> File.ReadAllText - |> csharpLibCompile (FsharpFromFile "ModuleLevelFunctions.fs") - |> shouldFail - |> withDiagnostics [ - Error 29, Line 28, Col 20, Line 28, Col 61, "Cannot implicitly convert type 'int' to 'string'" - Warning 8625, Line 12, Col 74, Line 12, Col 78, "Cannot convert null literal to non-nullable reference type." - Warning 8604, Line 14, Col 88, Line 14, Col 113, "Possible null reference argument for parameter 'x' in 'string MyTestModule.nonNullableInputOutputFunc(string x)'." - Warning 8620, Line 19, Col 88, Line 19, Col 101, "Argument of type '(string?, string?, int, int, int, int)' cannot be used for parameter 'x' of type '(string, string?, int, int, int, int)' in '(string, string?, int, int, int, int) MyTestModule.genericValueTypeTest((string, string?, int, int, int, int) x)' due to differences in the nullability of reference types." - Warning 8604, Line 21, Col 84, Line 21, Col 114, "Possible null reference argument for parameter 'x' in 'string MyTestModule.nonNullableInputOutputFunc(string x)'." - Warning 8604, Line 24, Col 60, Line 24, Col 70, "Possible null reference argument for parameter 'x_0' in 'Tuple MyTestModule.genericRefTypeTest(string x_0, string? x_1, int x_2, int x_3, int x_4, int x_5)'." - Warning 8604, Line 25, Col 45, Line 25, Col 59, "Possible null reference argument for parameter 'x_0' in 'Tuple MyTestModule.genericRefTypeTest(string x_0, string? x_1, int x_2, int x_3, int x_4, int x_5)'." - Warning 8625, Line 28, Col 51, Line 28, Col 55, "Cannot convert null literal to non-nullable reference type."] \ No newline at end of file + csharpCode + |> csharpLibCompile fsLib + |> withDiagnostics [] + + [] + let ``Csharp code can work with annotated FSharp module`` () = + Path.Combine(__SOURCE_DIRECTORY__,"CsharpConsumer.cs") + |> File.ReadAllText + |> csharpLibCompile (FsharpFromFile "ModuleLevelFunctions.fs") + |> shouldFail + |> withDiagnostics [ + Error 29, Line 28, Col 20, Line 28, Col 61, "Cannot implicitly convert type 'int' to 'string'" + Warning 8625, Line 12, Col 74, Line 12, Col 78, "Cannot convert null literal to non-nullable reference type." + Warning 8604, Line 14, Col 88, Line 14, Col 113, "Possible null reference argument for parameter 'x' in 'string MyTestModule.nonNullableInputOutputFunc(string x)'." + Warning 8620, Line 19, Col 88, Line 19, Col 101, "Argument of type '(string?, string?, int, int, int, int)' cannot be used for parameter 'x' of type '(string, string?, int, int, int, int)' in '(string, string?, int, int, int, int) MyTestModule.genericValueTypeTest((string, string?, int, int, int, int) x)' due to differences in the nullability of reference types." + Warning 8604, Line 21, Col 84, Line 21, Col 114, "Possible null reference argument for parameter 'x' in 'string MyTestModule.nonNullableInputOutputFunc(string x)'." + Warning 8604, Line 24, Col 60, Line 24, Col 70, "Possible null reference argument for parameter 'x_0' in 'Tuple MyTestModule.genericRefTypeTest(string x_0, string? x_1, int x_2, int x_3, int x_4, int x_5)'." + Warning 8604, Line 25, Col 45, Line 25, Col 59, "Possible null reference argument for parameter 'x_0' in 'Tuple MyTestModule.genericRefTypeTest(string x_0, string? x_1, int x_2, int x_3, int x_4, int x_5)'." + Warning 8625, Line 28, Col 51, Line 28, Col 55, "Cannot convert null literal to non-nullable reference type."] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Platform/Platform.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Platform/Platform.fs index 20fbc933dba..c6850d68a41 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Platform/Platform.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Platform/Platform.fs @@ -1,4 +1,4 @@ -namespace EmittedIL +namespace EmittedIL open Xunit open FSharp.Test @@ -23,120 +23,134 @@ module Platform = |> asExe |> withName "PlatformedExe.exe" - [] + [] let platformExeAnyCpuDefault compilation = compilation + |> getCompilation |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.Anycpu ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformExeAnyCpu32BitPreferred compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.AnyCpu32bitPreferred ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformExeArm compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.Arm ] |> if isArm then compileExeAndRun else compile |> shouldSucceed - [] + [] let platformExeArm64 compilation = compilation + |> getCompilation |> asExe |> withPlatform ExecutionPlatform.Arm64 |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.Arm64 ] |> if isArm then compileExeAndRun else compile |> shouldSucceed - [] + [] let platformExeItanium compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.Itanium ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformExeX86 compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.X86 ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformExeX64 compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.X64 ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformDllDefault compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformDllAnyCpuDefault compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.Anycpu ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformDllArm compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.Arm ] |> if isArm then compileExeAndRun else compile |> shouldSucceed - [] + [] let platformDllArm64 compilation = compilation + |> getCompilation |> asExe |> withPlatform ExecutionPlatform.Arm64 |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.Arm64 ] |> if isArm then compileExeAndRun else compile |> shouldSucceed - [] + [] let platformDllItanium compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.Itanium ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformDllX86 compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.X86 ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformDllX64 compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.X64 ] |> compileExeAndRun |> shouldSucceed - [] + [] let withRefOnlyGeneratesMvidSection compilation = let mvidReader = @@ -150,6 +164,7 @@ module Platform = |> withRefOnly compilation + |> getCompilation |> asExe |> withReferences [mvidReader] |> withReferences [assemblyHasMvidSection] @@ -157,7 +172,7 @@ module Platform = |> compileExeAndRun |> shouldSucceed - [] + [] let withoutRefOnlyGeneratesNoMvidSection compilation = let mvidReader = @@ -169,6 +184,7 @@ module Platform = |> asLibrary compilation + |> getCompilation |> asExe |> withReferences [mvidReader] |> withReferences [assemblyHasMvidSection] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/QueryExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/QueryExpressionStepping.fs index ff590c10dae..bc205b74721 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/QueryExpressionStepping.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/QueryExpressionStepping.fs @@ -24,138 +24,71 @@ module QueryExpressionStepping = |> verifyILBaseline // SOURCE=Linq101Aggregates01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Aggregates01.exe" # Linq101Aggregates01.fs - CodeGen - [] - let ``Linq101Aggregates01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101Aggregates01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``Linq101Aggregates01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Linq101ElementOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101ElementOperators01.exe" # Linq101ElementOperators01.fs - CodeGen - [] - let ``Linq101ElementOperators01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - // SOURCE=Linq101ElementOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101ElementOperators01.exe" # Linq101ElementOperators01.fs - CodeGen - [] - let ``Linq101ElementOperators01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101Grouping01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Grouping01.exe" # Linq101Grouping01.fs - CodeGen - [] - let ``Linq101Grouping01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101ElementOperators01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Linq101Grouping01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Grouping01.exe" # Linq101Grouping01.fs - CodeGen - [] - let ``Linq101Grouping01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101Joins01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Joins01.exe" # Linq101Joins01.fs - CodeGen - [] - let ``Linq101Joins01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101Grouping01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Linq101Joins01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Joins01.exe" # Linq101Joins01.fs - CodeGen - [] - let ``Linq101Joins01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101Ordering01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Ordering01.exe" # Linq101Ordering01.fs - CodeGen - [] - let ``Linq101Ordering01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101Joins01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Linq101Ordering01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Ordering01.exe" # Linq101Ordering01.fs - CodeGen - [] - let ``Linq101Ordering01_RealInternalSignatureOff_fs`` compilation = + [] + let ``Linq101Ordering01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Linq101Partitioning01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Partitioning01.exe" # Linq101Partitioning01.fs - CodeGen - [] - let ``Linq101Partitioning01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101Partitioning01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=Linq101Partitioning01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Partitioning01.exe" # Linq101Partitioning01.fs - CodeGen - [] - let ``Linq101Partitioning01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Linq101Quantifiers01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Quantifiers01.exe" # Linq101Quantifiers01.fs - CodeGen - [] - let ``Linq101Quantifiers01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``Linq101Quantifiers01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101Select01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Select01.exe" # Linq101Select01.fs - CodeGen - [] - let ``Linq101Select01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101Quantifiers01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - // SOURCE=Linq101Select01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Select01.exe" # Linq101Select01.fs - CodeGen - [] - let ``Linq101Select01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101SetOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101SetOperators01.exe" # Linq101SetOperators01.fs - CodeGen - [] - let ``Linq101SetOperators01_RealInternalSignatureOn_fs`` compilation = + // SOURCE=Linq101Select01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Select01.exe" # Linq101Select01.fs - CodeGen + [] + let ``Linq101Select01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Linq101SetOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101SetOperators01.exe" # Linq101SetOperators01.fs - CodeGen - [] - let ``Linq101SetOperators01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101Where01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Where01.exe" # Linq101Where01.fs - CodeGen - [] - let ``Linq101Where01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101SetOperators01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Linq101Where01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Where01.exe" # Linq101Where01.fs - CodeGen - [] - let ``Linq101Where01_RealInternalSignatureOff_fs`` compilation = + [] + let ``Linq101Where01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs index 01a3c5d6fc4..01971f4d183 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs @@ -18,101 +18,52 @@ module SeqExpressionStepping = |> verifyILBaseline //Retry SOURCE=SeqExpressionSteppingTest01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest1.exe" # SeqExpressionSteppingTest1.fs - - [] - let ``SeqExpressionSteppingTest01_RealInternalSignatureOn_fs`` compilation = + [] + let ``SeqExpressionSteppingTest01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //Retry SOURCE=SeqExpressionSteppingTest01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest1.exe" # SeqExpressionSteppingTest1.fs - - [] - let ``SeqExpressionSteppingTest01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=SeqExpressionSteppingTest02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest2.exe" # SeqExpressionSteppingTest2.fs - - [] - let ``SeqExpressionSteppingTest02_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=SeqExpressionSteppingTest02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest2.exe" # SeqExpressionSteppingTest2.fs - - [] - let ``SeqExpressionSteppingTest02_RealInternalSignatureOff_fs`` compilation = + [] + let ``SeqExpressionSteppingTest02_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=SeqExpressionSteppingTest03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest3.exe" # SeqExpressionSteppingTest3.fs - - [] - let ``SeqExpressionSteppingTest03_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=SeqExpressionSteppingTest03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest3.exe" # SeqExpressionSteppingTest3.fs - - [] - let ``SeqExpressionSteppingTest03_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=SeqExpressionSteppingTest04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest4.exe" # SeqExpressionSteppingTest4.fs - - [] - let ``SeqExpressionSteppingTest04_RealInternalSignatureOn_fs`` compilation = + [] + let ``SeqExpressionSteppingTest03_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=SeqExpressionSteppingTest04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest4.exe" # SeqExpressionSteppingTest4.fs - - [] - let ``SeqExpressionSteppingTest04_RealInternalSignatureOff_fs`` compilation = + [] + let ``SeqExpressionSteppingTest04_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=SeqExpressionSteppingTest05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest5.exe" # SeqExpressionSteppingTest5.fs - - [] - let ``SeqExpressionSteppingTest05_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=SeqExpressionSteppingTest05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest5.exe" # SeqExpressionSteppingTest5.fs - - [] - let ``SeqExpressionSteppingTest05_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=SeqExpressionSteppingTest06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest6.exe" # SeqExpressionSteppingTest6.fs - - [] - let ``SeqExpressionSteppingTest06_RealInternalSignatureOn_fs`` compilation = + [] + let ``SeqExpressionSteppingTest05_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=SeqExpressionSteppingTest06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest6.exe" # SeqExpressionSteppingTest6.fs - - [] - let ``SeqExpressionSteppingTest06_RealInternalSignatureOff_fs`` compilation = + [] + let ``SeqExpressionSteppingTest06_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation #if NETCOREAPP // SOURCE=SeqExpressionSteppingTest07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest7.exe" # SeqExpressionSteppingTest7.fs - - [] - let ``SeqExpressionSteppingTest07_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=SeqExpressionSteppingTest07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest7.exe" # SeqExpressionSteppingTest7.fs - - [] - let ``SeqExpressionSteppingTest07_RealInternalSignatureOff_fs`` compilation = + [] + let ``SeqExpressionSteppingTest07_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation #endif \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls.fs index 55245346fa0..b9fc3e0a54a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls.fs @@ -19,13 +19,15 @@ module SeqExpressionTailCalls = |> verifyILBaseline // SOURCE=SeqExpressionTailCalls01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionTailCalls01.exe" # SeqExpressionTailCalls01.fs - - [] + [] let ``SeqExpressionTailCalls01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SeqExpressionTailCalls02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionTailCalls02.exe" # SeqExpressionTailCalls02.fs - - [] + [] let ``SeqExpressionTailCalls02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/SerializableAttribute.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/SerializableAttribute.fs index 3a801ed3dce..9e4053528bc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/SerializableAttribute.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/SerializableAttribute.fs @@ -18,60 +18,31 @@ module SerializableAttribute = |> verifyILBaseline // SOURCE=ToplevelModule.fs SCFLAGS="-a -g --out:TopLevelModule.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModule.dll" # ToplevelModule.fs - Desktop - [] - let ``ToplevelModule_RealInternalSignatureOn_fs`` compilation = + [] + let ``ToplevelModule_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ToplevelModule.fs SCFLAGS="-a -g --out:TopLevelModule.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModule.dll" # ToplevelModule.fs - Desktop - [] - let ``ToplevelModule_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --out:ToplevelNamespace.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace.dll" # ToplevelNamespace.fs - Desktop - [] - let ``ToplevelNamespace_RealInternalSignatureOn_fs`` compilation = + [] + let ``ToplevelNamespace_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --out:ToplevelNamespace.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace.dll" # ToplevelNamespace.fs - Desktop - [] - let ``ToplevelNamespacec_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ToplevelModule.fs SCFLAGS="-a -g --langversion:6.0 --out:TopLevelModule-preview.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModule-preview.dll" # ToplevelModule.fs - Desktop preview - [] - let ``ToplevelModule_LangVersion60_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> withLangVersion60 - |> verifyCompilation - - [] - let ``ToplevelModule_LangVersion60_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> withLangVersion60 - |> verifyCompilation - - // SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --langversion:6.0 --out:ToplevelNamespace-preview.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace-preview.dll" # ToplevelNamespace.fs - Desktop preview - [] - let ``ToplevelNamespace_LangVersion60_RealInternalSignatureOn_fs`` compilation = + [] + let ``ToplevelModule_LangVersion60_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> withLangVersion60 |> verifyCompilation // SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --langversion:6.0 --out:ToplevelNamespace-preview.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace-preview.dll" # ToplevelNamespace.fs - Desktop preview - [] - let ``ToplevelNamespace_LangVersion60_RealInternalSignatureOff_fs`` compilation = + [] + let ``ToplevelNamespace_LangVersion60_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> withLangVersion60 |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit.fs index 2f9a1277528..6b12f4a145b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit.fs @@ -18,57 +18,29 @@ module StaticInit = |> verifyILBaseline // SOURCE=LetBinding01.fs SCFLAGS=" -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetBinding01.exe" # LetBinding01.fs - [] - let ``LetBinding01_RealInternalSignatureOn_fs`` compilation = + [] + let ``LetBinding01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=LetBinding01.fs SCFLAGS=" -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetBinding01.exe" # LetBinding01.fs - [] - let ``LetBinding01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=StaticInit_Struct01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Struct01.dll" # StaticInit_Struct01.fs - - [] - let ``StaticInit_Struct01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=StaticInit_Struct01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Struct01.dll" # StaticInit_Struct01.fs - - [] - let ``StaticInit_Struct01_RealInternalSignatureOff_fs`` compilation = + [] + let ``StaticInit_Struct01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=StaticInit_Class01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Class01.dll" # StaticInit_Class01.fs - - [] - let ``StaticInit_Class01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=StaticInit_Class01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Class01.dll" # StaticInit_Class01.fs - - [] - let ``StaticInit_Class01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=StaticInit_Module01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Module01.dll" # StaticInit_Module01.fs - - [] - let ``StaticInit_Module01_RealInternalSignatureOn_fs`` compilation = + [] + let ``StaticInit_Class01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=StaticInit_Module01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Module01.dll" # StaticInit_Module01.fs - - [] - let ``StaticInit_Module01_RealInternalSignatureOff_fs`` compilation = + [] + let ``StaticInit_Module01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch.fs index d10e4561e56..d1298a98d40 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch.fs @@ -19,55 +19,64 @@ module SteppingMatch = // SOURCE=SteppingMatch01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch01.dll" # SteppingMatch01.fs - [] + [] let ``SteppingMatch01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch02.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch02.dll" # SteppingMatch02.fs - [] + [] let ``SteppingMatch02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch03.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch03.dll" # SteppingMatch03.fs - [] + [] let ``SteppingMatch03_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch04.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch04.dll" # SteppingMatch04.fs - [] + [] let ``SteppingMatch04_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch05.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch05.dll" # SteppingMatch05.fs - [] + [] let ``SteppingMatch05_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch06.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch06.dll" # SteppingMatch06.fs - - [] + [] let ``SteppingMatch06_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch07.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch07.dll" # SteppingMatch07.fs - - [] + [] let ``SteppingMatch07_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch08.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch08.dll" # SteppingMatch08.fs - [] + [] let ``SteppingMatch08_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch09.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch09.dll" # SteppingMatch09.fs - [] + [] let ``SteppingMatch09_fs`` compilation = compilation + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs index e0d0b1eacef..da3fa57a537 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs @@ -81,28 +81,31 @@ module StringEncoding = |> 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 + |> getCompilation |> 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 + |> getCompilation |> 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 + |> getCompilation |> withReferences([normalization_CSharp "FormKD" 0; normalization_FSharp "FormKD" 0]) |> withReferences([normalization_CSharp "FormKD" 0x80; normalization_FSharp "FormKD" 0x80]) - |> compileExeAndRun + |> compileExeAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs.il.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs.il.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs.il.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs.il.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs deleted file mode 100644 index 01e8d833c73..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs +++ /dev/null @@ -1,39 +0,0 @@ -// =========================================================================================================================== -// Test case for GenericEqualityERFast with floats/doubles -// Ensures that matrix of values evaluate to the same values as the shipping compiler -// =========================================================================================================================== -module floatsanddoubles - -open System -open System - -type Float = - struct - val F : float - new (f:float) = { F = f } - end - -type Double = - struct - val D : double - new (d:double) = { D = d } - end - -let floats = [| Float(Double.Epsilon); Float(Double.MinValue); Float(Double.MaxValue);Float(Double.NegativeInfinity);Float(Double.PositiveInfinity);Float(Double.NaN); Float(7.1)|] -let doubles = [| Double(Double.Epsilon); Double(Double.MinValue); Double(Double.MaxValue);Double(Double.NegativeInfinity);Double(Double.PositiveInfinity);Double(Double.NaN); Double(8.1)|] -let names = [| "Epsilon"; "MinValue"; "MaxValue";"NegativeInfinity";"PositiveInfinity";"NaN";"Number" |] - -[] -let main argv = - - for i in 0 .. doubles.Length - 1 do - for j in 0 .. doubles.Length - 1 do - printfn "Doubles: %-17s = %-17s is: %-5b Values %f = %f" (names.[i]) (names.[j]) (doubles.[i].Equals(doubles.[j])) (doubles.[i].D) (doubles.[j].D) - printfn "" - - for i in 0 .. floats.Length - 1 do - for j in 0 .. floats.Length - 1 do - printfn "Floats: %-17s = %-17s is: %-5b Values %f = %f" (names.[i]) (names.[j]) (floats.[i].Equals(floats.[j])) (floats.[i].F) (floats.[j].F) - printfn "" - - 0 // return an integer exit code diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/StructFieldEquality.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/StructFieldEquality.fs index edf76bdf4c8..1b51ba93f5b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/StructFieldEquality.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/StructFieldEquality.fs @@ -6,9 +6,10 @@ open FSharp.Test.Compiler module Operators = - [] + [] let ``Validate that non generic (fast) code is emitted for comparison involving decimals`` compilation = compilation + |> getCompilation |> asExe |> ignoreWarnings |> verifyILBaseline \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs index 2d542bddee5..264f10eaba1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs @@ -43,176 +43,194 @@ module Structure = // SOURCE=AttributesOnLet01.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnLet01.fs - [] + [] let ``AttributesOnLet01_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=AttributesOnLet02.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnLet02.fs - [] + [] let ``AttributesOnLet02_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=AttributesOnProperty.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnProperty.fs - [] + [] let ``AttributesOnProperty_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=AttributesOnPropertyGetter.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnPropertyGetter.fs - [] + [] let ``AttributesOnPropertyGetter_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=AttributesOnPropertyGetterSetter.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnPropertyGetterSetter.fs - [] + [] let ``AttributesOnPropertyGetterSetter_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=AttributesOnPropertySetter.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnPropertySetter.fs - [] + [] let ``AttributesOnPropertySetter_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=ClassArity01.fs SCFLAGS="-r:CodeGenHelper.dll" # ClassArity01.fs - [] + [] let ``ClassArity01_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=Delegates01.fs SCFLAGS="-r:CodeGenHelper.dll" # Delegates01.fs - [] + [] let ``Delegates01_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=ReadOnlyStructFromLib.fs SCFLAGS="-r:ReadWriteLib.dll" PRECMD="\$CSC_PIPE /target:library /reference:System.Core.dll ReadWriteLib.cs" # ReadOnlyStructFromLib.fs - [] + [] let ``ReadOnlyStructFromLib_fs`` compilation = let readWriteLib = CSharpFromPath (Path.Combine(__SOURCE_DIRECTORY__, "ReadWriteLib.cs")) |> withName "ReadWriteLib" compilation + |> getCompilation |> withReferences([readWriteLib]) |> verifyCompilation // SOURCE=DiscUnionCodeGen1.fs SCFLAGS="-r:CodeGenHelper.dll" # DiscUnionCodeGen1.fs - [] + [] let ``DiscUnionCodeGen1_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equality01.fs # Equality01.fs - [] + [] let ``Equality01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Events01.fs SCFLAGS="-r:CodeGenHelper.dll" # Events01.fs - [] + [] let ``Events01_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=Events02.fs SCFLAGS="-r:CodeGenHelper.dll" # Events02.fs - [] + [] let ``Events02_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=Extensions01.fs SCFLAGS="-r:CodeGenHelper.dll" # Extensions01.fs - [] + [] let ``Extensions01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Extensions02.fs SCFLAGS="-r:CodeGenHelper.dll" # Extensions02.fs - [] + [] let ``Extensions02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=FloatsAndDoubles_1.fs SCFLAGS="-g --out:FloatsAndDoubles.exe" COMPILE_ONLY=1 POSTCMD="comparebsl.cmd FloatsAndDoubles.exe" # FloatsAndDoubles.fs - [] - let ``FloatsAndDoubles_1_fs`` compilation = + [] + let ``FloatsAndDoubles_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyIl - - // SOURCE=FloatsAndDoubles_2.fs SCFLAGS="-g --out:FloatsAndDoubles.exe" COMPILE_ONLY=1 POSTCMD="comparebsl.cmd FloatsAndDoubles.exe" # FloatsAndDoubles.fs - [] - let ``FloatsAndDoubles_2_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyIl // SOURCE=FunctionArity01.fs SCFLAGS="-r:CodeGenHelper.dll" # FunctionArity01.fs - [] + [] let ``FunctionArity01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=LocalTypeFunctionInIf.fs # LocalTypeFunctionInIf.fs - [] + [] let ``LocalTypeFunctionInIf_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=ModuleArity01.fs SCFLAGS="-r:CodeGenHelper.dll" # ModuleArity01.fs - [] + [] let ``ModuleArity01_fs`` compilation = compilation + |> getCompilation |> verifyExecution #if false && !NETCOREAPP && !NETSTANDARD // SOURCE=NativePtr01.fs PEVER=/Exp_Fail SCFLAGS="-r:CodeGenHelper.dll" # NativePtr01.fs - [] + [] let ``NativePtr01_fs`` compilation = compilation + |> getCompilation |> setupCompilation |> PEVerifier.verifyPEFile |> PEVerifier.shouldFail #endif // SOURCE=ObjectExpressions01.fs SCFLAGS="-r:CodeGenHelper.dll" # ObjectExpressions01.fs - [] + [] let ``ObjectExpressions01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE="UnionTypeWithSignature01.fsi UnionTypeWithSignature01.fs" SCFLAGS="-r:CodeGenHelper.dll" # UnionTypeWithSignature01.fs - [] + [] let ``UnionTypeWithSignature01_fsi`` compilation = compilation + |> getCompilation |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "UnionTypeWithSignature01.fs")) |> verifyExecution // SOURCE="UnionTypeWithSignature02.fsi UnionTypeWithSignature02.fs" SCFLAGS="-r:CodeGenHelper.dll" # UnionTypeWithSignature02.fs - [] + [] let ``UnionTypeWithSignature02_fsi`` compilation = compilation + |> getCompilation |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "UnionTypeWithSignature02.fs")) |> verifyCompilation // SOURCE=UnitsOfMeasure01.fs SCFLAGS="-r:CodeGenHelper.dll" # UnitsOfMeasure01.fs - [] + [] let ``UnitsOfMeasure01_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=UnitsOfMeasure02.fs SCFLAGS="-r:CodeGenHelper.dll" # UnitsOfMeasure02.fs - [] + [] let ``UnitsOfMeasure02_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=UnitsOfMeasure03.fs SCFLAGS="-r:CodeGenHelper.dll" # UnitsOfMeasure03.fs - [] + [] let ``UnitsOfMeasure03_fs`` compilation = compilation + |> getCompilation |> verifyExecution diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOff.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOff.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs deleted file mode 100644 index e2cd598647c..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs +++ /dev/null @@ -1,14 +0,0 @@ -// #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/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs deleted file mode 100644 index 0a15c1e7f3e..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs deleted file mode 100644 index b0bb870e52c..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -let _ = System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs deleted file mode 100644 index 107a0547a4c..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -let () = System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs deleted file mode 100644 index 9e9cf22b6dd..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -do System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs deleted file mode 100644 index ef4a3242125..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs +++ /dev/null @@ -1,4 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -while true do - System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.netcore .bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.netcore .bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.netcore .bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.netcore .bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs deleted file mode 100644 index 6fd7e43ade2..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs +++ /dev/null @@ -1,5 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -match "A" with - | "A" -> System.Console.WriteLine() - | _ -> System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs deleted file mode 100644 index 4a90531ba66..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -if true then System.Console.WriteLine() else System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.netcore .bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.netcore .bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.netcore .bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.netcore .bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs deleted file mode 100644 index 5281549e50e..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs +++ /dev/null @@ -1,37 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -let test1() = - try - System.Console.WriteLine() - with - // should not generate a filter - | _ -> System.Console.WriteLine() - -let test2() = - try - System.Console.WriteLine() - with - // should generate a filter - | :? System.ArgumentException -> System.Console.WriteLine() - -let test3() = - try - System.Console.WriteLine() - with - // should generate a filter - | :? System.ArgumentException as a -> System.Console.WriteLine(a.Message) - -let test4() = - try - System.Console.WriteLine() - with - // should generate a filter - | MatchFailureException ( msg, _, _) -> System.Console.WriteLine(msg) - -let test5() = - try - System.Console.WriteLine() - with - // should generate a filter - | :? System.ArgumentException as a -> System.Console.WriteLine(a.Message) - | MatchFailureException ( msg, _, _) -> System.Console.WriteLine(msg) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs index 9b2ce64194e..3f17c4d1db2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs @@ -27,360 +27,288 @@ module TestFunctions = |> verifyILBaseline //SOURCE=TestFunction01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction01.exe" # TestFunction01.fs - [] + [] let ``TestFunction01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction02.exe" # TestFunction02.fs - [] + [] let ``TestFunction02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction03.exe" # TestFunction03.fs - - [] + [] let ``TestFunction03_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction03b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction03b.exe" # TestFunction03b.fs - - [] + [] let ``TestFunction03b_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction03c.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction03c.exe" # TestFunction03c.fs - - [] + [] let ``TestFunction03c_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction04.exe" # TestFunction04.fs - [] + [] let ``TestFunction04_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction05.exe" # TestFunction05.fs - [] + [] let ``TestFunction05_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction06.exe" # TestFunction06.fs - [] + [] let ``TestFunction06_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction07.exe" # TestFunction07.fs - [] + [] let ``TestFunction07_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction08.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction08.exe" # TestFunction08.fs - [] + [] let ``TestFunction08_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09.exe" # TestFunction09.fs - [] + [] let ``TestFunction09_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b.exe" # TestFunction09b.fs - [] + [] let ``TestFunction09b_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b1.exe" # TestFunction09b1.fs - [] + [] let ``TestFunction09b1_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b2.exe" # TestFunction09b2.fs - [] + [] let ``TestFunction09b2_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b3.exe" # TestFunction09b3.fs - [] + [] let ``TestFunction09b3_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b4.exe" # TestFunction09b4.fs - [] - let ``TestFunction09b4_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction09b4_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - //SOURCE=TestFunction09b4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b4.exe" # TestFunction09b4.fs - [] - let ``TestFunction09b4_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation //SOURCE=TestFunction10.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction10.exe" # TestFunction10.fs - - [] + [] let ``TestFunction10_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction11.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction11.exe" # TestFunction11.fs - [] + [] let ``TestFunction11_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction12.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction12.exe" # TestFunction12.fs - [] + [] let ``TestFunction12_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction13.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction13.exe" # TestFunction13.fs - - [] + [] let ``TestFunction13_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction14.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction14.exe" # TestFunction14.fs - - [] + [] let ``TestFunction14_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction15.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction15.exe" # TestFunction15.fs - [] + [] let ``TestFunction15_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction16.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction16.exe" # TestFunction16.fs - - [] + [] let ``TestFunction16_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction17.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction17.exe" # TestFunction17.fs - - [] + [] let ``TestFunction17_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction18.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction18.exe" # TestFunction18.fs - [] + [] let ``TestFunction18_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction19.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction19.exe" # TestFunction19.fs - - [] + [] let ``TestFunction19_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction20.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction20.exe" # TestFunction20.fs - - [] + [] let ``TestFunction20_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction21.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction21.exe" # TestFunction21.fs - - [] + [] let ``TestFunction21_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22.exe" # TestFunction22.fs - [] - let ``TestFunction22_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - //SOURCE=TestFunction22.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22.exe" # TestFunction22.fs - [] - let ``TestFunction22_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22b.exe" # TestFunction22b.fs - [] - let ``TestFunction22b_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22b.exe" # TestFunction22b.fs - [] - let ``TestFunction22b_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22c.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22c.exe" # TestFunction22c.fs - [] - let ``TestFunction22c_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22b_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22c.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22c.exe" # TestFunction22c.fs - [] - let ``TestFunction22c_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22d.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22d.exe" # TestFunction22d.fs - [] - let ``TestFunction22d_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22c_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22d.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22d.exe" # TestFunction22d.fs - [] - let ``TestFunction22d_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22e.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22e.exe" # TestFunction22e.fs - [] - let ``TestFunction22e_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22d_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22e.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22e.exe" # TestFunction22e.fs - [] - let ``TestFunction22e_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22f.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22f.exe" # TestFunction22f.fs - [] - let ``TestFunction22f_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22e_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22f.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22f.exe" # TestFunction22f.fs - [] - let ``TestFunction22f_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22g.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22g.exe" # TestFunction22g.fs - [] - let ``TestFunction22g_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22f_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22g.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22g.exe" # TestFunction22g.fs - [] - let ``TestFunction22g_RealInternalSignatureOn_fs`` compilation = + [] + let ``TestFunction22g_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22h.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22h.exe" # TestFunction22h.fs - - [] - let ``TestFunction22h_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22h_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22h.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22h.exe" # TestFunction22h.fs - - [] - let ``TestFunction22h_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation //SOURCE=TestFunction23.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction23.exe" # TestFunction23.fs - - [] + [] let ``TestFunction23_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction24.fs SCFLAGS="-g --optimize-" PEVER=/Exp_Fail COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction24.exe" # TestFunction24.fs - - [] + [] let ``TestFunction24_fs`` compilation = compilation + |> getCompilation |> withLangVersion70 |> verifyCompilation - // Verify IL 13043 - [] - let ``Verify13043_RealInternalSignatureOff_fs`` compilation = - compilation - |> withDebug - |> withRealInternalSignatureOff - |> verifyCompilation - - // Verify IL 13043 - [] - let ``Verify13043_RealInternalSignatureOn_fs`` compilation = - compilation - |> withDebug - |> withRealInternalSignatureOn - |> verifyCompilation - // Verify Execution 13043 run it built not optimized with debug - [] - let ``Verify13043_Verify13043_RealInternalSignatureOff_execution_noopt`` compilation = + [] + let ``Verify13043_CompileAndRun`` compilation = compilation + |> getCompilation |> withDebug |> withRealInternalSignatureOff |> verifyCompileAndRun - |> shouldSucceed // Verify Execution 13043 run it built not optimized with debug - [] - let ``Verify13043_Verify13043_RealInternalSignatureOn_execution_noopt`` compilation = + [] + let ``Verify13043_Baselines`` compilation = compilation + |> getCompilation |> withDebug - |> withRealInternalSignatureOn - |> verifyCompileAndRun - |> shouldSucceed - - // Verify Execution 13043 --- run it built optimized no debug - [] - let ``Verify13043_RealInternalSignatureOff_execution_opt`` compilation = - compilation - |> asExe - |> withOptions [ "--test:EmitFeeFeeAs100001"; "--nowarn:988"; "--nowarn:3370"] - |> withOptimize - |> withNoDebug |> withRealInternalSignatureOff - |> compileAndRun - |> shouldSucceed - - // Verify Execution 13043 --- run it built optimized no debug - [] - let ``Verify13043_RealInternalSignatureOn_execution_opt`` compilation = - compilation - |> asExe - |> withOptions [ "--test:EmitFeeFeeAs100001"; "--nowarn:988"; "--nowarn:3370"] - |> withOptimize - |> withNoDebug - |> withRealInternalSignatureOn - |> compileAndRun - |> shouldSucceed + |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl new file mode 100644 index 00000000000..3198f042779 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -0,0 +1,391 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested assembly beforefieldinit f@8 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + 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: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s l + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + 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: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + 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: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s _arg1 + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + 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: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public static bool condition(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0005: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + list() + { + .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 assembly::get_list() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + matchResult() + { + .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 assembly::get_matchResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + functionResult() + { + .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 assembly::get_functionResult() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 + .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 public static void main@() cil managed + { + .entrypoint + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) + 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 ''.$assembly::list@3 + IL_001d: stloc.0 + IL_001e: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_002d: dup + IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0033: stloc.1 + IL_0034: ldstr "Match: %A" + IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_004d: pop + IL_004e: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_005d: dup + IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0063: stloc.2 + IL_0064: ldstr "Function: %A" + IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_007d: pop + IL_007e: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl new file mode 100644 index 00000000000..3198f042779 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -0,0 +1,391 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested assembly beforefieldinit f@8 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + 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: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s l + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + 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: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + 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: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s _arg1 + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + 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: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public static bool condition(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0005: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + list() + { + .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 assembly::get_list() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + matchResult() + { + .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 assembly::get_matchResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + functionResult() + { + .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 assembly::get_functionResult() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 + .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 public static void main@() cil managed + { + .entrypoint + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) + 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 ''.$assembly::list@3 + IL_001d: stloc.0 + IL_001e: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_002d: dup + IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0033: stloc.1 + IL_0034: ldstr "Match: %A" + IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_004d: pop + IL_004e: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_005d: dup + IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0063: stloc.2 + IL_0064: ldstr "Function: %A" + IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_007d: pop + IL_007e: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs.il.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs.il.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl new file mode 100644 index 00000000000..3198f042779 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -0,0 +1,391 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested assembly beforefieldinit f@8 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + 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: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s l + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + 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: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + 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: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s _arg1 + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + 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: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public static bool condition(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0005: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + list() + { + .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 assembly::get_list() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + matchResult() + { + .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 assembly::get_matchResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + functionResult() + { + .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 assembly::get_functionResult() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 + .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 public static void main@() cil managed + { + .entrypoint + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) + 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 ''.$assembly::list@3 + IL_001d: stloc.0 + IL_001e: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_002d: dup + IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0033: stloc.1 + IL_0034: ldstr "Match: %A" + IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_004d: pop + IL_004e: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_005d: dup + IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0063: stloc.2 + IL_0064: ldstr "Function: %A" + IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_007d: pop + IL_007e: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl new file mode 100644 index 00000000000..3198f042779 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -0,0 +1,391 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested assembly beforefieldinit f@8 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + 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: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s l + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + 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: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + 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: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s _arg1 + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + 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: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public static bool condition(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0005: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + list() + { + .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 assembly::get_list() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + matchResult() + { + .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 assembly::get_matchResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + functionResult() + { + .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 assembly::get_functionResult() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 + .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 public static void main@() cil managed + { + .entrypoint + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) + 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 ''.$assembly::list@3 + IL_001d: stloc.0 + IL_001e: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_002d: dup + IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0033: stloc.1 + IL_0034: ldstr "Match: %A" + IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_004d: pop + IL_004e: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_005d: dup + IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0063: stloc.2 + IL_0064: ldstr "Function: %A" + IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_007d: pop + IL_007e: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs.il.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs.il.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs deleted file mode 100644 index 3c7a8cceb80..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs +++ /dev/null @@ -1,44 +0,0 @@ -module Verify13043 - -let list = [1; 2; 3] -let condition n = n < 3 - -let dropWhileWithMatch condition list = - let rec f (l : List) : List = - match l with - | [] -> [] - | head :: tail -> - match condition head with - | true -> f tail - | false -> head :: tail - - f list - -(* - This function caused an Unhandled exception at execution time: - - Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. - at Program.f@14-1.Invoke(FSharpList`1 _arg1) in /workspaces/function-rec-fsharp-dotnet7-bug-demo/Program.fs:line 18 - at Program.dropWhileWithFunction(FSharpFunc`2 condition, FSharpList`1 list) in /workspaces/function-rec-fsharp-dotnet7-bug-demo/Program.fs:line 21 - at .$Program.main@() in /workspaces/function-rec-fsharp-dotnet7-bug-demo/Program.fs:line 29 -*) -let dropWhileWithFunction condition list = - let rec f : List -> List = - function - | [] -> [] - | head :: tail -> - match condition head with - | true -> f tail - | false -> head :: tail - - f list - - -// this runs fine: -let matchResult = dropWhileWithMatch condition list -printfn "Match: %A" matchResult - - -// and this results in a null reference exception -let functionResult = dropWhileWithFunction condition list -printfn "Function: %A" functionResult diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs index 70ca6baa84e..e40fd039fe0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs @@ -1,74 +1,78 @@ -module EmittedIL.TryCatch +namespace EmittedIL -open System.IO open Xunit open FSharp.Test open FSharp.Test.Compiler +open System.IO +module TryCatch = -let setupCompilation compilation = - compilation - |> withOptions [ "--test:EmitFeeFeeAs100001" ] - |> withNoWarn 75 //The command-line option '--generate-filter-blocks' has been deprecated - |> withNoWarn 52 //The value has been copied to ensure the original is not mutated - |> asExe - |> withNoOptimize - |> withNoInterfaceData - |> withNoOptimizationData - |> withNoDebug - |> ignoreWarnings + let setupCompilation compilation = + compilation + |> withOptions [ "--test:EmitFeeFeeAs100001" ] + |> withNoWarn 75 //The command-line option '--generate-filter-blocks' has been deprecated + |> withNoWarn 52 //The value has been copied to ensure the original is not mutated + |> asExe + |> withNoOptimize + |> withNoInterfaceData + |> withNoOptimizationData + |> withNoDebug + |> ignoreWarnings -let verifyCompilation compilation = - setupCompilation compilation - |> verifyILBaseline + let verifyCompilation compilation = + setupCompilation compilation + |> verifyILBaseline -[] -let ``TryCatch with active pattern`` compilation = - compilation - |> verifyCompilation + [] + let ``TryCatch with active pattern`` compilation = + compilation + |> getCompilation + |> verifyCompilation -[] -let ``TryCatch with active pattern and filter blocks switch`` compilation = - compilation - |> withOptions ["--generate-filter-blocks"] - |> verifyCompilation + [] + let ``TryCatch with active pattern and filter blocks switch`` compilation = + compilation + |> withOptions ["--generate-filter-blocks"] + |> verifyCompilation -[] -let ``TryCatch with explicit guard`` compilation = - compilation - |> verifyCompilation + [] + let ``TryCatch with explicit guard`` compilation = + compilation + |> getCompilation + |> verifyCompilation -[] -let ``TryCatch with explicit guard and filter blocks switch`` compilation = - compilation - |> withOptions ["--generate-filter-blocks"] - |> verifyCompilation + [] + let ``TryCatch with explicit guard and filter blocks switch`` compilation = + compilation + |> withOptions ["--generate-filter-blocks"] + |> verifyCompilation -[] -let ``Stackoverflow reproduction`` compilation = - let compilationResult = - compilation - |> setupCompilation - // I cannot just `compileAndRun` this in process now, because it will crash entire test host. - |> compile - match compilationResult with - | CompilationResult.Success ({OutputPath = Some dllFile} as s) -> - let fsharpCoreFile = typeof>.Assembly.Location - File.Copy(fsharpCoreFile, Path.Combine(Path.GetDirectoryName(dllFile), Path.GetFileName(fsharpCoreFile)), true) - let result = CompilerAssert.ExecuteAndReturnResult (dllFile, isFsx=false, deps = s.Dependencies, newProcess=true) + [] + let ``Stackoverflow reproduction`` compilation = + let compilationResult = + compilation + |> getCompilation + |> setupCompilation + // I cannot just `compileAndRun` this in process now, because it will crash entire test host. + |> compile - Assert.True(result.StdErr.Contains "stack overflow" || result.StdErr.Contains "StackOverflow") + match compilationResult with + | CompilationResult.Success ({OutputPath = Some dllFile} as s) -> + let fsharpCoreFile = typeof>.Assembly.Location + File.Copy(fsharpCoreFile, Path.Combine(Path.GetDirectoryName(dllFile), Path.GetFileName(fsharpCoreFile)), true) + let result = CompilerAssert.ExecuteAndReturnResult (dllFile, isFsx=false, deps = s.Dependencies, newProcess=true) - | _ -> failwith (sprintf "%A" compilationResult) + Assert.True(result.StdErr.Contains "stack overflow" || result.StdErr.Contains "StackOverflow") -[] -let ``Stackoverflow prevention`` compilation = - compilation - |> setupCompilation - |> withOptions ["--generate-filter-blocks"] - |> compileAndRun - |> shouldSucceed - |> verifyOutput "System.OperationCanceledException" + | _ -> failwith (sprintf "%A" compilationResult) - \ No newline at end of file + [] + let ``Stackoverflow prevention`` compilation = + compilation + |> getCompilation + |> setupCompilation + |> withOptions ["--generate-filter-blocks"] + |> compileAndRun + |> shouldSucceed + |> verifyOutput "System.OperationCanceledException" diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOn.il.bsl index 121a095fb13..13afd6ba16b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -54,7 +44,7 @@ IL_000c: ret } - .method assembly static void staticInitialization@() cil managed + .method assembly specialname static void staticInitialization@() cil managed { .maxstack 8 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuples.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuples.fs index fc7aa7b8a4e..97d84b94d52 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuples.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuples.fs @@ -18,138 +18,85 @@ module Tuples = |> verifyILBaseline // SOURCE=Tuple01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple01.exe" # Tuple01.fs - [] + [] let ``Tuple01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Tuple02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple02.exe" # Tuple02.fs - - [] - let ``Tuple02_RealInternalSignatureOn_fs`` compilation = + [] + let ``Tuple02_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=Tuple02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple02.exe" # Tuple02.fs - - [] - let ``Tuple02_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Tuple03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple03.exe" # Tuple03.fs - - [] - let ``Tuple03_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Tuple03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple03.exe" # Tuple03.fs - - [] - let ``Tuple03_RealInternalSignatureOff_fs`` compilation = + [] + let ``Tuple03_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Tuple04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple04.exe" # Tuple04.fs - - [] - let ``Tuple04_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=Tuple04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple04.exe" # Tuple04.fs - - [] - let ``Tuple04_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Tuple05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple05.exe" # Tuple05.fs - - [] - let ``Tuple05_RealInternalSignatureOn_fs`` compilation = + [] + let ``Tuple04_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Tuple05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple05.exe" # Tuple05.fs - - [] - let ``Tuple05_RealInternalSignatureOff_fs`` compilation = + [] + let ``Tuple05_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Tuple06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple06.exe" # Tuple06.fs - - [] - let ``Tuple06_RealInternalSignatureOff_fs`` compilation = + [] + let ``Tuple06_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Tuple07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple07.exe" # Tuple07.fs - - [] - let ``Tuple07_RealInternalSignatureOn_fs`` compilation = + [] + let ``Tuple07_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=Tuple07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple07.exe" # Tuple07.fs - - [] - let ``Tuple07_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Tuple08.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple08.exe" # Tuple08.fs - - [] - let ``Tuple08_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Tuple08.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple08.exe" # Tuple08.fs - - [] - let ``Tuple08_RealInternalSignatureOff_fs`` compilation = + [] + let ``Tuple08_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=OptionalArg01.fs SCFLAGS="-g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd OptionalArg01.exe" # OptionalArg01.fs - test optimizations - [] + [] let ``OptionalArg01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=TupleMonster.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TupleMonster.exe" # TupleMonster.fs - - [] - let ``TupleMonster_RealInternalSignatureOff_fs`` compilation = + [] + let ``TupleMonster_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=TupleMonster.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TupleMonster.exe" # TupleMonster.fs - - [] - let ``TupleMonster_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=TupleElimination.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TupleElimination.exe" # TupleElimination.fs - - [] + [] let ``TupleElimination_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=ValueTupleAliasConstructor.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ValueTupleAliasConstructor.exe" # ValueTupleAliasConstructor.fs - - [] - let ``ValueTupleAliasConstructor_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ValueTupleAliasConstructor.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ValueTupleAliasConstructor.exe" # ValueTupleAliasConstructor.fs - - [] - let ``ValueTupleAliasConstructor_RealInternalSignatureOff_fs`` compilation = + [] + let ``ValueTupleAliasConstructor_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs index a6b967742fe..463bf57950e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs @@ -7,18 +7,10 @@ open FSharp.Test.Compiler module Operators = // ``Validate that non generic (fast) code is emitted for comparison involving decimals RealInternalSignatureOff`` compilation = - [] - let ``Non generic (fast) code emitted for decimal comparison RealInternalSignatureOff`` compilation = + [] + let ``Non generic (fast) code emitted for decimal comparison`` compilation = compilation + |> getCompilation |> asExe - |> withRealInternalSignatureOff - |> ignoreWarnings - |> verifyILBaseline - - [] - let ``Non generic (fast) code emitted for decimal comparison RealInternalSignatureOn`` compilation = - compilation - |> asExe - |> withRealInternalSignatureOn |> ignoreWarnings |> verifyILBaseline diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.debug.bsl similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.debug.bsl index cccb0f3431a..0e21e7ba7b5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.debug.bsl @@ -17,16 +17,6 @@ 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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -40,13 +30,13 @@ -.class public abstract auto ansi sealed Decimal_comparison_RealInternalSignatureOff +.class public abstract auto ansi sealed Decimal_comparison 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 private abstract auto ansi sealed ''.$Decimal_comparison_RealInternalSignatureOff +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [runtime]System.Object { .field static assembly int32 init@ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.release.bsl similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.release.bsl index 9e27b34c290..aeb6d4d902a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.net472.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.release.bsl @@ -17,16 +17,6 @@ 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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -40,13 +30,13 @@ -.class public abstract auto ansi sealed Decimal_comparison_RealInternalSignatureOff +.class public abstract auto ansi sealed Decimal_comparison 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 private abstract auto ansi sealed ''.$Decimal_comparison_RealInternalSignatureOff +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [runtime]System.Object { .field static assembly int32 init@ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.debug.bsl similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.debug.bsl index cccb0f3431a..0e21e7ba7b5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.debug.bsl @@ -17,16 +17,6 @@ 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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -40,13 +30,13 @@ -.class public abstract auto ansi sealed Decimal_comparison_RealInternalSignatureOff +.class public abstract auto ansi sealed Decimal_comparison 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 private abstract auto ansi sealed ''.$Decimal_comparison_RealInternalSignatureOff +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [runtime]System.Object { .field static assembly int32 init@ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.release.bsl similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.release.bsl index 9e27b34c290..0e21e7ba7b5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.net472.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.release.bsl @@ -8,7 +8,7 @@ .assembly extern netstandard { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) - .ver 2:0:0:0 + .ver 2:1:0:0 } .assembly assembly { @@ -17,16 +17,6 @@ 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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -40,13 +30,13 @@ -.class public abstract auto ansi sealed Decimal_comparison_RealInternalSignatureOff +.class public abstract auto ansi sealed Decimal_comparison 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 private abstract auto ansi sealed ''.$Decimal_comparison_RealInternalSignatureOff +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [runtime]System.Object { .field static assembly int32 init@ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.net472.debug.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.net472.debug.bsl index 9de0631aca0..e50b5c153fd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.net472.debug.bsl @@ -17,16 +17,6 @@ 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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -40,7 +30,7 @@ -.class public abstract auto ansi sealed Decimal_comparison_RealInternalSignatureOn +.class public abstract auto ansi sealed Decimal_comparison 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 ) @@ -49,8 +39,8 @@ .maxstack 8 IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$Decimal_comparison_RealInternalSignatureOn::init@ - IL_0006: ldsfld int32 ''.$Decimal_comparison_RealInternalSignatureOn::init@ + IL_0001: stsfld int32 ''.$Decimal_comparison::init@ + IL_0006: ldsfld int32 ''.$Decimal_comparison::init@ IL_000b: pop IL_000c: ret } @@ -250,7 +240,7 @@ } -.class private abstract auto ansi sealed ''.$Decimal_comparison_RealInternalSignatureOn +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [runtime]System.Object { .field static assembly int32 init@ @@ -262,7 +252,7 @@ .entrypoint .maxstack 8 - IL_0000: call void Decimal_comparison_RealInternalSignatureOn::staticInitialization@() + IL_0000: call void Decimal_comparison::staticInitialization@() IL_0005: ret } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.net472.release.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.net472.release.bsl index 80ec0a5a81b..d8e329dc67d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.net472.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.net472.release.bsl @@ -17,16 +17,6 @@ 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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -40,7 +30,7 @@ -.class public abstract auto ansi sealed Decimal_comparison_RealInternalSignatureOn +.class public abstract auto ansi sealed Decimal_comparison 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 ) @@ -49,8 +39,8 @@ .maxstack 8 IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$Decimal_comparison_RealInternalSignatureOn::init@ - IL_0006: ldsfld int32 ''.$Decimal_comparison_RealInternalSignatureOn::init@ + IL_0001: stsfld int32 ''.$Decimal_comparison::init@ + IL_0006: ldsfld int32 ''.$Decimal_comparison::init@ IL_000b: pop IL_000c: ret } @@ -250,7 +240,7 @@ } -.class private abstract auto ansi sealed ''.$Decimal_comparison_RealInternalSignatureOn +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [runtime]System.Object { .field static assembly int32 init@ @@ -262,7 +252,7 @@ .entrypoint .maxstack 8 - IL_0000: call void Decimal_comparison_RealInternalSignatureOn::staticInitialization@() + IL_0000: call void Decimal_comparison::staticInitialization@() IL_0005: ret } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.debug.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.debug.bsl index 9de0631aca0..e50b5c153fd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.debug.bsl @@ -17,16 +17,6 @@ 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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -40,7 +30,7 @@ -.class public abstract auto ansi sealed Decimal_comparison_RealInternalSignatureOn +.class public abstract auto ansi sealed Decimal_comparison 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 ) @@ -49,8 +39,8 @@ .maxstack 8 IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$Decimal_comparison_RealInternalSignatureOn::init@ - IL_0006: ldsfld int32 ''.$Decimal_comparison_RealInternalSignatureOn::init@ + IL_0001: stsfld int32 ''.$Decimal_comparison::init@ + IL_0006: ldsfld int32 ''.$Decimal_comparison::init@ IL_000b: pop IL_000c: ret } @@ -250,7 +240,7 @@ } -.class private abstract auto ansi sealed ''.$Decimal_comparison_RealInternalSignatureOn +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [runtime]System.Object { .field static assembly int32 init@ @@ -262,7 +252,7 @@ .entrypoint .maxstack 8 - IL_0000: call void Decimal_comparison_RealInternalSignatureOn::staticInitialization@() + IL_0000: call void Decimal_comparison::staticInitialization@() IL_0005: ret } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.release.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.release.bsl index 80ec0a5a81b..e50b5c153fd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.net472.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.release.bsl @@ -8,7 +8,7 @@ .assembly extern netstandard { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) - .ver 2:0:0:0 + .ver 2:1:0:0 } .assembly assembly { @@ -17,16 +17,6 @@ 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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -40,7 +30,7 @@ -.class public abstract auto ansi sealed Decimal_comparison_RealInternalSignatureOn +.class public abstract auto ansi sealed Decimal_comparison 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 ) @@ -49,8 +39,8 @@ .maxstack 8 IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$Decimal_comparison_RealInternalSignatureOn::init@ - IL_0006: ldsfld int32 ''.$Decimal_comparison_RealInternalSignatureOn::init@ + IL_0001: stsfld int32 ''.$Decimal_comparison::init@ + IL_0006: ldsfld int32 ''.$Decimal_comparison::init@ IL_000b: pop IL_000c: ret } @@ -250,7 +240,7 @@ } -.class private abstract auto ansi sealed ''.$Decimal_comparison_RealInternalSignatureOn +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [runtime]System.Object { .field static assembly int32 init@ @@ -262,7 +252,7 @@ .entrypoint .maxstack 8 - IL_0000: call void Decimal_comparison_RealInternalSignatureOn::staticInitialization@() + IL_0000: call void Decimal_comparison::staticInitialization@() IL_0005: ret } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs deleted file mode 100644 index 1097b688029..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.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 From 23bb60501313a9a1e24f2cbaee7a8cd7386b474a Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Wed, 8 Jan 2025 18:07:06 +0100 Subject: [PATCH 06/21] remove unnecessary overrides (#18208) --- tests/FSharp.Test.Utilities/TestConsole.fs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/FSharp.Test.Utilities/TestConsole.fs b/tests/FSharp.Test.Utilities/TestConsole.fs index b28cd398408..654b74ce49d 100644 --- a/tests/FSharp.Test.Utilities/TestConsole.fs +++ b/tests/FSharp.Test.Utilities/TestConsole.fs @@ -26,8 +26,6 @@ module TestConsole = override _.Encoding = Encoding.UTF8 override _.Write(value: char) = holder.Value.Write(value) - override _.Write(value: string) = holder.Value.Write(value) - override _.WriteLine(value: string) = holder.Value.WriteLine(value) member _.Value = holder.Value member _.Set (writer: TextWriter) = holder.Value <- writer @@ -47,8 +45,6 @@ module TestConsole = do redirecting.Set this override _.Encoding = Encoding.UTF8 override _.Write(value: char) = wrapped.Write(value); base.Write(value) - override _.Write(value: string) = wrapped.Write(value); base.Write(value) - override _.WriteLine(value: string) = wrapped.WriteLine(value); base.Write(value) override _.Dispose (disposing: bool) = redirecting.Set wrapped base.Dispose(disposing: bool) From 9ac324d1dddc724beae75dd11a933b2212fcf975 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Thu, 9 Jan 2025 12:26:48 +0000 Subject: [PATCH 07/21] Show obsolete warnings/errors when used with unit of measure (#18182) --- .../.FSharp.Compiler.Service/9.0.200.md | 1 + src/Compiler/Checking/AttributeChecking.fs | 22 +- src/Compiler/Checking/AttributeChecking.fsi | 2 + src/Compiler/Checking/CheckDeclarations.fs | 13 +- src/Compiler/Checking/CheckPatterns.fs | 2 +- src/Compiler/Checking/ConstraintSolver.fs | 29 +- .../Checking/Expressions/CheckExpressions.fs | 69 ++-- .../Checking/Expressions/CheckExpressions.fsi | 1 - src/Compiler/Checking/TypeRelations.fs | 6 +- src/Compiler/Checking/import.fs | 14 +- src/Compiler/Service/ItemKey.fs | 2 +- src/Compiler/Symbols/Exprs.fs | 3 +- src/Compiler/Symbols/Symbols.fs | 14 +- src/Compiler/SyntaxTree/SyntaxTree.fs | 12 + src/Compiler/SyntaxTree/SyntaxTree.fsi | 2 + src/Compiler/TypedTree/TypedTree.fs | 17 +- src/Compiler/TypedTree/TypedTree.fsi | 8 +- src/Compiler/TypedTree/TypedTreeOps.fs | 82 +++-- src/Compiler/TypedTree/TypedTreeOps.fsi | 2 + src/Compiler/TypedTree/TypedTreePickle.fs | 18 +- .../ObsoleteAttributeCheckingTests.fs | 345 +++++++++++++++++- ...ervice.SurfaceArea.netstandard20.debug.bsl | 2 + ...vice.SurfaceArea.netstandard20.release.bsl | 2 + 23 files changed, 554 insertions(+), 114 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md index b9046b9f446..8edf6f814d1 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md @@ -21,6 +21,7 @@ * Completion: fix qualified completion in sequence expressions [PR #18111](https://github.com/dotnet/fsharp/pull/18111) * Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups ([PR #18124](https://github.com/dotnet/fsharp/pull/18124)) * Shim/file system: fix leaks of the shim [PR #18144](https://github.com/dotnet/fsharp/pull/18144) +* Fix for `Obsolete` attribute warning/error not taken into account when used with a unit of measure [PR #18182](https://github.com/dotnet/fsharp/pull/18182) ### Added diff --git a/src/Compiler/Checking/AttributeChecking.fs b/src/Compiler/Checking/AttributeChecking.fs index 8ef659ac20e..563af942829 100644 --- a/src/Compiler/Checking/AttributeChecking.fs +++ b/src/Compiler/Checking/AttributeChecking.fs @@ -417,7 +417,27 @@ let CheckEntityAttributes g (tcref: TyconRef) m = CheckFSharpAttributes g tcref.Attribs m let CheckILEventAttributes g (tcref: TyconRef) cattrs m = - CheckILAttributes g (isByrefLikeTyconRef g m tcref) cattrs m + CheckILAttributes g (isByrefLikeTyconRef g m tcref) cattrs m + +let CheckUnitOfMeasureAttributes g (measure: Measure) = + let checkAttribs tm m = + let attribs = + ListMeasureConOccsWithNonZeroExponents g true tm + |> List.map fst + |> List.map(_.Attribs) + |> List.concat + + CheckFSharpAttributes g attribs m |> CommitOperationResult + + match measure with + | Measure.Const(range = m) -> checkAttribs measure m + | Measure.Inv ms -> checkAttribs measure ms.Range + | Measure.One(m) -> checkAttribs measure m + | Measure.RationalPower(measure = ms1) -> checkAttribs measure ms1.Range + | Measure.Prod(measure1= ms1; measure2= ms2) -> + checkAttribs ms1 ms1.Range + checkAttribs ms2 ms2.Range + | Measure.Var(typar) -> checkAttribs measure typar.Range /// Check the attributes associated with a method, returning warnings and errors as data. let CheckMethInfoAttributes g m tyargsOpt (minfo: MethInfo) = diff --git a/src/Compiler/Checking/AttributeChecking.fsi b/src/Compiler/Checking/AttributeChecking.fsi index b4a608ef1d1..663198f9247 100644 --- a/src/Compiler/Checking/AttributeChecking.fsi +++ b/src/Compiler/Checking/AttributeChecking.fsi @@ -89,6 +89,8 @@ val CheckEntityAttributes: g: TcGlobals -> tcref: TyconRef -> m: range -> Operat val CheckUnionCaseAttributes: g: TcGlobals -> x: UnionCaseRef -> m: range -> OperationResult +val CheckUnitOfMeasureAttributes: g: TcGlobals -> measure: Measure -> unit + val CheckRecdFieldAttributes: g: TcGlobals -> x: RecdFieldRef -> m: range -> OperationResult val CheckValAttributes: g: TcGlobals -> x: ValRef -> m: range -> OperationResult diff --git a/src/Compiler/Checking/CheckDeclarations.fs b/src/Compiler/Checking/CheckDeclarations.fs index bec5c9d9966..23c547b36b8 100644 --- a/src/Compiler/Checking/CheckDeclarations.fs +++ b/src/Compiler/Checking/CheckDeclarations.fs @@ -3241,6 +3241,13 @@ module EstablishTypeDefinitionCores = warning(Error(FSComp.SR.chkAttributeAliased(attrib.TypeRef.FullName), tycon.Id.idRange)) | _ -> () + // Check for attributes in unit-of-measure declarations + // [] type x = 1 + // ^ + match stripTyEqns g ty with + | TType_measure tm -> CheckUnitOfMeasureAttributes g tm + | _ -> () + checkAttributeAliased ty tycon g.attrib_AutoOpenAttribute checkAttributeAliased ty tycon g.attrib_StructAttribute @@ -3807,11 +3814,11 @@ module EstablishTypeDefinitionCores = and accInMeasure measureTy acc = match stripUnitEqns measureTy with - | Measure.Const tcref when ListSet.contains (===) tcref.Deref tycons -> + | Measure.Const(tyconRef= tcref) when ListSet.contains (===) tcref.Deref tycons -> (tycon, tcref.Deref) :: acc - | Measure.Const tcref when tcref.IsTypeAbbrev -> + | Measure.Const(tyconRef= tcref) when tcref.IsTypeAbbrev -> accInMeasure (reduceTyconRefAbbrevMeasureable tcref) acc - | Measure.Prod (ms1, ms2) -> accInMeasure ms1 (accInMeasure ms2 acc) + | Measure.Prod(measure1= ms1; measure2= ms2) -> accInMeasure ms1 (accInMeasure ms2 acc) | Measure.Inv invTy -> accInMeasure invTy acc | _ -> acc diff --git a/src/Compiler/Checking/CheckPatterns.fs b/src/Compiler/Checking/CheckPatterns.fs index 487c66b0c8c..5d447da6021 100644 --- a/src/Compiler/Checking/CheckPatterns.fs +++ b/src/Compiler/Checking/CheckPatterns.fs @@ -803,7 +803,7 @@ and TcPatLongIdentLiteral warnOnUpper (cenv: cenv) env vFlags patEnv ty (mLongId match vref.LiteralValue with | None -> error (Error(FSComp.SR.tcNonLiteralCannotBeUsedInPattern(), m)) | Some lit -> - let _, _, _, vexpty, _, _ = TcVal true cenv env tpenv vref None None mLongId + let _, _, _, vexpty, _, _ = TcVal cenv env tpenv vref None None mLongId CheckValAccessible mLongId env.AccessRights vref CheckFSharpAttributes g vref.Attribs mLongId |> CommitOperationResult CheckNoArgsForLiteral args m diff --git a/src/Compiler/Checking/ConstraintSolver.fs b/src/Compiler/Checking/ConstraintSolver.fs index 8be7ec551ea..82141080743 100644 --- a/src/Compiler/Checking/ConstraintSolver.fs +++ b/src/Compiler/Checking/ConstraintSolver.fs @@ -42,6 +42,7 @@ module internal FSharp.Compiler.ConstraintSolver +open FSharp.Compiler.Text.Range open Internal.Utilities.Collections open Internal.Utilities.Library open Internal.Utilities.Library.Extras @@ -734,7 +735,7 @@ let SubstMeasureWarnIfRigid (csenv: ConstraintSolverEnv) trace (v: Typar) ms = // Propagate static requirements from 'tp' to 'ty' do! SolveTypStaticReq csenv trace v.StaticReq (TType_measure ms) SubstMeasure v ms - if v.Rigidity = TyparRigidity.Anon && measureEquiv csenv.g ms Measure.One then + if v.Rigidity = TyparRigidity.Anon && measureEquiv csenv.g ms (Measure.One ms.Range) then return! WarnD(Error(FSComp.SR.csCodeLessGeneric(), v.Range)) else () @@ -760,17 +761,17 @@ let UnifyMeasureWithOne (csenv: ConstraintSolverEnv) trace ms = match FindPreferredTypar nonRigidVars with | (v, e) :: vs -> let unexpandedCons = ListMeasureConOccsWithNonZeroExponents csenv.g false ms - let newms = ProdMeasures (List.map (fun (c, e') -> Measure.RationalPower (Measure.Const c, NegRational (DivRational e' e))) unexpandedCons + let newms = ProdMeasures (List.map (fun (c, e') -> Measure.RationalPower(Measure.Const(c, ms.Range), NegRational (DivRational e' e))) unexpandedCons @ List.map (fun (v, e') -> Measure.RationalPower (Measure.Var v, NegRational (DivRational e' e))) (vs @ rigidVars)) SubstMeasureWarnIfRigid csenv trace v newms // Otherwise we require ms to be 1 - | [] -> if measureEquiv csenv.g ms Measure.One then CompleteD else localAbortD + | [] -> if measureEquiv csenv.g ms (Measure.One ms.Range) then CompleteD else localAbortD /// Imperatively unify unit-of-measure expression ms1 against ms2 let UnifyMeasures (csenv: ConstraintSolverEnv) trace ms1 ms2 = - UnifyMeasureWithOne csenv trace (Measure.Prod(ms1, Measure.Inv ms2)) + UnifyMeasureWithOne csenv trace (Measure.Prod(ms1, Measure.Inv ms2, (unionRanges ms1.Range ms2.Range))) /// Simplify a unit-of-measure expression ms that forms part of a type scheme. /// We make substitutions for vars, which are the (remaining) bound variables @@ -791,7 +792,7 @@ let SimplifyMeasure g vars ms = let newms = ProdMeasures [ for (c, e') in nonZeroCon do - Measure.RationalPower (Measure.Const c, NegRational (DivRational e' e)) + Measure.RationalPower (Measure.Const(c, ms.Range), NegRational (DivRational e' e)) for (v', e') in nonZeroVar do if typarEq v v' then newvarExpr @@ -1329,13 +1330,13 @@ and SolveTypeEqualsType (csenv: ConstraintSolverEnv) ndeep m2 (trace: OptionalTr // Catch float<_>=float<1>, float32<_>=float32<1> and decimal<_>=decimal<1> | (_, TType_app (tc2, [ms2], _)) when (tc2.IsMeasureableReprTycon && typeEquiv csenv.g sty1 (reduceTyconRefMeasureableOrProvided csenv.g tc2 [ms2])) -> trackErrors { - do! SolveTypeEqualsType csenv ndeep m2 trace None (TType_measure Measure.One) ms2 + do! SolveTypeEqualsType csenv ndeep m2 trace None (TType_measure(Measure.One m2)) ms2 do! SolveNullnessEquiv csenv m2 trace ty1 ty2 (nullnessOfTy g sty1) (nullnessOfTy g sty2) } | (TType_app (tc1, [ms1], _), _) when (tc1.IsMeasureableReprTycon && typeEquiv csenv.g sty2 (reduceTyconRefMeasureableOrProvided csenv.g tc1 [ms1])) -> trackErrors { - do! SolveTypeEqualsType csenv ndeep m2 trace None ms1 (TType_measure Measure.One) + do! SolveTypeEqualsType csenv ndeep m2 trace None ms1 (TType_measure(Measure.One m2)) do! SolveNullnessEquiv csenv m2 trace ty1 ty2 (nullnessOfTy g sty1) (nullnessOfTy g sty2) } @@ -1518,13 +1519,13 @@ and SolveTypeSubsumesType (csenv: ConstraintSolverEnv) ndeep m2 (trace: Optional // Enforce the identities float=float<1>, float32=float32<1> and decimal=decimal<1> | _, TType_app (tc2, [ms2], _) when tc2.IsMeasureableReprTycon && typeEquiv csenv.g sty1 (reduceTyconRefMeasureableOrProvided csenv.g tc2 [ms2]) -> trackErrors { - do! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms2 (TType_measure Measure.One) + do! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms2 (TType_measure(Measure.One m2)) do! SolveNullnessSubsumesNullness csenv m2 trace ty1 ty2 (nullnessOfTy g sty1) (nullnessOfTy g sty2) } | TType_app (tc1, [ms1], _), _ when tc1.IsMeasureableReprTycon && typeEquiv csenv.g sty2 (reduceTyconRefMeasureableOrProvided csenv.g tc1 [ms1]) -> trackErrors { - do! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms1 (TType_measure Measure.One) + do! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms1 (TType_measure(Measure.One m2)) do! SolveNullnessSubsumesNullness csenv m2 trace ty1 ty2 (nullnessOfTy g sty1) (nullnessOfTy g sty2) } @@ -1620,7 +1621,7 @@ and DepthCheck ndeep m = and SolveDimensionlessNumericType (csenv: ConstraintSolverEnv) ndeep m2 trace ty = match getMeasureOfType csenv.g ty with | Some (tcref, _) -> - SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace ty (mkWoNullAppTy tcref [TType_measure Measure.One]) + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace ty (mkWoNullAppTy tcref [TType_measure(Measure.One m2)]) | None -> CompleteD @@ -1727,7 +1728,7 @@ and SolveMemberConstraint (csenv: ConstraintSolverEnv) ignoreUnresolvedOverload | Some (tcref, ms1) -> let ms2 = freshMeasure () do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argTy2 (mkWoNullAppTy tcref [TType_measure ms2]) - do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure (Measure.Prod(ms1, if nm = "op_Multiply" then ms2 else Measure.Inv ms2))]) + do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure (Measure.Prod(ms1, (if nm = "op_Multiply" then ms2 else Measure.Inv ms2), unionRanges ms1.Range ms2.Range))]) return TTraitBuiltIn | _ -> @@ -1736,7 +1737,7 @@ and SolveMemberConstraint (csenv: ConstraintSolverEnv) ignoreUnresolvedOverload | Some (tcref, ms2) -> let ms1 = freshMeasure () do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argTy1 (mkWoNullAppTy tcref [TType_measure ms1]) - do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure (Measure.Prod(ms1, if nm = "op_Multiply" then ms2 else Measure.Inv ms2))]) + do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure (Measure.Prod(ms1, (if nm = "op_Multiply" then ms2 else Measure.Inv ms2), unionRanges ms1.Range ms2.Range))]) return TTraitBuiltIn | _ -> @@ -1870,7 +1871,7 @@ and SolveMemberConstraint (csenv: ConstraintSolverEnv) ignoreUnresolvedOverload match getMeasureOfType g argTy1 with | Some (tcref, _) -> let ms1 = freshMeasure () - do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argTy1 (mkWoNullAppTy tcref [TType_measure (Measure.Prod (ms1, ms1))]) + do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argTy1 (mkWoNullAppTy tcref [TType_measure (Measure.Prod (ms1, ms1, ms1.Range))]) do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure ms1]) return TTraitBuiltIn | None -> @@ -1923,7 +1924,7 @@ and SolveMemberConstraint (csenv: ConstraintSolverEnv) ignoreUnresolvedOverload do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argTy2 argTy1 match getMeasureOfType g argTy1 with | None -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy argTy1 - | Some (tcref, _) -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure Measure.One]) + | Some (tcref, ms) -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure(Measure.One ms.Range)]) return TTraitBuiltIn | _ -> diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 16dc49c1a61..9987f02759c 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -798,27 +798,28 @@ let TcConst (cenv: cenv) (overallTy: TType) m env synConst = let g = cenv.g let rec tcMeasure ms = match ms with - | SynMeasure.One _ -> Measure.One + | SynMeasure.One m -> Measure.One m | SynMeasure.Named(tc, m) -> let ad = env.eAccessRights let _, tcref, _ = ForceRaise(ResolveTypeLongIdent cenv.tcSink cenv.nameResolver ItemOccurrence.Use OpenQualified env.eNameResEnv ad tc TypeNameResolutionStaticArgsInfo.DefiniteEmpty PermitDirectReferenceToGeneratedType.No) match tcref.TypeOrMeasureKind with | TyparKind.Type -> error(Error(FSComp.SR.tcExpectedUnitOfMeasureNotType(), m)) - | TyparKind.Measure -> Measure.Const tcref + | TyparKind.Measure -> Measure.Const(tcref, ms.Range) | SynMeasure.Power(measure = ms; power = exponent) -> Measure.RationalPower (tcMeasure ms, TcSynRationalConst exponent) - | SynMeasure.Product(measure1 = ms1; measure2 = ms2) -> Measure.Prod(tcMeasure ms1, tcMeasure ms2) + | SynMeasure.Product(measure1 = ms1; measure2 = ms2; range= m) -> + Measure.Prod(tcMeasure ms1, tcMeasure ms2, m) | SynMeasure.Divide(ms1, _, (SynMeasure.Seq (_ :: _ :: _, _) as ms2), m) -> warning(Error(FSComp.SR.tcImplicitMeasureFollowingSlash(), m)) let factor1 = ms1 |> Option.defaultValue (SynMeasure.One Range.Zero) - Measure.Prod(tcMeasure factor1, Measure.Inv (tcMeasure ms2)) - | SynMeasure.Divide(measure1 = ms1; measure2 = ms2) -> + Measure.Prod(tcMeasure factor1, Measure.Inv (tcMeasure ms2), ms.Range) + | SynMeasure.Divide(measure1 = ms1; measure2 = ms2; range= m) -> let factor1 = ms1 |> Option.defaultValue (SynMeasure.One Range.Zero) - Measure.Prod(tcMeasure factor1, Measure.Inv (tcMeasure ms2)) + Measure.Prod(tcMeasure factor1, Measure.Inv (tcMeasure ms2), ms.Range) | SynMeasure.Seq(mss, _) -> ProdMeasures (List.map tcMeasure mss) | SynMeasure.Anon _ -> error(Error(FSComp.SR.tcUnexpectedMeasureAnon(), m)) - | SynMeasure.Var(_, m) -> error(Error(FSComp.SR.tcNonZeroConstantCannotHaveGenericUnit(), m)) - | SynMeasure.Paren(measure, _) -> tcMeasure measure + | SynMeasure.Var(range= m) -> error(Error(FSComp.SR.tcNonZeroConstantCannotHaveGenericUnit(), m)) + | SynMeasure.Paren(measure= measure) -> tcMeasure measure let unif expectedTy = UnifyTypes cenv env m overallTy expectedTy @@ -829,7 +830,7 @@ let TcConst (cenv: cenv) (overallTy: TType) m env synConst = (mkWoNullAppTy tcr [TType_measure (Measure.Var (NewAnonTypar (TyparKind.Measure, m, TyparRigidity.Anon, (if iszero then TyparStaticReq.None else TyparStaticReq.HeadType), TyparDynamicReq.No)))]) | SynConst.Measure(synMeasure = ms) -> mkWoNullAppTy tcr [TType_measure (tcMeasure ms)] - | _ -> mkWoNullAppTy tcr [TType_measure Measure.One] + | _ -> mkWoNullAppTy tcr [TType_measure(Measure.One m)] unif measureTy let expandedMeasurablesEnabled = @@ -2739,7 +2740,7 @@ let TcValEarlyGeneralizationConsistencyCheck (cenv: cenv) (env: TcEnv) (v: Val, /// instantiationInfoOpt is is also set when building the final call for a reference to an /// F# object model member, in which case the instantiationInfoOpt is the type instantiation /// inferred by member overload resolution. -let TcVal checkAttributes (cenv: cenv) env (tpenv: UnscopedTyparEnv) (vref: ValRef) instantiationInfoOpt optAfterResolution m = +let TcVal (cenv: cenv) env (tpenv: UnscopedTyparEnv) (vref: ValRef) instantiationInfoOpt optAfterResolution m = let g = cenv.g let tpsorig, _, _, _, tinst, _ as res = @@ -2749,8 +2750,7 @@ let TcVal checkAttributes (cenv: cenv) env (tpenv: UnscopedTyparEnv) (vref: ValR CheckValAccessible m env.eAccessRights vref - if checkAttributes then - CheckValAttributes g vref m |> CommitOperationResult + CheckValAttributes g vref m |> CommitOperationResult let vTy = vref.Type @@ -3046,7 +3046,7 @@ let BuildPossiblyConditionalMethodCall (cenv: cenv) env isMutable m isProp minfo | _ -> #endif let tcVal valref valUse ttypes m = - let _, exprForVal, _, tau, _, _ = TcVal true cenv env emptyUnscopedTyparEnv valref (Some (valUse, (fun x _ -> ttypes, x))) None m + let _, exprForVal, _, tau, _, _ = TcVal cenv env emptyUnscopedTyparEnv valref (Some (valUse, (fun x _ -> ttypes, x))) None m exprForVal, tau BuildMethodCall tcVal g cenv.amap isMutable m isProp minfo valUseFlags minst objArgs args staticTyOpt @@ -4550,7 +4550,7 @@ and TcLongIdentType kindOpt (cenv: cenv) newOk checkConstraints occ iwsam env tp error(Error(FSComp.SR.tcExpectedUnitOfMeasureNotType(), m)) TType_measure (NewErrorMeasure ()), tpenv | _, TyparKind.Measure -> - TType_measure (Measure.Const tcref), tpenv + TType_measure (Measure.Const(tcref, m)), tpenv | _, TyparKind.Type -> TcTypeApp cenv newOk checkConstraints occ env tpenv m tcref tinstEnclosing [] inst @@ -4585,7 +4585,7 @@ and TcLongIdentAppType kindOpt (cenv: cenv) newOk checkConstraints occ iwsam env match args, postfix with | [arg], true -> let ms, tpenv = TcMeasure cenv newOk checkConstraints occ env tpenv arg m - TType_measure (Measure.Prod(Measure.Const tcref, ms)), tpenv + TType_measure (Measure.Prod(Measure.Const(tcref, tcref.Range), ms, ms.Range)), tpenv | _, _ -> errorR(Error(FSComp.SR.tcUnitsOfMeasureInvalidInTypeConstructor(), m)) @@ -4715,7 +4715,7 @@ and TcTypeStaticConstant kindOpt tpenv c m = errorR(Error(FSComp.SR.parsInvalidLiteralInType(), m)) NewErrorType (), tpenv | SynConst.Int32 1, _ -> - TType_measure Measure.One, tpenv + TType_measure (Measure.One m), tpenv | _ -> errorR(Error(FSComp.SR.parsInvalidLiteralInType(), m)) NewErrorType (), tpenv @@ -4736,7 +4736,7 @@ and TcTypeMeasureApp kindOpt (cenv: cenv) newOk checkConstraints occ env tpenv a | (None | Some TyparKind.Measure), [arg2], true -> let ms1, tpenv = TcMeasure cenv newOk checkConstraints occ env tpenv arg1 m1 let ms2, tpenv = TcMeasure cenv newOk checkConstraints occ env tpenv arg2 m - TType_measure (Measure.Prod(ms1, ms2)), tpenv + TType_measure (Measure.Prod(ms1, ms2, unionRanges ms1.Range ms2.Range)), tpenv | _ -> errorR(Error(FSComp.SR.tcTypeParameterInvalidAsTypeConstructor(), m)) @@ -4810,12 +4810,13 @@ and TcMeasuresAsTuple (cenv: cenv) newOk checkConstraints occ env (tpenv: Unscop gather args tpenv ms1 | SynTupleTypeSegment.Star _ :: SynTupleTypeSegment.Type ty :: args -> let ms1, tpenv = TcMeasure cenv newOk checkConstraints occ env tpenv ty m - gather args tpenv (Measure.Prod(acc, ms1)) + gather args tpenv (Measure.Prod(acc, ms1, unionRanges acc.Range ms1.Range)) | SynTupleTypeSegment.Slash _ :: SynTupleTypeSegment.Type ty :: args -> let ms1, tpenv = TcMeasure cenv newOk checkConstraints occ env tpenv ty m - gather args tpenv (Measure.Prod(acc, Measure.Inv ms1)) + let ms2 = Measure.Inv ms1 + gather args tpenv (Measure.Prod(acc, ms2, unionRanges acc.Range ms2.Range)) | _ -> failwith "impossible" - gather args tpenv Measure.One + gather args tpenv (Measure.One m) and TcTypesOrMeasures optKinds (cenv: cenv) newOk checkConstraints occ env tpenv args m = match optKinds with @@ -4823,7 +4824,15 @@ and TcTypesOrMeasures optKinds (cenv: cenv) newOk checkConstraints occ env tpenv List.mapFold (TcTypeOrMeasure None cenv newOk checkConstraints occ WarnOnIWSAM.Yes env) tpenv args | Some kinds -> if List.length kinds = List.length args then - List.mapFold (fun tpenv (arg, kind) -> TcTypeOrMeasure (Some kind) cenv newOk checkConstraints occ WarnOnIWSAM.Yes env tpenv arg) tpenv (List.zip args kinds) + let ttypes, tpenv = List.mapFold (fun tpenv (arg, kind) -> TcTypeOrMeasure (Some kind) cenv newOk checkConstraints occ WarnOnIWSAM.Yes env tpenv arg) tpenv (List.zip args kinds) + + for ttype in ttypes do + match stripTyEqns cenv.g ttype with + | TType_measure tm -> CheckUnitOfMeasureAttributes cenv.g tm + | _ -> () + + ttypes, tpenv + elif isNil kinds then error(Error(FSComp.SR.tcUnexpectedTypeArguments(), m)) else error(Error(FSComp.SR.tcTypeParameterArityMismatch((List.length kinds), (List.length args)), m)) @@ -5077,7 +5086,7 @@ and TcTypeOrMeasureAndRecover kindOpt (cenv: cenv) newOk checkConstraints occ iw let recoveryTy = match kindOpt, newOk with - | Some TyparKind.Measure, NoNewTypars -> TType_measure Measure.One + | Some TyparKind.Measure, NoNewTypars -> TType_measure(Measure.One ty.Range) | Some TyparKind.Measure, _ -> TType_measure (NewErrorMeasure ()) | _, NoNewTypars -> g.obj_ty_ambivalent | _ -> NewErrorType () @@ -5163,7 +5172,7 @@ and TcPatLongIdentActivePatternCase warnOnUpper (cenv: cenv) (env: TcEnv) vFlags CallNameResolutionSink cenv.tcSink (mLongId, env.NameEnv, item, emptyTyparInst, ItemOccurrence.Pattern, env.eAccessRights) // TOTAL/PARTIAL ACTIVE PATTERNS - let _, vExpr, _, _, tinst, _ = TcVal true cenv env tpenv vref None None m + let _, vExpr, _, _, tinst, _ = TcVal cenv env tpenv vref None None m let vExpr = MakeApplicableExprWithFlex cenv env vExpr let vExprTy = vExpr.Type @@ -7673,6 +7682,14 @@ and TcConstExpr cenv (overallTy: OverallTy) env m tpenv c = TcNonPropagatingExprLeafThenConvert cenv overallTy env m (fun () -> let cTy = NewInferenceType g let c' = TcConst cenv cTy m env c + let rec checkAttributeInMeasure ty = + match stripTyEqns g ty with + | TType_app(typeInstantiation= ttypes) -> ttypes |> List.iter checkAttributeInMeasure + | TType_fun(rangeType= rangeType) -> checkAttributeInMeasure rangeType + | TType_measure tm -> CheckUnitOfMeasureAttributes g tm + | _ -> () + + checkAttributeInMeasure cTy Expr.Const (c', m, cTy), cTy, tpenv) //------------------------------------------------------------------------- @@ -9258,7 +9275,7 @@ and TcValueItemThen cenv overallTy env vref tpenv mItem afterResolution delayed error (Error(FSComp.SR.expressionHasNoName(), mExprAndTypeArgs)) | _ -> let checkTys tpenv kinds = TcTypesOrMeasures (Some kinds) cenv NewTyparsOK CheckCxs ItemOccurrence.UseInType env tpenv tys mItem - let _, vExpr, isSpecial, _, _, tpenv = TcVal true cenv env tpenv vref (Some (NormalValUse, checkTys)) (Some afterResolution) mItem + let _, vExpr, isSpecial, _, _, tpenv = TcVal cenv env tpenv vref (Some (NormalValUse, checkTys)) (Some afterResolution) mItem let vexpFlex = (if isSpecial then MakeApplicableExprNoFlex cenv vExpr else MakeApplicableExprWithFlex cenv env vExpr) // We need to eventually record the type resolution for an expression, but this is done @@ -9267,7 +9284,7 @@ and TcValueItemThen cenv overallTy env vref tpenv mItem afterResolution delayed // Value get | _ -> - let _, vExpr, isSpecial, _, _, tpenv = TcVal true cenv env tpenv vref None (Some afterResolution) mItem + let _, vExpr, isSpecial, _, _, tpenv = TcVal cenv env tpenv vref None (Some afterResolution) mItem let vExpr, tpenv = match vExpr with @@ -11155,7 +11172,7 @@ and TcNormalizedBinding declKind (cenv: cenv) env tpenv overallTy safeThisValOpt let supportEnforceAttributeTargets = (g.langVersion.SupportsFeature(LanguageFeature.EnforceAttributeTargets) && memberFlagsOpt.IsNone && not attrs.IsEmpty) - && not isVolatile // // VolatileFieldAttribute has a special treatment(specific error FS823) + && not isVolatile // VolatileFieldAttribute has a special treatment(specific error FS823) if supportEnforceAttributeTargets then TcAttributeTargetsOnLetBindings { cenv with tcSink = TcResultsSink.NoSink } env attrs overallPatTy overallExprTy (not declaredTypars.IsEmpty) isClassLetBinding diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fsi b/src/Compiler/Checking/Expressions/CheckExpressions.fsi index 0e4e17a8f83..ed18b07a58a 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fsi +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fsi @@ -919,7 +919,6 @@ val TcPatLongIdentActivePatternCase: val ConvSynPatToSynExpr: synPat: SynPat -> SynExpr val TcVal: - checkAttributes: bool -> cenv: TcFileState -> env: TcEnv -> tpenv: UnscopedTyparEnv -> diff --git a/src/Compiler/Checking/TypeRelations.fs b/src/Compiler/Checking/TypeRelations.fs index 6c38b68d80a..d180bb778dd 100644 --- a/src/Compiler/Checking/TypeRelations.fs +++ b/src/Compiler/Checking/TypeRelations.fs @@ -176,7 +176,7 @@ let ChooseTyparSolutionAndRange (g: TcGlobals) amap (tp:Typar) = let initialTy = match tp.Kind with | TyparKind.Type -> g.obj_ty_noNulls - | TyparKind.Measure -> TType_measure Measure.One + | TyparKind.Measure -> TType_measure(Measure.One m) // Loop through the constraints computing the lub (((initialTy, false), m), tp.Constraints) ||> List.fold (fun ((maxTy, isRefined), _) tpc -> let join m x = @@ -226,8 +226,8 @@ let ChooseTyparSolutionAndRange (g: TcGlobals) amap (tp:Typar) = maxTy, m let ChooseTyparSolution g amap tp = - let ty, _m = ChooseTyparSolutionAndRange g amap tp - if tp.Rigidity = TyparRigidity.Anon && typeEquiv g ty (TType_measure Measure.One) then + let ty, m = ChooseTyparSolutionAndRange g amap tp + if tp.Rigidity = TyparRigidity.Anon && typeEquiv g ty (TType_measure(Measure.One m)) then warning(Error(FSComp.SR.csCodeLessGeneric(), tp.Range)) ty diff --git a/src/Compiler/Checking/import.fs b/src/Compiler/Checking/import.fs index a1deee1c8a1..c40fd73b234 100644 --- a/src/Compiler/Checking/import.fs +++ b/src/Compiler/Checking/import.fs @@ -6,6 +6,7 @@ module internal FSharp.Compiler.Import open System.Collections.Concurrent open System.Collections.Generic open System.Collections.Immutable +open FSharp.Compiler.Text.Range open Internal.Utilities.Library open Internal.Utilities.Library.Extras open Internal.Utilities.TypeHashing @@ -553,16 +554,19 @@ let rec ImportProvidedType (env: ImportMap) (m: range) (* (tinst: TypeInst) *) ( if tp.Kind = TyparKind.Measure then let rec conv ty = match ty with - | TType_app (tcref, [ty1;ty2], _) when tyconRefEq g tcref g.measureproduct_tcr -> Measure.Prod (conv ty1, conv ty2) + | TType_app (tcref, [ty1;ty2], _) when tyconRefEq g tcref g.measureproduct_tcr -> + let ms1: Measure = conv ty1 + let ms2: Measure = conv ty2 + Measure.Prod(ms1, ms2, unionRanges ms1.Range ms2.Range) | TType_app (tcref, [ty1], _) when tyconRefEq g tcref g.measureinverse_tcr -> Measure.Inv (conv ty1) - | TType_app (tcref, [], _) when tyconRefEq g tcref g.measureone_tcr -> Measure.One - | TType_app (tcref, [], _) when tcref.TypeOrMeasureKind = TyparKind.Measure -> Measure.Const tcref + | TType_app (tcref, [], _) when tyconRefEq g tcref g.measureone_tcr -> Measure.One(tcref.Range) + | TType_app (tcref, [], _) when tcref.TypeOrMeasureKind = TyparKind.Measure -> Measure.Const(tcref, tcref.Range) | TType_app (tcref, _, _) -> errorR(Error(FSComp.SR.impInvalidMeasureArgument1(tcref.CompiledName, tp.Name), m)) - Measure.One + Measure.One(tcref.Range) | _ -> errorR(Error(FSComp.SR.impInvalidMeasureArgument2(tp.Name), m)) - Measure.One + Measure.One(Range.Zero) TType_measure (conv genericArg) else diff --git a/src/Compiler/Service/ItemKey.fs b/src/Compiler/Service/ItemKey.fs index 3c030f84c90..49cdda18940 100644 --- a/src/Compiler/Service/ItemKey.fs +++ b/src/Compiler/Service/ItemKey.fs @@ -362,7 +362,7 @@ and [] ItemKeyStoreBuilder(tcGlobals: TcGlobals) = | Measure.Var typar -> writeString ItemKeyTags.typeMeasureVar writeTypar isStandalone typar - | Measure.Const tcref -> + | Measure.Const(tyconRef = tcref) -> writeString ItemKeyTags.typeMeasureCon writeEntityRef tcref | _ -> () diff --git a/src/Compiler/Symbols/Exprs.fs b/src/Compiler/Symbols/Exprs.fs index 91480597cc2..5ec81f6861d 100644 --- a/src/Compiler/Symbols/Exprs.fs +++ b/src/Compiler/Symbols/Exprs.fs @@ -3,6 +3,7 @@ namespace FSharp.Compiler.Symbols open FSharp.Compiler +open FSharp.Compiler.Text.Range open Internal.Utilities.Library open Internal.Utilities.Library.Extras open FSharp.Compiler.AbstractIL.IL @@ -775,7 +776,7 @@ module FSharpExprConvert = let argTy2 = tyOfExpr g arg2 let resTy = match getMeasureOfType g argTy1, getMeasureOfType g argTy2 with - | Some (tcref, ms1), Some (_tcref2, ms2) -> mkWoNullAppTy tcref [TType_measure (Measure.Prod(ms1, if isMul then ms2 else Measure.Inv ms2))] + | Some (tcref, ms1), Some (_tcref2, ms2) -> mkWoNullAppTy tcref [TType_measure (Measure.Prod(ms1, (if isMul then ms2 else Measure.Inv ms2), unionRanges ms1.Range ms2.Range))] | Some _, None -> argTy1 | None, Some _ -> argTy2 | None, None -> argTy1 diff --git a/src/Compiler/Symbols/Symbols.fs b/src/Compiler/Symbols/Symbols.fs index c2772cf8736..36823f65dc0 100644 --- a/src/Compiler/Symbols/Symbols.fs +++ b/src/Compiler/Symbols/Symbols.fs @@ -2512,9 +2512,9 @@ type FSharpType(cenv, ty:TType) = DiagnosticsLogger.protectAssemblyExploration true <| fun () -> match stripTyparEqns ty with | TType_app (tcref, tyargs, _) -> FSharpEntity(cenv, tcref, tyargs).IsUnresolved - | TType_measure (Measure.Const tcref) -> FSharpEntity(cenv, tcref).IsUnresolved + | TType_measure (Measure.Const(tyconRef= tcref)) -> FSharpEntity(cenv, tcref).IsUnresolved | TType_measure (Measure.Prod _) -> FSharpEntity(cenv, cenv.g.measureproduct_tcr).IsUnresolved - | TType_measure Measure.One -> FSharpEntity(cenv, cenv.g.measureone_tcr).IsUnresolved + | TType_measure (Measure.One _) -> FSharpEntity(cenv, cenv.g.measureone_tcr).IsUnresolved | TType_measure (Measure.Inv _) -> FSharpEntity(cenv, cenv.g.measureinverse_tcr).IsUnresolved | _ -> false @@ -2528,7 +2528,7 @@ type FSharpType(cenv, ty:TType) = isResolved() && protect <| fun () -> match stripTyparEqns ty with - | TType_app _ | TType_measure (Measure.Const _ | Measure.Prod _ | Measure.Inv _ | Measure.One) -> true + | TType_app _ | TType_measure (Measure.Const _ | Measure.Prod _ | Measure.Inv _ | Measure.One _) -> true | _ -> false member _.IsMeasureType = @@ -2556,9 +2556,9 @@ type FSharpType(cenv, ty:TType) = protect <| fun () -> match stripTyparEqns ty with | TType_app (tcref, tyargs, _) -> FSharpEntity(cenv, tcref, tyargs) - | TType_measure (Measure.Const tcref) -> FSharpEntity(cenv, tcref) + | TType_measure (Measure.Const(tyconRef= tcref)) -> FSharpEntity(cenv, tcref) | TType_measure (Measure.Prod _) -> FSharpEntity(cenv, cenv.g.measureproduct_tcr) - | TType_measure Measure.One -> FSharpEntity(cenv, cenv.g.measureone_tcr) + | TType_measure (Measure.One _) -> FSharpEntity(cenv, cenv.g.measureone_tcr) | TType_measure (Measure.Inv _) -> FSharpEntity(cenv, cenv.g.measureinverse_tcr) | _ -> invalidOp "not a named type" @@ -2587,8 +2587,8 @@ type FSharpType(cenv, ty:TType) = | TType_tuple (_, tyargs) -> (tyargs |> List.map (fun ty -> FSharpType(cenv, ty)) |> makeReadOnlyCollection) | TType_fun(domainTy, rangeTy, _) -> [| FSharpType(cenv, domainTy); FSharpType(cenv, rangeTy) |] |> makeReadOnlyCollection | TType_measure (Measure.Const _) -> [| |] |> makeReadOnlyCollection - | TType_measure (Measure.Prod (t1, t2)) -> [| FSharpType(cenv, TType_measure t1); FSharpType(cenv, TType_measure t2) |] |> makeReadOnlyCollection - | TType_measure Measure.One -> [| |] |> makeReadOnlyCollection + | TType_measure (Measure.Prod(measure1= t1; measure2 = t2)) -> [| FSharpType(cenv, TType_measure t1); FSharpType(cenv, TType_measure t2) |] |> makeReadOnlyCollection + | TType_measure (Measure.One _) -> [| |] |> makeReadOnlyCollection | TType_measure (Measure.Inv t1) -> [| FSharpType(cenv, TType_measure t1) |] |> makeReadOnlyCollection | _ -> invalidOp "not a named type" diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index 8977e8fba6b..bd918e8848a 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -202,6 +202,18 @@ type SynMeasure = | Paren of measure: SynMeasure * range: range + member x.Range = + match x with + | SynMeasure.Named(range = m) + | SynMeasure.Product(range = m) + | SynMeasure.Seq(range = m) + | SynMeasure.Divide(range = m) + | SynMeasure.Power(range = m) + | SynMeasure.One(range = m) + | SynMeasure.Anon(range = m) + | SynMeasure.Var(range = m) + | SynMeasure.Paren(range = m) -> m + [] type SynRationalConst = diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index 654a3971175..f50adfa289d 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -213,6 +213,8 @@ type SynMeasure = /// A parenthesized measure | Paren of measure: SynMeasure * range: range + member Range: range + /// Represents an unchecked syntax tree of F# unit of measure exponents. [] type SynRationalConst = diff --git a/src/Compiler/TypedTree/TypedTree.fs b/src/Compiler/TypedTree/TypedTree.fs index 1aaa21eb294..11ff117cc25 100644 --- a/src/Compiler/TypedTree/TypedTree.fs +++ b/src/Compiler/TypedTree/TypedTree.fs @@ -4559,16 +4559,16 @@ type Measure = | Var of typar: Typar /// A constant, leaf unit-of-measure such as 'kg' or 'm' - | Const of tyconRef: TyconRef + | Const of tyconRef: TyconRef * range: range /// A product of two units of measure - | Prod of measure1: Measure * measure2: Measure + | Prod of measure1: Measure * measure2: Measure * range: range /// An inverse of a units of measure expression | Inv of measure: Measure /// The unit of measure '1', e.g. float = float<1> - | One + | One of range: range /// Raising a measure to a rational power | RationalPower of measure: Measure * power: Rational @@ -4577,7 +4577,16 @@ type Measure = //[] //member x.DebugText = x.ToString() - override x.ToString() = sprintf "%+A" x + override x.ToString() = sprintf "%+A" x + + member x.Range = + match x with + | Var(typar) -> typar.Range + | Const(range= m) -> m + | Prod(range= m) -> m + | Inv(m) -> m.Range + | One(range= m) -> m + | RationalPower(measure= ms) -> ms.Range type Attribs = Attrib list diff --git a/src/Compiler/TypedTree/TypedTree.fsi b/src/Compiler/TypedTree/TypedTree.fsi index 73eeb760b4c..82a0a8d84c4 100644 --- a/src/Compiler/TypedTree/TypedTree.fsi +++ b/src/Compiler/TypedTree/TypedTree.fsi @@ -3202,22 +3202,24 @@ type Measure = | Var of typar: Typar /// A constant, leaf unit-of-measure such as 'kg' or 'm' - | Const of tyconRef: TyconRef + | Const of tyconRef: TyconRef * range: range /// A product of two units of measure - | Prod of measure1: Measure * measure2: Measure + | Prod of measure1: Measure * measure2: Measure * range: range /// An inverse of a units of measure expression | Inv of measure: Measure /// The unit of measure '1', e.g. float = float<1> - | One + | One of range: range /// Raising a measure to a rational power | RationalPower of measure: Measure * power: Rational override ToString: unit -> string + member Range: range + type Attribs = Attrib list [] diff --git a/src/Compiler/TypedTree/TypedTreeOps.fs b/src/Compiler/TypedTree/TypedTreeOps.fs index ca7292c6369..e2bc362c784 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.fs @@ -228,12 +228,12 @@ let rec remapTypeAux (tyenv: Remap) (ty: TType) = and remapMeasureAux tyenv unt = match unt with - | Measure.One -> unt - | Measure.Const tcref -> - match tyenv.tyconRefRemap.TryFind tcref with - | Some tcref -> Measure.Const tcref + | Measure.One _ -> unt + | Measure.Const(entityRef, m) -> + match tyenv.tyconRefRemap.TryFind entityRef with + | Some tcref -> Measure.Const(tcref, m) | None -> unt - | Measure.Prod(u1, u2) -> Measure.Prod(remapMeasureAux tyenv u1, remapMeasureAux tyenv u2) + | Measure.Prod(u1, u2, m) -> Measure.Prod(remapMeasureAux tyenv u1, remapMeasureAux tyenv u2, m) | Measure.RationalPower(u, q) -> Measure.RationalPower(remapMeasureAux tyenv u, q) | Measure.Inv u -> Measure.Inv(remapMeasureAux tyenv u) | Measure.Var tp as unt -> @@ -444,7 +444,7 @@ let reduceTyconRefAbbrevMeasureable (tcref: TyconRef) = let rec stripUnitEqnsFromMeasureAux canShortcut unt = match stripUnitEqnsAux canShortcut unt with - | Measure.Const tcref when tcref.IsTypeAbbrev -> + | Measure.Const(tyconRef= tcref) when tcref.IsTypeAbbrev -> stripUnitEqnsFromMeasureAux canShortcut (reduceTyconRefAbbrevMeasureable tcref) | m -> m @@ -457,20 +457,20 @@ let stripUnitEqnsFromMeasure m = stripUnitEqnsFromMeasureAux false m /// What is the contribution of unit-of-measure constant ucref to unit-of-measure expression measure? let rec MeasureExprConExponent g abbrev ucref unt = match (if abbrev then stripUnitEqnsFromMeasure unt else stripUnitEqns unt) with - | Measure.Const ucrefR -> if tyconRefEq g ucrefR ucref then OneRational else ZeroRational + | Measure.Const(tyconRef= ucrefR) -> if tyconRefEq g ucrefR ucref then OneRational else ZeroRational | Measure.Inv untR -> NegRational(MeasureExprConExponent g abbrev ucref untR) - | Measure.Prod(unt1, unt2) -> AddRational(MeasureExprConExponent g abbrev ucref unt1) (MeasureExprConExponent g abbrev ucref unt2) - | Measure.RationalPower(untR, q) -> MulRational (MeasureExprConExponent g abbrev ucref untR) q + | Measure.Prod(measure1= unt1; measure2= unt2) -> AddRational(MeasureExprConExponent g abbrev ucref unt1) (MeasureExprConExponent g abbrev ucref unt2) + | Measure.RationalPower(measure= untR; power= q) -> MulRational (MeasureExprConExponent g abbrev ucref untR) q | _ -> ZeroRational /// What is the contribution of unit-of-measure constant ucref to unit-of-measure expression measure /// after remapping tycons? let rec MeasureConExponentAfterRemapping g r ucref unt = match stripUnitEqnsFromMeasure unt with - | Measure.Const ucrefR -> if tyconRefEq g (r ucrefR) ucref then OneRational else ZeroRational + | Measure.Const(tyconRef= ucrefR) -> if tyconRefEq g (r ucrefR) ucref then OneRational else ZeroRational | Measure.Inv untR -> NegRational(MeasureConExponentAfterRemapping g r ucref untR) - | Measure.Prod(unt1, unt2) -> AddRational(MeasureConExponentAfterRemapping g r ucref unt1) (MeasureConExponentAfterRemapping g r ucref unt2) - | Measure.RationalPower(untR, q) -> MulRational (MeasureConExponentAfterRemapping g r ucref untR) q + | Measure.Prod(measure1= unt1; measure2= unt2) -> AddRational(MeasureConExponentAfterRemapping g r ucref unt1) (MeasureConExponentAfterRemapping g r ucref unt2) + | Measure.RationalPower(measure= untR; power= q) -> MulRational (MeasureConExponentAfterRemapping g r ucref untR) q | _ -> ZeroRational /// What is the contribution of unit-of-measure variable tp to unit-of-measure expression unt? @@ -478,8 +478,8 @@ let rec MeasureVarExponent tp unt = match stripUnitEqnsFromMeasure unt with | Measure.Var tpR -> if typarEq tp tpR then OneRational else ZeroRational | Measure.Inv untR -> NegRational(MeasureVarExponent tp untR) - | Measure.Prod(unt1, unt2) -> AddRational(MeasureVarExponent tp unt1) (MeasureVarExponent tp unt2) - | Measure.RationalPower(untR, q) -> MulRational (MeasureVarExponent tp untR) q + | Measure.Prod(measure1= unt1; measure2= unt2) -> AddRational(MeasureVarExponent tp unt1) (MeasureVarExponent tp unt2) + | Measure.RationalPower(measure = untR; power= q) -> MulRational (MeasureVarExponent tp untR) q | _ -> ZeroRational /// List the *literal* occurrences of unit variables in a unit expression, without repeats @@ -487,8 +487,8 @@ let ListMeasureVarOccs unt = let rec gather acc unt = match stripUnitEqnsFromMeasure unt with | Measure.Var tp -> if List.exists (typarEq tp) acc then acc else tp :: acc - | Measure.Prod(unt1, unt2) -> gather (gather acc unt1) unt2 - | Measure.RationalPower(untR, _) -> gather acc untR + | Measure.Prod(measure1= unt1; measure2= unt2) -> gather (gather acc unt1) unt2 + | Measure.RationalPower(measure= untR) -> gather acc untR | Measure.Inv untR -> gather acc untR | _ -> acc gather [] unt @@ -502,9 +502,9 @@ let ListMeasureVarOccsWithNonZeroExponents untexpr = else let e = MeasureVarExponent tp untexpr if e = ZeroRational then acc else (tp, e) :: acc - | Measure.Prod(unt1, unt2) -> gather (gather acc unt1) unt2 + | Measure.Prod(measure1= unt1; measure2= unt2) -> gather (gather acc unt1) unt2 | Measure.Inv untR -> gather acc untR - | Measure.RationalPower(untR, _) -> gather acc untR + | Measure.RationalPower(measure= untR) -> gather acc untR | _ -> acc gather [] untexpr @@ -512,13 +512,13 @@ let ListMeasureVarOccsWithNonZeroExponents untexpr = let ListMeasureConOccsWithNonZeroExponents g eraseAbbrevs untexpr = let rec gather acc unt = match (if eraseAbbrevs then stripUnitEqnsFromMeasure unt else stripUnitEqns unt) with - | Measure.Const c -> + | Measure.Const(tyconRef= c) -> if List.exists (fun (cR, _) -> tyconRefEq g c cR) acc then acc else let e = MeasureExprConExponent g eraseAbbrevs c untexpr if e = ZeroRational then acc else (c, e) :: acc - | Measure.Prod(unt1, unt2) -> gather (gather acc unt1) unt2 + | Measure.Prod(measure1= unt1; measure2= unt2) -> gather (gather acc unt1) unt2 | Measure.Inv untR -> gather acc untR - | Measure.RationalPower(untR, _) -> gather acc untR + | Measure.RationalPower(measure= untR) -> gather acc untR | _ -> acc gather [] untexpr @@ -527,9 +527,9 @@ let ListMeasureConOccsWithNonZeroExponents g eraseAbbrevs untexpr = let ListMeasureConOccsAfterRemapping g r unt = let rec gather acc unt = match stripUnitEqnsFromMeasure unt with - | Measure.Const c -> if List.exists (tyconRefEq g (r c)) acc then acc else r c :: acc - | Measure.Prod(unt1, unt2) -> gather (gather acc unt1) unt2 - | Measure.RationalPower(untR, _) -> gather acc untR + | Measure.Const(tyconRef= c) -> if List.exists (tyconRefEq g (r c)) acc then acc else r c :: acc + | Measure.Prod(measure1= unt1; measure2= unt2) -> gather (gather acc unt1) unt2 + | Measure.RationalPower(measure= untR) -> gather acc untR | Measure.Inv untR -> gather acc untR | _ -> acc @@ -538,19 +538,19 @@ let ListMeasureConOccsAfterRemapping g r unt = /// Construct a measure expression representing the n'th power of a measure let MeasurePower u n = if n = 1 then u - elif n = 0 then Measure.One + elif n = 0 then Measure.One(range0) else Measure.RationalPower (u, intToRational n) let MeasureProdOpt m1 m2 = match m1, m2 with - | Measure.One, _ -> m2 - | _, Measure.One -> m1 - | _, _ -> Measure.Prod (m1, m2) + | Measure.One _, _ -> m2 + | _, Measure.One _ -> m1 + | _, _ -> Measure.Prod (m1, m2, unionRanges m1.Range m2.Range) /// Construct a measure expression representing the product of a list of measures let ProdMeasures ms = match ms with - | [] -> Measure.One + | [] -> Measure.One(range0) | m :: ms -> List.foldBack MeasureProdOpt ms m let isDimensionless g ty = @@ -580,9 +580,23 @@ let normalizeMeasure g ms = let vs = ListMeasureVarOccsWithNonZeroExponents ms let cs = ListMeasureConOccsWithNonZeroExponents g false ms match vs, cs with - | [], [] -> Measure.One + | [], [] -> Measure.One(ms.Range) | [(v, e)], [] when e = OneRational -> Measure.Var v - | vs, cs -> List.foldBack (fun (v, e) -> fun m -> Measure.Prod (Measure.RationalPower (Measure.Var v, e), m)) vs (List.foldBack (fun (c, e) -> fun m -> Measure.Prod (Measure.RationalPower (Measure.Const c, e), m)) cs Measure.One) + | vs, cs -> + List.foldBack + (fun (v, e) -> + fun unt -> + let measureVar = Measure.Var(v) + let measureRational = Measure.RationalPower(measureVar, e) + Measure.Prod(measureRational, unt, unionRanges measureRational.Range unt.Range)) + vs + (List.foldBack + (fun (c, e) -> + fun unt -> + let measureConst = Measure.Const(c, c.Range) + let measureRational = Measure.RationalPower(measureConst, e) + let prodM = unionRanges measureConst.Range unt.Range + Measure.Prod(measureRational, unt, prodM)) cs (Measure.One(ms.Range))) let tryNormalizeMeasureInType g ty = match ty with @@ -916,14 +930,14 @@ let tryNiceEntityRefOfTy ty = let ty = stripTyparEqnsAux KnownWithoutNull false ty match ty with | TType_app (tcref, _, _) -> ValueSome tcref - | TType_measure (Measure.Const tcref) -> ValueSome tcref + | TType_measure (Measure.Const(tyconRef= tcref)) -> ValueSome tcref | _ -> ValueNone let tryNiceEntityRefOfTyOption ty = let ty = stripTyparEqnsAux KnownWithoutNull false ty match ty with | TType_app (tcref, _, _) -> Some tcref - | TType_measure (Measure.Const tcref) -> Some tcref + | TType_measure (Measure.Const(tyconRef= tcref)) -> Some tcref | _ -> None let mkInstForAppTy g ty = @@ -1159,7 +1173,7 @@ let getMeasureOfType g ty = match ty with | AppTy g (tcref, [tyarg]) -> match stripTyEqns g tyarg with - | TType_measure ms when not (measureEquiv g ms Measure.One) -> Some (tcref, ms) + | TType_measure ms when not (measureEquiv g ms (Measure.One(tcref.Range))) -> Some (tcref, ms) | _ -> None | _ -> None diff --git a/src/Compiler/TypedTree/TypedTreeOps.fsi b/src/Compiler/TypedTree/TypedTreeOps.fsi index bda6c2c3187..6433cf16d3e 100755 --- a/src/Compiler/TypedTree/TypedTreeOps.fsi +++ b/src/Compiler/TypedTree/TypedTreeOps.fsi @@ -843,6 +843,8 @@ val CollectAllNoCaching: FreeVarOptions val CollectAll: FreeVarOptions +val ListMeasureVarOccs: Measure -> Typar list + val accFreeInTypes: FreeVarOptions -> TType list -> FreeTyvars -> FreeTyvars val accFreeInType: FreeVarOptions -> TType -> FreeTyvars -> FreeTyvars diff --git a/src/Compiler/TypedTree/TypedTreePickle.fs b/src/Compiler/TypedTree/TypedTreePickle.fs index 3ce2e68396d..d2b3bd0ec79 100644 --- a/src/Compiler/TypedTree/TypedTreePickle.fs +++ b/src/Compiler/TypedTree/TypedTreePickle.fs @@ -1535,7 +1535,7 @@ let p_measure_one = p_byte 4 // Pickle a unit-of-measure variable or constructor let p_measure_varcon unt st = match unt with - | Measure.Const tcref -> p_measure_con tcref st + | Measure.Const(tyconRef= tcref) -> p_measure_con tcref st | Measure.Var v -> p_measure_var v st | _ -> pfailwith st "p_measure_varcon: expected measure variable or constructor" @@ -1564,12 +1564,12 @@ let rec p_measure_power unt q st = let rec p_normalized_measure unt st = let unt = stripUnitEqnsAux false unt match unt with - | Measure.Const tcref -> p_measure_con tcref st + | Measure.Const(tyconRef= tcref) -> p_measure_con tcref st | Measure.Inv x -> p_byte 1 st; p_normalized_measure x st - | Measure.Prod(x1, x2) -> p_byte 2 st; p_normalized_measure x1 st; p_normalized_measure x2 st + | Measure.Prod(measure1= x1; measure2= x2) -> p_byte 2 st; p_normalized_measure x1 st; p_normalized_measure x2 st | Measure.Var v -> p_measure_var v st - | Measure.One -> p_measure_one st - | Measure.RationalPower(x, q) -> p_measure_power x q st + | Measure.One _ -> p_measure_one st + | Measure.RationalPower(measure= x; power= q) -> p_measure_power x q st // By normalizing the unit-of-measure and treating integer powers as a special case, // we ensure that the pickle format for rational powers of units (byte 5 followed by @@ -1585,11 +1585,11 @@ let u_rational st = let rec u_measure_expr st = let tag = u_byte st match tag with - | 0 -> let a = u_tcref st in Measure.Const a + | 0 -> let a = u_tcref st in Measure.Const(a, range0) | 1 -> let a = u_measure_expr st in Measure.Inv a - | 2 -> let a, b = u_tup2 u_measure_expr u_measure_expr st in Measure.Prod (a, b) - | 3 -> let a = u_tpref st in Measure.Var a - | 4 -> Measure.One + | 2 -> let a, b = u_tup2 u_measure_expr u_measure_expr st in Measure.Prod (a, b, range0) + | 3 -> let a = u_tpref st in Measure.Var(a) + | 4 -> Measure.One(range0) | 5 -> let a = u_measure_expr st in let b = u_rational st in Measure.RationalPower (a, b) | _ -> ufailwith st "u_measure_expr" diff --git a/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs index 002bef2f41b..d9a8bfb28f0 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs @@ -1,6 +1,5 @@ namespace Language -open FSharp.Test open Xunit open FSharp.Test.Compiler @@ -37,6 +36,350 @@ let c = C() (Warning 44, Line 7, Col 9, Line 7, Col 10, "This construct is deprecated. Use B instead") ] + + [] + let ``Obsolete attribute warning taken into account when used with a literal`` () = + Fsx """ +open System +[] +let myLit = 12 + +let myRes = myLit + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 6, Col 13, Line 6, Col 18, "This construct is deprecated. Use lit2") + ] + + [] + let ``Obsolete attribute error taken into account when used with a literal`` () = + Fsx """ +open System +[] +let myLit = 12 + +let myRes = myLit + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 101, Line 6, Col 13, Line 6, Col 18, "This construct is deprecated. Use lit2") + ] + + [] + let ``Obsolete attribute warning taken into account when used with a simple unit of measure`` () = + Fsx """ +open System +[] +type cm + +let myCm = 3 + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 6, Col 14, Line 6, Col 16, "This construct is deprecated. Use cm2") + ] + + [] + let ``Obsolete attribute error taken into account when used with a simple unit of measure`` () = + Fsx """ +open System +[] +type cm + +let myCm = 3 + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 101, Line 6, Col 14, Line 6, Col 16, "This construct is deprecated. Use cm2") + ] + + [] + let ``Obsolete attribute warning taken into account when used with a simple unit of measure type abbrev`` () = + Fsx """ +open System +[] type cm + +[] type ml = cm^3 + +type Mls = int * int + +type IMl2 = + abstract member Ml2 : x: int * y: int -> int + abstract member Ml3 : x: int * y: int -> int + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 5, Col 23, Line 5, Col 25, "This construct is deprecated. Use something else") + (Warning 44, Line 7, Col 16, Line 7, Col 18, "This construct is deprecated. Use something else") + (Warning 44, Line 7, Col 26, Line 7, Col 28, "This construct is deprecated. Use something else") + (Warning 44, Line 10, Col 34, Line 10, Col 36, "This construct is deprecated. Use something else") + (Warning 44, Line 10, Col 47, Line 10, Col 49, "This construct is deprecated. Use something else") + (Warning 44, Line 11, Col 34, Line 11, Col 36, "This construct is deprecated. Use something else") + (Warning 44, Line 11, Col 47, Line 11, Col 49, "This construct is deprecated. Use something else") + (Warning 44, Line 11, Col 58, Line 11, Col 60, "This construct is deprecated. Use something else") + ] + + [] + let ``Obsolete attribute error taken into account when used with a simple unit of measure type abbrev`` () = + Fsx """ +open System +[] type cm + +[] type ml = cm^3 + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 101, Line 5, Col 23, Line 5, Col 25, "This construct is deprecated. Use something else") + ] + + [] + let ``Obsolete attribute warning taken into account when used with a complex unit of measure definition`` () = + Fsx """ +open System +[] +type kg + +[] type m + +[] +type s + +// Force, Newtons. +[] type N = kg m / s^2 + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 12, Col 22, Line 12, Col 24, "This construct is deprecated. Use kg2"); + (Warning 44, Line 12, Col 29, Line 12, Col 30, "This construct is deprecated. Use s2") + ] + + [] + let ``Obsolete attribute error taken into account when used with a complex unit of measure definition`` () = + Fsx """ +open System +[] +type kg + +[] type m + +[] +type s + +// Force, Newtons. +[] type N = kg m / s^2 + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 101, Line 12, Col 22, Line 12, Col 24, "This construct is deprecated. Use kg2"); + ] + + [] + let ``Obsolete attribute warning taken into account when used within a complex unit of measure`` () = + Fsx """ +open System + +[] +type kg + +[] +type cm + +let myCm = 3 + +let cm2 = 3 * 3 + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 10, Col 14, Line 10, Col 16, "This construct is deprecated. Use cm2"); + (Warning 44, Line 12, Col 13, Line 12, Col 15, "This construct is deprecated. Use cm2"); + (Warning 44, Line 12, Col 24, Line 12, Col 26, "This construct is deprecated. Use cm2") + ] + + [] + let ``Obsolete attribute warning taken into account when used within a complex unit of measure. Define conversion constants.`` () = + Fsx """ +open System + +[] +type m + +[] +type cm + +let cmPerMeter : float = 100.0 +let mPerCm = 0.01 + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 10, Col 24, Line 10, Col 26, "This construct is deprecated. Use cm2") + (Warning 44, Line 10, Col 27, Line 10, Col 28, "This construct is deprecated. Use m2") + (Warning 44, Line 10, Col 38, Line 10, Col 40, "This construct is deprecated. Use cm2") + (Warning 44, Line 10, Col 41, Line 10, Col 42, "This construct is deprecated. Use m2") + (Warning 44, Line 11, Col 19, Line 11, Col 20, "This construct is deprecated. Use m2") + (Warning 44, Line 11, Col 21, Line 11, Col 23, "This construct is deprecated. Use cm2") + ] + + [] + let ``Obsolete attribute warning taken into account when used with a complex(multiple obsolete) unit of measure`` () = + Fsx """ +open System + +[] +type kg + +[] +type cm + +let myCm = 3 + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 10, Col 14, Line 10, Col 16, "This construct is deprecated. Use cm2"); + (Warning 44, Line 10, Col 17, Line 10, Col 19, "This construct is deprecated. Use kg2") + ] + + [] + let ``TopLevel - Obsolete attribute warning taken into account when used with a complex(multiple obsolete) unit of measure usages`` () = + Fsx """ +open System +// Distance, meters. +[] type m + +// Time, seconds. +[] type s + +let genericSumUnits (x: float<'u>) (y: float<'u>) = x + y + +let genericSumUnits2 (x: float) (y: float) = () + +let genericSumUnits3 (x: float) (y: float) (z: float) = () + +let genericSumUnits4 (x: float, y: float) = () + +let genericSumUnits5 (x: float, y: float, z: float) = () + +let v1 = 3.1 +let v2 = 2.7 +let x1 = 1.2 +let t1 = 1.0 + +let result1 = genericSumUnits v1 v2 + +let res = System.Collections.Generic.Dictionary,int>() + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 11, Col 32, Line 11, Col 33, "This construct is deprecated. Use m2") + (Warning 44, Line 11, Col 46, Line 11, Col 47, "This construct is deprecated. Use s2") + (Warning 44, Line 13, Col 32, Line 13, Col 33, "This construct is deprecated. Use m2") + (Warning 44, Line 13, Col 46, Line 13, Col 47, "This construct is deprecated. Use s2") + (Warning 44, Line 13, Col 60, Line 13, Col 61, "This construct is deprecated. Use m2") + (Warning 44, Line 15, Col 32, Line 15, Col 33, "This construct is deprecated. Use m2") + (Warning 44, Line 15, Col 45, Line 15, Col 46, "This construct is deprecated. Use s2") + (Warning 44, Line 17, Col 32, Line 17, Col 33, "This construct is deprecated. Use m2") + (Warning 44, Line 17, Col 45, Line 17, Col 46, "This construct is deprecated. Use s2") + (Warning 44, Line 17, Col 58, Line 17, Col 59, "This construct is deprecated. Use m2") + (Warning 44, Line 19, Col 14, Line 19, Col 15, "This construct is deprecated. Use m2") + (Warning 44, Line 19, Col 16, Line 19, Col 17, "This construct is deprecated. Use s2") + (Warning 44, Line 20, Col 14, Line 20, Col 15, "This construct is deprecated. Use m2") + (Warning 44, Line 20, Col 16, Line 20, Col 17, "This construct is deprecated. Use s2") + (Warning 44, Line 21, Col 14, Line 21, Col 15, "This construct is deprecated. Use m2") + (Warning 44, Line 22, Col 14, Line 22, Col 15, "This construct is deprecated. Use s2") + (Warning 44, Line 26, Col 53, Line 26, Col 54, "This construct is deprecated. Use m2") + (Warning 44, Line 26, Col 60, Line 26, Col 61, "This construct is deprecated. Use s2") + ] + + [] + let ``Class- Obsolete attribute warning taken into account when used with a complex(multiple obsolete) unit of measure usages`` () = + Fsx """ +open System +// Distance, meters. +[] type m + +// Time, seconds. +[] type s + +type MyClass() = + let genericSumUnits (x: float<'u>) (y: float<'u>) = x + y + + let genericSumUnits2 (x: float) (y: float) = () + + static let genericSumUnits3 (x: float) (y: float) (z: float) = () + + let genericSumUnits4 (x: float, y: float) = () + + let genericSumUnits5 (x: float, y: float, z: float) = () + + member this.Prop = 3.1 + + member this.Prop2 = 2.7 + + member this.Prop3 = 1.2 + + member this.Prop4 = 1.0 + + member this.GenericSumUnits (x: float<'u>) (y: float<'u>) = x + y + + member this.GenericSumUnits2 (x: float) (y: float) = () + + member this.GenericSumUnits3 (x: float) (y: float) (z: float) = () + + member this.GenericSumUnits4 (x: float, y: float) = () + + member this.GenericSumUnits5 (x: float, y: float, z: float) = () + +type A<[] 'u>(x: int) = + member _.X = x + +type B(x: int, y: int) = + member _.X = x + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 30, Col 44, Line 30, Col 45, "This construct is deprecated. Use m2") + (Warning 44, Line 30, Col 58, Line 30, Col 59, "This construct is deprecated. Use s2") + (Warning 44, Line 32, Col 44, Line 32, Col 45, "This construct is deprecated. Use m2") + (Warning 44, Line 32, Col 58, Line 32, Col 59, "This construct is deprecated. Use s2") + (Warning 44, Line 32, Col 72, Line 32, Col 73, "This construct is deprecated. Use m2") + (Warning 44, Line 34, Col 44, Line 34, Col 45, "This construct is deprecated. Use m2") + (Warning 44, Line 34, Col 57, Line 34, Col 58, "This construct is deprecated. Use s2") + (Warning 44, Line 36, Col 44, Line 36, Col 45, "This construct is deprecated. Use m2") + (Warning 44, Line 36, Col 57, Line 36, Col 58, "This construct is deprecated. Use s2") + (Warning 44, Line 36, Col 70, Line 36, Col 71, "This construct is deprecated. Use m2") + (Warning 44, Line 12, Col 36, Line 12, Col 37, "This construct is deprecated. Use m2") + (Warning 44, Line 12, Col 50, Line 12, Col 51, "This construct is deprecated. Use s2") + (Warning 44, Line 14, Col 43, Line 14, Col 44, "This construct is deprecated. Use m2") + (Warning 44, Line 14, Col 57, Line 14, Col 58, "This construct is deprecated. Use s2") + (Warning 44, Line 14, Col 71, Line 14, Col 72, "This construct is deprecated. Use m2") + (Warning 44, Line 16, Col 36, Line 16, Col 37, "This construct is deprecated. Use m2") + (Warning 44, Line 16, Col 49, Line 16, Col 50, "This construct is deprecated. Use s2") + (Warning 44, Line 18, Col 36, Line 18, Col 37, "This construct is deprecated. Use m2") + (Warning 44, Line 18, Col 49, Line 18, Col 50, "This construct is deprecated. Use s2") + (Warning 44, Line 18, Col 62, Line 18, Col 63, "This construct is deprecated. Use m2") + (Warning 44, Line 20, Col 28, Line 20, Col 29, "This construct is deprecated. Use m2") + (Warning 44, Line 20, Col 30, Line 20, Col 31, "This construct is deprecated. Use s2") + (Warning 44, Line 22, Col 29, Line 22, Col 30, "This construct is deprecated. Use m2") + (Warning 44, Line 22, Col 31, Line 22, Col 32, "This construct is deprecated. Use s2") + (Warning 44, Line 24, Col 29, Line 24, Col 30, "This construct is deprecated. Use m2") + (Warning 44, Line 26, Col 29, Line 26, Col 30, "This construct is deprecated. Use s2") + (Warning 44, Line 38, Col 31, Line 38, Col 32, "This construct is deprecated. Use m2") + (Warning 44, Line 41, Col 15, Line 41, Col 16, "This construct is deprecated. Use m2") + (Warning 44, Line 41, Col 26, Line 41, Col 27, "This construct is deprecated. Use s2") + ] + [] let ``Obsolete attribute error taken into account when used instantiating a type`` () = Fsx """ diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index cf5037bc449..6004f3fb62d 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -8116,6 +8116,8 @@ FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure+Product FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure+Seq FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure+Tags FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure+Var +FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Text.Range Range +FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Text.Range get_Range() FSharp.Compiler.Syntax.SynMeasure: Int32 Tag FSharp.Compiler.Syntax.SynMeasure: Int32 get_Tag() FSharp.Compiler.Syntax.SynMeasure: System.String ToString() diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index cf5037bc449..6004f3fb62d 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -8116,6 +8116,8 @@ FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure+Product FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure+Seq FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure+Tags FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure+Var +FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Text.Range Range +FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Text.Range get_Range() FSharp.Compiler.Syntax.SynMeasure: Int32 Tag FSharp.Compiler.Syntax.SynMeasure: Int32 get_Tag() FSharp.Compiler.Syntax.SynMeasure: System.String ToString() From 77e7e08838bb314f1448b24538d40cc8e2cb75c5 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Thu, 9 Jan 2025 14:32:00 +0100 Subject: [PATCH 08/21] Versioning for 17.14 and 9.0.300 (#18222) --- azure-pipelines.yml | 4 ++-- eng/Versions.props | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1e5aaebbdf9..95c03d1c0d4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,7 +29,7 @@ variables: # Should be 'current' release branch name, i.e. 'release/dev17.10' in dotnet/fsharp/refs/heads/main, 'release/dev17.10' in dotnet/fsharp/refs/heads/release/dev17.10 and 'release/dev17.9' in dotnet/fsharp/refs/heads/release/dev17.9 # Should **never** be 'main' in dotnet/fsharp/refs/heads/main, since it will start inserting to VS twice. - name: FSharpReleaseBranchName - value: release/dev17.13 + value: release/dev17.14 # VS Insertion branch name (NOT the same as F# branch) # Should be previous release branch or 'main' in 'main' and 'main' in release branch # (since for all *new* release branches we insert into VS main and for all *previous* releases we insert into corresponding VS release), @@ -88,7 +88,7 @@ extends: # Signed build # #-------------------------------------------------------------------------------------------------------------------# # Localization: we only run it for specific release branches - - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.13') }}: + - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.14') }}: - template: /eng/common/templates-official/job/onelocbuild.yml@self parameters: MirrorRepo: fsharp diff --git a/eng/Versions.props b/eng/Versions.props index 7727e2eda17..00bbbc51afb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -14,7 +14,7 @@ 9 0 - 200 + 300 0 @@ -53,7 +53,7 @@ 17 - 13 + 14 $(VSMajorVersion).0 $(VSMajorVersion).$(VSMinorVersion).0 $(VSAssemblyVersionPrefix).0 From b204f87d71db43a5640a36e91432f182beb83b41 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:46:29 +0100 Subject: [PATCH 09/21] Fix AsyncLazy cancellation (#18211) * fix AsyncLazy cancellation * baselines --- src/Compiler/Facilities/AsyncMemoize.fs | 65 +++++++------------ src/Compiler/Facilities/AsyncMemoize.fsi | 7 +- ...y_FSharp.Compiler.Service_Debug_net9.0.bsl | 12 ++-- ....Compiler.Service_Debug_netstandard2.0.bsl | 12 ++-- ...FSharp.Compiler.Service_Release_net9.0.bsl | 12 ++-- ...ompiler.Service_Release_netstandard2.0.bsl | 12 ++-- 6 files changed, 50 insertions(+), 70 deletions(-) diff --git a/src/Compiler/Facilities/AsyncMemoize.fs b/src/Compiler/Facilities/AsyncMemoize.fs index 2e45d131a28..991c8359312 100644 --- a/src/Compiler/Facilities/AsyncMemoize.fs +++ b/src/Compiler/Facilities/AsyncMemoize.fs @@ -18,6 +18,7 @@ type AsyncLazyState<'t> = /// Represents a computation that will execute only once but can be requested by multiple clients. /// It keeps track of the number of requests. When all clients cancel their requests, the underlying computation will also cancel and can be restarted. /// If cancelUnawaited is set to false, the computation will run to completion even when all requests are canceled. +/// When cacheException is false, subsequent requests will restart the computation after an exceptional result. type AsyncLazy<'t> private (initial: AsyncLazyState<'t>, cancelUnawaited: bool, cacheException: bool) = let stateUpdateSync = obj() @@ -33,6 +34,7 @@ type AsyncLazy<'t> private (initial: AsyncLazyState<'t>, cancelUnawaited: bool, let cancelIfUnawaited cancelUnawaited = function | Running(computation, _, cts, 0) when cancelUnawaited -> // To keep state updates fast we don't actually wait for the work to cancel. + // This means single execution is not strictly enforced. cts.Cancel() Initial computation | state -> state @@ -45,38 +47,27 @@ type AsyncLazy<'t> private (initial: AsyncLazyState<'t>, cancelUnawaited: bool, async { try let! ct = Async.CancellationToken - return! - // Using ContinueWith with a CancellationToken allows detaching from the running 'work' task. - // This ensures the lazy 'work' and its awaiting requests can be independently managed - // by separate CancellationTokenSources, enabling individual cancellation. - // Essentially, if this async computation is canceled, it won't wait for the 'work' to complete - // but will immediately proceed to the finally block. - work.ContinueWith((fun (t: Task<_>) -> t.Result), ct) - |> Async.AwaitTask - // Cancellation check before entering the `with` ensures TaskCanceledException coming from the ContinueWith task will never be raised here. - // The cancellation continuation will always be called in case of cancellation. - with exn -> return raise exn + // Using ContinueWith with a CancellationToken allows detaching from the running 'work' task. + // If the current async workflow is canceled, the 'work' task will continue running independently. + do! work.ContinueWith(ignore>, ct) |> Async.AwaitTask + with :? TaskCanceledException -> () + // If we're here it means there was no cancellation and the 'work' task has completed. + return! work |> Async.AwaitTask } + let onComplete (t: Task<'t>) = + updateState <| function + | Running (computation, _, _, _) -> + try Completed t.Result with exn -> if cacheException then Faulted exn else Initial computation + | state -> state + t.Result + let request = function | Initial computation -> let cts = new CancellationTokenSource() - let work = Async.StartAsTask( async { - try - let! result = computation - // If associated cts is signalled it means this work item was abandoned - // and it should not alter the state. - updateState <| function - | state when cts.IsCancellationRequested -> state - | _ -> Completed result - return result - with - | exn -> - updateState <| function - | state when cts.IsCancellationRequested -> state - | _ -> if cacheException then Faulted exn else Initial computation - return raise exn - }, cancellationToken = cts.Token) + let work = + Async.StartAsTask(computation, cancellationToken = cts.Token) + .ContinueWith(onComplete, TaskContinuationOptions.NotOnCanceled) Running (computation, work, cts, 1), detachable work | Running (c, work, cts, count) -> @@ -89,10 +80,10 @@ type AsyncLazy<'t> private (initial: AsyncLazyState<'t>, cancelUnawaited: bool, // computation will deallocate after state transition to Completed ot Faulted. new (computation, ?cancelUnawaited: bool, ?cacheException) = - AsyncLazy(Initial computation, defaultArg cancelUnawaited true, defaultArg cacheException false) + AsyncLazy(Initial computation, defaultArg cancelUnawaited true, defaultArg cacheException true) member _.Request() = - async { + async { try return! withStateUpdate request finally @@ -103,7 +94,7 @@ type AsyncLazy<'t> private (initial: AsyncLazyState<'t>, cancelUnawaited: bool, member _.State = state - member this.TryResult = + member _.TryResult = match state with | Completed result -> Some result | _ -> None @@ -164,12 +155,7 @@ type private KeyData<'TKey, 'TVersion> = type Job<'t> = AsyncLazy * CapturingDiagnosticsLogger> [] -type internal AsyncMemoize<'TKey, 'TVersion, 'TValue when 'TKey: equality and 'TVersion: equality -#if !NO_CHECKNULLS - and 'TKey:not null - and 'TVersion:not null -#endif - > +type internal AsyncMemoize<'TKey, 'TVersion, 'TValue when 'TKey: equality and 'TVersion: equality and 'TKey:not null and 'TVersion:not null> (?keepStrongly, ?keepWeakly, ?name: string, ?cancelUnawaitedJobs: bool, ?cancelDuplicateRunningJobs: bool) = let name = defaultArg name "N/A" @@ -211,8 +197,7 @@ type internal AsyncMemoize<'TKey, 'TVersion, 'TValue when 'TKey: equality and 'T } let wrappedComputation = - async { - use! _handler = Async.OnCancel (fun () -> log Canceled key) + Async.TryCancelled( async { let sw = Stopwatch.StartNew() log Started key let logger = CapturingDiagnosticsLogger "cache" @@ -226,14 +211,14 @@ type internal AsyncMemoize<'TKey, 'TVersion, 'TValue when 'TKey: equality and 'T | Choice2Of2 exn -> log Failed key return Result.Error exn, logger - } + }, fun _ -> log Canceled key) let getOrAdd () = let cached, otherVersions = cache.GetAll(key.Key, key.Version) let countHit v = Interlocked.Increment &hits |> ignore; v let cacheSetNewJob () = - let job = Job(wrappedComputation, cancelUnawaited = cancelUnawaitedJobs) + let job = Job(wrappedComputation, cancelUnawaited = cancelUnawaitedJobs, cacheException = false) cache.Set(key.Key, key.Version, key.Label, job) job diff --git a/src/Compiler/Facilities/AsyncMemoize.fsi b/src/Compiler/Facilities/AsyncMemoize.fsi index 37d2d397fe2..6b9ffb4f433 100644 --- a/src/Compiler/Facilities/AsyncMemoize.fsi +++ b/src/Compiler/Facilities/AsyncMemoize.fsi @@ -42,12 +42,7 @@ type Extensions = /// /// Strongly holds at most one result per key. /// -type internal AsyncMemoize<'TKey, 'TVersion, 'TValue when 'TKey: equality and 'TVersion: equality -#if !NO_CHECKNULLS - and 'TKey:not null - and 'TVersion:not null -#endif - > = +type internal AsyncMemoize<'TKey, 'TVersion, 'TValue when 'TKey: equality and 'TVersion: equality and 'TKey:not null and 'TVersion:not null> = /// Maximum number of strongly held results to keep in the cache /// Maximum number of weakly held results to keep in the cache diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl index 1f0b8002279..d54bcb9419a 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl @@ -21,14 +21,14 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-790::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-796::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@110::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-502::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-502::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-502::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-502::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-502::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 2013e914ed5..4bbe31fc0d6 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -28,18 +28,18 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-790::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-796::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@110::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1423-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000605][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-502::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-502::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-502::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-502::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-502::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$Symbols+fullName@2490-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl index af810c63892..965a760fe81 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl @@ -21,13 +21,13 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-830::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-836::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-523::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-523::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-523::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-523::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-523::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@301-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@301-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 5b4d38b154b..38b37691559 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -28,17 +28,17 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-830::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-836::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000BB][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1423-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000620][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-523::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-523::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-523::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-523::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-523::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$Symbols+fullName@2490-3::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@301-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@301-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. From dfffae63ceadf90bf920e190a399ff2eba5ac29f Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:19:38 +0100 Subject: [PATCH 10/21] OpenTelemetry instrumentation for xUnit tests (#18230) * otel instrumentation for xunit test runs * wip * sort out deps version conflict * disable for desktop --- .../FSharpChecker/CommonWorkflows.fs | 11 ---------- .../FSharpChecker/TransparentCompiler.fs | 7 ------ .../FSharp.Test.Utilities.fsproj | 2 +- .../ProjectGeneration.fs | 11 ---------- tests/FSharp.Test.Utilities/XunitHelpers.fs | 22 +++++++++++++++++++ 5 files changed, 23 insertions(+), 30 deletions(-) diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs index 4b0163a9f4b..d8bd1f6e262 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs @@ -143,14 +143,6 @@ let ``Using getSource and notifications instead of filesystem`` () = [] let GetAllUsesOfAllSymbols() = - let traceProvider = - Sdk.CreateTracerProviderBuilder() - .AddSource("fsc") - .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(serviceName="F#", serviceVersion = "1")) - .AddJaegerExporter() - .Build() - - use _ = Activity.start "GetAllUsesOfAllSymbols" [ ] let result = async { @@ -162,9 +154,6 @@ let GetAllUsesOfAllSymbols() = return checkProjectResults.GetAllUsesOfAllSymbols() } |> Async.RunSynchronously - traceProvider.ForceFlush() |> ignore - traceProvider.Dispose() - if result.Length <> 79 then failwith $"Expected 81 symbolUses, got {result.Length}:\n%A{result}" [] diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/TransparentCompiler.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/TransparentCompiler.fs index b523b814b72..33ac7992e14 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/TransparentCompiler.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/TransparentCompiler.fs @@ -556,13 +556,6 @@ let fuzzingTest seed (project: SyntheticProject) = task { do! Task.Delay (rng.Next maxCheckingDelayMs) } - use _tracerProvider = - Sdk.CreateTracerProviderBuilder() - .AddSource("fsc") - .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(serviceName="F# Fuzzing", serviceVersion = "1")) - .AddJaegerExporter() - .Build() - use _ = Activity.start $"Fuzzing {project.Name}" [ Activity.Tags.project, project.Name; "seed", seed.ToString() ] do! task { diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index 1e3fd1b84c9..5b8f66bac7d 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -108,7 +108,7 @@ - + diff --git a/tests/FSharp.Test.Utilities/ProjectGeneration.fs b/tests/FSharp.Test.Utilities/ProjectGeneration.fs index 1734e3240a7..92256c2b09b 100644 --- a/tests/FSharp.Test.Utilities/ProjectGeneration.fs +++ b/tests/FSharp.Test.Utilities/ProjectGeneration.fs @@ -961,7 +961,6 @@ type ProjectWorkflowBuilder let mutable latestProject = initialProject let mutable activity = None - let mutable tracerProvider = None let getSource f = f |> getSourceText latestProject :> ISourceText |> Some |> async.Return @@ -1010,13 +1009,6 @@ type ProjectWorkflowBuilder member this.Yield _ = async { let! ctx = getInitialContext() - tracerProvider <- - Sdk.CreateTracerProviderBuilder() - .AddSource("fsc") - .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(serviceName="F#", serviceVersion = "1")) - .AddJaegerExporter() - .Build() - |> Some activity <- Activity.start ctx.Project.Name [ Activity.Tags.project, ctx.Project.Name; "UsingTransparentCompiler", useTransparentCompiler.ToString() ] |> Some return ctx } @@ -1032,9 +1024,6 @@ type ProjectWorkflowBuilder if initialContext.IsNone && not isExistingProject then this.DeleteProjectDir() activity |> Option.iter (fun x -> if not (isNull x) then x.Dispose()) - tracerProvider |> Option.iter (fun x -> - x.ForceFlush() |> ignore - x.Dispose()) member this.Run(workflow: Async) = if autoStart then diff --git a/tests/FSharp.Test.Utilities/XunitHelpers.fs b/tests/FSharp.Test.Utilities/XunitHelpers.fs index 7a41338200a..3a0049df5a8 100644 --- a/tests/FSharp.Test.Utilities/XunitHelpers.fs +++ b/tests/FSharp.Test.Utilities/XunitHelpers.fs @@ -10,6 +10,12 @@ open Xunit.Abstractions open TestFramework +open FSharp.Compiler.Diagnostics + +open OpenTelemetry +open OpenTelemetry.Resources +open OpenTelemetry.Trace + /// Disables custom internal parallelization added with XUNIT_EXTRAS. /// Execute test cases in a class or a module one by one instead of all at once. Allow other collections to run simultaneously. [] @@ -45,6 +51,7 @@ type ConsoleCapturingTestRunner(test, messageBus, testClass, constructorArgument override this.InvokeTestAsync (aggregator: ExceptionAggregator) = task { use capture = new TestConsole.ExecutionCapture() + use _ = Activity.start test.DisplayName [ ] let! executionTime = this.BaseInvokeTestMethodAsync aggregator let output = seq { @@ -139,9 +146,24 @@ type FSharpXunitFramework(sink: IMessageSink) = log "FSharpXunitFramework with XUNIT_EXTRAS installing TestConsole redirection" TestConsole.install() +// TODO: Currently does not work with Desktop .NET Framework. Upcoming OpenTelemetry 1.11.0 may change it. +#if NETCOREAPP + let traceProvider = + Sdk.CreateTracerProviderBuilder() + .AddSource(ActivityNames.FscSourceName) + .SetResourceBuilder( + ResourceBuilder.CreateDefault().AddService(serviceName="F#", serviceVersion = "1.0.0")) + .AddOtlpExporter() + .Build() +#endif + interface IDisposable with member _.Dispose() = cleanUpTemporaryDirectoryOfThisTestRun () +#if NETCOREAPP + traceProvider.ForceFlush() |> ignore + traceProvider.Dispose() +#endif base.Dispose() override this.CreateDiscoverer (assemblyInfo) = From ec2b3d9db17a22f4f525e95dbd2372ce19fad75d Mon Sep 17 00:00:00 2001 From: Isaac Abraham Date: Mon, 13 Jan 2025 17:02:30 +0000 Subject: [PATCH 11/21] Make nullness equivalent warning message clearer. (#18172) --- src/Compiler/Driver/CompilerDiagnostics.fs | 5 ++--- src/Compiler/FSStrings.resx | 2 +- src/Compiler/xlf/FSStrings.cs.xlf | 4 ++-- src/Compiler/xlf/FSStrings.de.xlf | 4 ++-- src/Compiler/xlf/FSStrings.es.xlf | 4 ++-- src/Compiler/xlf/FSStrings.fr.xlf | 4 ++-- src/Compiler/xlf/FSStrings.it.xlf | 4 ++-- src/Compiler/xlf/FSStrings.ja.xlf | 4 ++-- src/Compiler/xlf/FSStrings.ko.xlf | 4 ++-- src/Compiler/xlf/FSStrings.pl.xlf | 4 ++-- src/Compiler/xlf/FSStrings.pt-BR.xlf | 4 ++-- src/Compiler/xlf/FSStrings.ru.xlf | 4 ++-- src/Compiler/xlf/FSStrings.tr.xlf | 4 ++-- src/Compiler/xlf/FSStrings.zh-Hans.xlf | 4 ++-- src/Compiler/xlf/FSStrings.zh-Hant.xlf | 4 ++-- .../Language/Nullness/NullableCsharpImportTests.fs | 14 +++++++------- .../Nullness/NullableReferenceTypesTests.fs | 6 +++--- .../library-functions.fs.checknulls_on.err.bsl | 6 +++--- 18 files changed, 42 insertions(+), 43 deletions(-) diff --git a/src/Compiler/Driver/CompilerDiagnostics.fs b/src/Compiler/Driver/CompilerDiagnostics.fs index 83554e74834..9dcf0b72ea3 100644 --- a/src/Compiler/Driver/CompilerDiagnostics.fs +++ b/src/Compiler/Driver/CompilerDiagnostics.fs @@ -438,7 +438,7 @@ module OldStyleMessages = let ConstraintSolverTupleDiffLengthsE () = Message("ConstraintSolverTupleDiffLengths", "%d%d") let ConstraintSolverInfiniteTypesE () = Message("ConstraintSolverInfiniteTypes", "%s%s") let ConstraintSolverMissingConstraintE () = Message("ConstraintSolverMissingConstraint", "%s") - let ConstraintSolverNullnessWarningEquivWithTypesE () = Message("ConstraintSolverNullnessWarningEquivWithTypes", "%s%s") + let ConstraintSolverNullnessWarningEquivWithTypesE () = Message("ConstraintSolverNullnessWarningEquivWithTypes", "%s") let ConstraintSolverNullnessWarningWithTypesE () = Message("ConstraintSolverNullnessWarningWithTypes", "%s%s") let ConstraintSolverNullnessWarningWithTypeE () = Message("ConstraintSolverNullnessWarningWithType", "%s") let ConstraintSolverNullnessWarningE () = Message("ConstraintSolverNullnessWarning", "%s") @@ -678,8 +678,7 @@ type Exception with let t1, t2, _cxs = NicePrint.minimalStringsOfTwoTypes denv ty1 ty2 - os.Append(ConstraintSolverNullnessWarningEquivWithTypesE().Format t1 t2) - |> ignore + os.Append(ConstraintSolverNullnessWarningEquivWithTypesE().Format t1) |> ignore if m.StartLine <> m2.StartLine then os.Append(SeeAlsoE().Format(stringOfRange m)) |> ignore diff --git a/src/Compiler/FSStrings.resx b/src/Compiler/FSStrings.resx index 383b4991105..e9338b6b990 100644 --- a/src/Compiler/FSStrings.resx +++ b/src/Compiler/FSStrings.resx @@ -130,7 +130,7 @@ A type parameter is missing a constraint '{0}' - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. Nullness warning: The types '{0}' and '{1}' do not have compatible nullability. diff --git a/src/Compiler/xlf/FSStrings.cs.xlf b/src/Compiler/xlf/FSStrings.cs.xlf index 86a6be9d7e0..20991832c18 100644 --- a/src/Compiler/xlf/FSStrings.cs.xlf +++ b/src/Compiler/xlf/FSStrings.cs.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.de.xlf b/src/Compiler/xlf/FSStrings.de.xlf index 3b7f46a9769..b429cdd522c 100644 --- a/src/Compiler/xlf/FSStrings.de.xlf +++ b/src/Compiler/xlf/FSStrings.de.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.es.xlf b/src/Compiler/xlf/FSStrings.es.xlf index f2b6d8ed1ca..6620ac895f8 100644 --- a/src/Compiler/xlf/FSStrings.es.xlf +++ b/src/Compiler/xlf/FSStrings.es.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.fr.xlf b/src/Compiler/xlf/FSStrings.fr.xlf index f3621e55e63..ac459e73f5b 100644 --- a/src/Compiler/xlf/FSStrings.fr.xlf +++ b/src/Compiler/xlf/FSStrings.fr.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.it.xlf b/src/Compiler/xlf/FSStrings.it.xlf index d67bbd27dca..1f1ad15e05f 100644 --- a/src/Compiler/xlf/FSStrings.it.xlf +++ b/src/Compiler/xlf/FSStrings.it.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.ja.xlf b/src/Compiler/xlf/FSStrings.ja.xlf index 486c2fac349..59d40979899 100644 --- a/src/Compiler/xlf/FSStrings.ja.xlf +++ b/src/Compiler/xlf/FSStrings.ja.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.ko.xlf b/src/Compiler/xlf/FSStrings.ko.xlf index 506b9b9e2de..8ed60cc681f 100644 --- a/src/Compiler/xlf/FSStrings.ko.xlf +++ b/src/Compiler/xlf/FSStrings.ko.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.pl.xlf b/src/Compiler/xlf/FSStrings.pl.xlf index 30f8155bfc8..c5f8bbc016b 100644 --- a/src/Compiler/xlf/FSStrings.pl.xlf +++ b/src/Compiler/xlf/FSStrings.pl.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.pt-BR.xlf b/src/Compiler/xlf/FSStrings.pt-BR.xlf index cf7e3a94822..991d77016c9 100644 --- a/src/Compiler/xlf/FSStrings.pt-BR.xlf +++ b/src/Compiler/xlf/FSStrings.pt-BR.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.ru.xlf b/src/Compiler/xlf/FSStrings.ru.xlf index 34278a4b234..2c4de5a755c 100644 --- a/src/Compiler/xlf/FSStrings.ru.xlf +++ b/src/Compiler/xlf/FSStrings.ru.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.tr.xlf b/src/Compiler/xlf/FSStrings.tr.xlf index a2601885c52..7b936093a0d 100644 --- a/src/Compiler/xlf/FSStrings.tr.xlf +++ b/src/Compiler/xlf/FSStrings.tr.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.zh-Hans.xlf b/src/Compiler/xlf/FSStrings.zh-Hans.xlf index 66a54f3d2bb..12afa253444 100644 --- a/src/Compiler/xlf/FSStrings.zh-Hans.xlf +++ b/src/Compiler/xlf/FSStrings.zh-Hans.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/src/Compiler/xlf/FSStrings.zh-Hant.xlf b/src/Compiler/xlf/FSStrings.zh-Hant.xlf index 35280cee60f..8e52040ed6f 100644 --- a/src/Compiler/xlf/FSStrings.zh-Hant.xlf +++ b/src/Compiler/xlf/FSStrings.zh-Hant.xlf @@ -18,8 +18,8 @@ - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. - Nullness warning: The types '{0}' and '{1}' do not have equivalent nullability. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. + Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs index 5a4f3dedf10..bb67476cb9f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs @@ -107,9 +107,9 @@ let y:System.Collections.Generic.LinkedListNode = ll.First |> shouldFail |> withDiagnostics [ Error 3261, Line 4, Col 59, Line 4, Col 66, "Nullness warning: The types 'System.Collections.Generic.LinkedListNode' and 'System.Collections.Generic.LinkedListNode | null' do not have compatible nullability." - Error 3261, Line 4, Col 59, Line 4, Col 66, "Nullness warning: The types 'System.Collections.Generic.LinkedListNode' and 'System.Collections.Generic.LinkedListNode | null' do not have equivalent nullability." + Error 3261, Line 4, Col 59, Line 4, Col 66, "Nullness warning: A non-nullable 'System.Collections.Generic.LinkedListNode' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." Error 3261, Line 5, Col 59, Line 5, Col 67, "Nullness warning: The types 'System.Collections.Generic.LinkedListNode' and 'System.Collections.Generic.LinkedListNode | null' do not have compatible nullability." - Error 3261, Line 5, Col 59, Line 5, Col 67, "Nullness warning: The types 'System.Collections.Generic.LinkedListNode' and 'System.Collections.Generic.LinkedListNode | null' do not have equivalent nullability."] + Error 3261, Line 5, Col 59, Line 5, Col 67, "Nullness warning: A non-nullable 'System.Collections.Generic.LinkedListNode' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." ] [] let ``Nullable directory info show warn on prop access`` () = @@ -219,12 +219,12 @@ let ``Consumption of nullable C# - no generics, just strings in methods and fiel |> shouldFail |> withDiagnostics [ Error 3261, Line 5, Col 40, Line 5, Col 85, "Nullness warning: The types 'string' and 'string | null' do not have compatible nullability." - Error 3261, Line 5, Col 40, Line 5, Col 85, "Nullness warning: The types 'string' and 'string | null' do not have equivalent nullability." - Error 3261, Line 14, Col 34, Line 14, Col 62, "Nullness warning: The types 'string' and 'string | null' do not have equivalent nullability." + Error 3261, Line 5, Col 40, Line 5, Col 85, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." + Error 3261, Line 14, Col 34, Line 14, Col 62, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." Error 3261, Line 16, Col 35, Line 16, Col 39, "Nullness warning: The type 'string' does not support 'null'." - Error 3261, Line 25, Col 85, Line 25, Col 97, "Nullness warning: The types 'string' and 'string | null' do not have equivalent nullability." - Error 3261, Line 28, Col 99, Line 28, Col 111, "Nullness warning: The types 'string' and 'string | null' do not have equivalent nullability." - Error 3261, Line 30, Col 97, Line 30, Col 109, "Nullness warning: The types 'string' and 'string | null' do not have equivalent nullability."] + Error 3261, Line 25, Col 85, Line 25, Col 97, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." + Error 3261, Line 28, Col 99, Line 28, Col 111, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." + Error 3261, Line 30, Col 97, Line 30, Col 109, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression."] [] diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs index 55a76b6f522..819bd475152 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs @@ -213,7 +213,7 @@ Test.XString("x":(string|null)) Error 3261, Line 11, Col 6, Line 11, Col 7, "Nullness warning: The type 'obj | null' supports 'null' but a non-null type is expected." Error 3261, Line 11, Col 1, Line 11, Col 8, "Nullness warning: The types 'obj' and 'obj | null' do not have compatible nullability." Error 3261, Line 12, Col 14, Line 12, Col 18, "Nullness warning: The type 'string' does not support 'null'." - Error 3261, Line 13, Col 14, Line 13, Col 31, "Nullness warning: The types 'string' and 'string | null' do not have equivalent nullability."] + Error 3261, Line 13, Col 14, Line 13, Col 31, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression."] [] let ``Typar infered to nonnull obj`` () = @@ -256,7 +256,7 @@ let nonStrictFunc(x:string | null) = strictFunc(x) |> typeCheckWithStrictNullness |> shouldFail |> withDiagnostics [ - Error 3261, Line 4, Col 49, Line 4, Col 50, "Nullness warning: The types 'string' and 'string | null' do not have equivalent nullability."] + Error 3261, Line 4, Col 49, Line 4, Col 50, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression."] [] let ``Can have nullable prop of same type T within a custom type T``() = @@ -994,7 +994,7 @@ let thisShouldAlsoWarn = MyRecord.Create(maybeNull) |> shouldFail |> withDiagnostics [Error 3261, Line 7, Col 38, Line 7, Col 42, "Nullness warning: The type 'string' does not support 'null'." - Error 3261, Line 9, Col 42, Line 9, Col 51, "Nullness warning: The types 'string' and 'string | null' do not have equivalent nullability."] + Error 3261, Line 9, Col 42, Line 9, Col 51, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression."] [] diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/library-functions.fs.checknulls_on.err.bsl b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/library-functions.fs.checknulls_on.err.bsl index a74b139264c..026cfabacff 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/library-functions.fs.checknulls_on.err.bsl +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/library-functions.fs.checknulls_on.err.bsl @@ -4,10 +4,10 @@ library-functions.fs (7,33)-(7,35) typecheck error Value known to be without nul library-functions.fs (8,18)-(8,20) typecheck error Value known to be without null passed to a function meant for nullables: You can remove this `nonNull` assertion. library-functions.fs (10,28)-(10,39) typecheck error Value known to be without null passed to a function meant for nullables: You can remove this `nonNull` assertion. library-functions.fs (11,18)-(11,26) typecheck error Value known to be without null passed to a function meant for nullables: You can remove this `nonNull` assertion. -library-functions.fs (17,27)-(17,38) typecheck error Nullness warning: The types 'String' and 'String | null' do not have equivalent nullability. -library-functions.fs (18,28)-(18,39) typecheck error Nullness warning: The types 'String' and 'String | null' do not have equivalent nullability. +library-functions.fs (17,27)-(17,38) typecheck error Nullness warning: A non-nullable 'String' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. +library-functions.fs (18,28)-(18,39) typecheck error Nullness warning: A non-nullable 'String' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. library-functions.fs (20,28)-(20,36) typecheck error Nullness warning: The type 'String | null' supports 'null' but a non-null type is expected. library-functions.fs (26,17)-(26,19) typecheck error Nullness warning: The type 'string' does not support 'null'. library-functions.fs (27,10)-(27,16) typecheck error Nullness warning: The type 'String' does not support 'null'. -library-functions.fs (37,17)-(37,21) typecheck error Nullness warning: The types 'String' and 'string | null' do not have equivalent nullability. +library-functions.fs (37,17)-(37,21) typecheck error Nullness warning: A non-nullable 'String' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression. library-functions.fs (41,26)-(41,28) typecheck error Value known to be without null passed to a function meant for nullables: You can remove this `nonNull` assertion. \ No newline at end of file From 9420232c8ba9c946a38b774340b948ad837b1f12 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 09:05:52 -0800 Subject: [PATCH 12/21] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250110.3 (#18226) Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24619.1 -> To Version 9.0.0-alpha.1.25060.3 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5aee1113c4f..a572c3cab87 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,9 +1,9 @@ - + https://github.com/dotnet/source-build-reference-packages - e2b1d16fd66540b3a5813ec0ac1fd166688c3e0a + f5fa796273e4e59926e3fab26e1ab9e7d577f5e5 From 05362a86bc85d3617be00c5cdc1c0f3a3708f2c1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 17:47:54 +0000 Subject: [PATCH 13/21] Update dependencies from https://github.com/dotnet/arcade build 20250108.5 (#18227) Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24623.3 -> To Version 9.0.0-beta.25058.5 Co-authored-by: dotnet-maestro[bot] Co-authored-by: Kevin Ransom (msft) --- eng/Version.Details.xml | 8 ++++---- global.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a572c3cab87..d005e04efcc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,14 +42,14 @@ - + https://github.com/dotnet/arcade - e0e05154656254a735ebf19ffa5a37a8b915039b + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 - + https://github.com/dotnet/arcade - e0e05154656254a735ebf19ffa5a37a8b915039b + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 diff --git a/global.json b/global.json index 23eae505b33..57489571a22 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24623.3", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25058.5", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From c350a410608b3c518355261bd797a3d5ba086a6b Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Mon, 13 Jan 2025 20:41:20 +0200 Subject: [PATCH 14/21] Fix `fsi` auto-loading of script file inside NuGet package. (#18177) --- docs/release-notes/.FSharp.Compiler.Service/9.0.200.md | 1 + .../FSharp.DependencyManager.ProjectFile.fs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md index 8edf6f814d1..1d799b37f11 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md @@ -21,6 +21,7 @@ * Completion: fix qualified completion in sequence expressions [PR #18111](https://github.com/dotnet/fsharp/pull/18111) * Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups ([PR #18124](https://github.com/dotnet/fsharp/pull/18124)) * Shim/file system: fix leaks of the shim [PR #18144](https://github.com/dotnet/fsharp/pull/18144) +* fsi: fix auto-loading of script file inside NuGet package ([PR #18177](https://github.com/dotnet/fsharp/pull/18177)) * Fix for `Obsolete` attribute warning/error not taken into account when used with a unit of measure [PR #18182](https://github.com/dotnet/fsharp/pull/18182) ### Added diff --git a/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.ProjectFile.fs b/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.ProjectFile.fs index c8acf99d7e7..553c97dc60f 100644 --- a/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.ProjectFile.fs +++ b/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.ProjectFile.fs @@ -122,7 +122,6 @@ $(PACKAGEREFERENCES) $([System.String]::Copy('%(__InteractiveReferencedAssemblies.PathInPackage)').Replace('\', '/')) $([System.String]::Copy('%(InteractiveResolvedFile.NormalizedIdentity)').IndexOf('%(InteractiveResolvedFile.NormalizedPathInPackage)')) $([System.String]::Copy('%(InteractiveResolvedFile.NormalizedIdentity)').Substring(0, %(InteractiveResolvedFile.PositionPathInPackage)).Replace('\', '/')) - %(InteractiveResolvedFile.PackageRoot)content\%(InteractiveResolvedFile.NugetPackageId)$(SCRIPTEXTENSION) $([System.String]::Copy('%(__InteractiveReferencedAssemblies.PathInPackage)').StartsWith('ref/')) %(__InteractiveReferencedAssemblies.NuGetPackageId) %(__InteractiveReferencedAssemblies.NuGetPackageVersion) @@ -133,11 +132,14 @@ $(PACKAGEREFERENCES) $([System.String]::Copy('%(__InteractiveReferencedAssembliesCopyLocal.PathInPackage)').Replace('\', '/')) $([System.String]::Copy('%(InteractiveResolvedFile.NormalizedIdentity)').IndexOf('%(InteractiveResolvedFile.NormalizedPathInPackage)')) $([System.String]::Copy('%(InteractiveResolvedFile.NormalizedIdentity)').Substring(0, %(InteractiveResolvedFile.PositionPathInPackage)).Replace('\', '/')) - %(__InteractiveReferencedAssembliesCopyLocal.PackageRoot)content\%(__InteractiveReferencedAssembliesCopyLocal.NugetPackageId)$(SCRIPTEXTENSION) $([System.String]::Copy('%(__InteractiveReferencedAssembliesCopyLocal.PathInPackage)').StartsWith('ref/')) %(__InteractiveReferencedAssembliesCopyLocal.NuGetPackageId) %(__InteractiveReferencedAssembliesCopyLocal.NuGetPackageVersion) + + + %(InteractiveResolvedFile.PackageRoot)content\%(InteractiveResolvedFile.NugetPackageId)$(SCRIPTEXTENSION) + Date: Mon, 13 Jan 2025 18:15:17 -0800 Subject: [PATCH 15/21] Fix #17797 -- Realsig+ generates nested closures with incorrect Generic arguments (#17877) * tests * code * baseline * fantomas * release notes * ilverify baselines * Update tests/FSharp.Compiler.ComponentTests/Conformance/LexicalAnalysis/SymbolicOperators.fs Yeah the comments are pointless. Co-authored-by: Tomas Grosup * Feedback pt 1 * temp * tests * release notes * debug * Update DEVGUIDE.md Co-authored-by: Petr --------- Co-authored-by: Tomas Grosup Co-authored-by: Petr --- .gitignore | 7 +- DEVGUIDE.md | 27 + .../.FSharp.Compiler.Service/9.0.200.md | 1 + .../.FSharp.Compiler.Service/9.0.300.md | 12 + src/Compiler/CodeGen/IlxGen.fs | 56 +- src/Compiler/TypedTree/CompilerGlobalState.fs | 4 +- src/Compiler/TypedTree/TypedTreeOps.fsi | 3 + .../LexicalAnalysis/SymbolicOperators.fs | 35 +- .../IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs | 523 ++++++--- .../ComputedCollections.fs | 26 +- .../ForXInList_ToList.fs.il.bsl | 10 +- .../DoNotBoxStruct/DoNotBoxStruct.fs | 37 +- .../ClassTypeInitialization.fs | 627 +++++----- .../nested_generic_closure.fs | 349 ++++++ ...l => TestFunction01.fs.OptimizeOff.il.bsl} | 0 .../TestFunction01.fs.OptimizeOn.il.debug.bsl | 71 ++ ...estFunction01.fs.OptimizeOn.il.release.bsl | 85 ++ ...l => TestFunction02.fs.OptimizeOff.il.bsl} | 0 .../TestFunction02.fs.OptimizeOn.il.debug.bsl | 97 ++ ...estFunction02.fs.OptimizeOn.il.release.bsl | 112 ++ ...l => TestFunction03.fs.OptimizeOff.il.bsl} | 0 ...TestFunction03.fs.OptimizeOn.il.debug.bsl} | 54 +- ...estFunction03.fs.OptimizeOn.il.release.bsl | 126 ++ ... => TestFunction03b.fs.OptimizeOff.il.bsl} | 0 ...TestFunction03b.fs.OptimizeOn.il.debug.bsl | 122 ++ ...stFunction03b.fs.OptimizeOn.il.release.bsl | 133 +++ ... => TestFunction03c.fs.OptimizeOff.il.bsl} | 0 ...TestFunction03c.fs.OptimizeOn.il.debug.bsl | 138 +++ ...stFunction03c.fs.OptimizeOn.il.release.bsl | 144 +++ ...l => TestFunction04.fs.OptimizeOff.il.bsl} | 0 .../TestFunction04.fs.OptimizeOn.il.debug.bsl | 108 ++ ...estFunction04.fs.OptimizeOn.il.release.bsl | 123 ++ ...l => TestFunction05.fs.OptimizeOff.il.bsl} | 0 .../TestFunction05.fs.OptimizeOn.il.debug.bsl | 101 ++ ...estFunction05.fs.OptimizeOn.il.release.bsl | 112 ++ ...alInternalSignatureOff.OptimizeOff.il.bsl} | 0 ...ternalSignatureOff.OptimizeOn.il.debug.bsl | 108 ++ ...rnalSignatureOff.OptimizeOn.il.release.bsl | 119 ++ ...ealInternalSignatureOn.OptimizeOff.il.bsl} | 120 +- ...nternalSignatureOn.OptimizeOn.il.debug.bsl | 139 +++ ...ernalSignatureOn.OptimizeOn.il.release.bsl | 150 +++ ... => TestFunction09b.fs.OptimizeOff.il.bsl} | 0 .../TestFunction09b.fs.OptimizeOn.il.bsl | 206 ++++ ...=> TestFunction09b1.fs.OptimizeOff.il.bsl} | 0 .../TestFunction09b1.fs.OptimizeOn.il.bsl | 206 ++++ ...=> TestFunction09b2.fs.OptimizeOff.il.bsl} | 0 .../TestFunction09b2.fs.OptimizeOn.il.bsl | 206 ++++ ...=> TestFunction09b3.fs.OptimizeOff.il.bsl} | 0 .../TestFunction09b3.fs.OptimizeOn.il.bsl | 206 ++++ ...alInternalSignatureOff.OptimizeOff.il.bsl} | 0 ...ternalSignatureOff.OptimizeOn.il.debug.bsl | 100 ++ ...rnalSignatureOff.OptimizeOn.il.release.bsl | 110 ++ ...ealInternalSignatureOn.OptimizeOff.il.bsl} | 10 - ...nternalSignatureOn.OptimizeOn.il.debug.bsl | 119 ++ ...ernalSignatureOn.OptimizeOn.il.release.bsl | 129 +++ ...l => TestFunction10.fs.OptimizeOff.il.bsl} | 0 .../TestFunction10.fs.OptimizeOn.il.bsl | 67 ++ ...l => TestFunction15.fs.OptimizeOff.il.bsl} | 0 .../TestFunction15.fs.OptimizeOn.il.bsl | 113 ++ ...tion16.fs.OptimizeOff.il.net472.debug.bsl} | 0 ...on16.fs.OptimizeOff.il.net472.release.bsl} | 0 ...ion16.fs.OptimizeOff.il.netcore.debug.bsl} | 0 ...n16.fs.OptimizeOff.il.netcore.release.bsl} | 0 ...nction16.fs.OptimizeOn.il.net472.debug.bsl | 681 +++++++++++ ...tion16.fs.OptimizeOn.il.net472.release.bsl | 681 +++++++++++ ...ction16.fs.OptimizeOn.il.netcore.debug.bsl | 591 ++++++++++ ...ion16.fs.OptimizeOn.il.netcore.release.bsl | 591 ++++++++++ ...tion17.fs.OptimizeOff.il.net472.debug.bsl} | 30 +- ...on17.fs.OptimizeOff.il.net472.release.bsl} | 0 ...ion17.fs.OptimizeOff.il.netcore.debug.bsl} | 26 +- ...n17.fs.OptimizeOff.il.netcore.release.bsl} | 26 +- ...TestFunction17.fs.OptimizeOn.il.net472.bsl | 582 ++++++++++ ...estFunction17.fs.OptimizeOn.il.netcore.bsl | 492 ++++++++ .../TestFunction18.fs.il.netcore.bsl | 10 - ...l => TestFunction19.fs.OptimizeOff.il.bsl} | 0 .../TestFunction19.fs.OptimizeOn.il.debug.bsl | 211 ++++ ...estFunction19.fs.OptimizeOn.il.release.bsl | 221 ++++ ...l => TestFunction20.fs.OptimizeOff.il.bsl} | 512 ++++---- .../TestFunction20.fs.OptimizeOn.il.debug.bsl | 237 ++++ ...estFunction20.fs.OptimizeOn.il.release.bsl | 247 ++++ ...tion21.fs.OptimizeOff.il.net472.debug.bsl} | 0 ...on21.fs.OptimizeOff.il.net472.release.bsl} | 0 ...ion21.fs.OptimizeOff.il.netcore.debug.bsl} | 0 ...n21.fs.OptimizeOff.il.netcore.release.bsl} | 0 ...nction21.fs.OptimizeOn.il.net472.debug.bsl | 765 ++++++++++++ ...tion21.fs.OptimizeOn.il.net472.release.bsl | 775 +++++++++++++ ...ction21.fs.OptimizeOn.il.netcore.debug.bsl | 675 +++++++++++ ...ion21.fs.OptimizeOn.il.netcore.release.bsl | 685 +++++++++++ ...fs.RealInternalSignatureOff.il.netcore.bsl | 10 - ....fs.RealInternalSignatureOn.il.netcore.bsl | 10 - ...fs.RealInternalSignatureOff.il.netcore.bsl | 10 - ....fs.RealInternalSignatureOn.il.netcore.bsl | 10 - ...fs.RealInternalSignatureOff.il.netcore.bsl | 10 - ....fs.RealInternalSignatureOn.il.netcore.bsl | 10 - ...fs.RealInternalSignatureOff.il.netcore.bsl | 10 - ....fs.RealInternalSignatureOn.il.netcore.bsl | 10 - ...fs.RealInternalSignatureOff.il.netcore.bsl | 10 - ....fs.RealInternalSignatureOn.il.netcore.bsl | 10 - ...nalSignatureOff.OptimizeOff.il.net472.bsl} | 0 ...alSignatureOff.OptimizeOff.il.netcore.bsl} | 10 - ...ernalSignatureOff.OptimizeOn.il.net472.bsl | 77 ++ ...nalSignatureOff.OptimizeOn.il.netcore.bsl} | 36 +- ...rnalSignatureOn.OptimizeOff.il.net472.bsl} | 0 ...nalSignatureOn.OptimizeOff.il.netcore.bsl} | 10 - ...ternalSignatureOn.OptimizeOn.il.net472.bsl | 96 ++ ...ernalSignatureOn.OptimizeOn.il.netcore.bsl | 97 ++ ...nalSignatureOff.OptimizeOff.il.net472.bsl} | 0 ...alSignatureOff.OptimizeOff.il.netcore.bsl} | 10 - ...ernalSignatureOff.OptimizeOn.il.net472.bsl | 61 + ...rnalSignatureOff.OptimizeOn.il.netcore.bsl | 62 + ...rnalSignatureOn.OptimizeOff.il.net472.bsl} | 0 ...nalSignatureOn.OptimizeOff.il.netcore.bsl} | 10 - ...ternalSignatureOn.OptimizeOn.il.net472.bsl | 80 ++ ...ernalSignatureOn.OptimizeOn.il.netcore.bsl | 81 ++ ...nalSignatureOff.OptimizeOff.il.net472.bsl} | 0 ...alSignatureOff.OptimizeOff.il.netcore.bsl} | 10 - ...ernalSignatureOff.OptimizeOn.il.net472.bsl | 308 +++++ ...nalSignatureOff.OptimizeOn.il.netcore.bsl} | 174 ++- ...rnalSignatureOn.OptimizeOff.il.net472.bsl} | 10 - ...nalSignatureOn.OptimizeOff.il.netcore.bsl} | 10 - ...ternalSignatureOn.OptimizeOn.il.net472.bsl | 308 +++++ ...ernalSignatureOn.OptimizeOn.il.netcore.bsl | 309 +++++ ...l => TestFunction23.fs.OptimizeOff.il.bsl} | 31 +- ...rnalSignatureOff.OptimizeOff.il.net472.bsl | 165 +++ ...alSignatureOff.OptimizeOff.il.netcore.bsl} | 349 +++--- ...ignatureOff.OptimizeOn.il.net472.debug.bsl | 126 ++ ...natureOff.OptimizeOn.il.net472.release.bsl | 149 +++ ...gnatureOff.OptimizeOn.il.netcore.debug.bsl | 127 ++ ...atureOff.OptimizeOn.il.netcore.release.bsl | 150 +++ ...ernalSignatureOn.OptimizeOff.il.net472.bsl | 165 +++ ...rnalSignatureOn.OptimizeOff.il.netcore.bsl | 166 +++ ...SignatureOn.OptimizeOn.il.net472.debug.bsl | 126 ++ ...gnatureOn.OptimizeOn.il.net472.release.bsl | 176 +++ ...ignatureOn.OptimizeOn.il.netcore.debug.bsl | 127 ++ ...natureOn.OptimizeOn.il.netcore.release.bsl | 177 +++ ...natureOff.OptimizeOff.il.net472.debug.bsl} | 30 +- ...tureOff.OptimizeOff.il.net472.release.bsl} | 30 +- ...atureOff.OptimizeOff.il.netcore.debug.bsl} | 26 +- ...ureOff.OptimizeOff.il.netcore.release.bsl} | 26 +- ...ignatureOff.OptimizeOn.il.net472.debug.bsl | 821 +++++++++++++ ...natureOff.OptimizeOn.il.net472.release.bsl | 821 +++++++++++++ ...gnatureOff.OptimizeOn.il.netcore.debug.bsl | 731 ++++++++++++ ...atureOff.OptimizeOn.il.netcore.release.bsl | 731 ++++++++++++ ...ignatureOn.OptimizeOff.il.net472.debug.bsl | 1025 +++++++++++++++++ ...natureOn.OptimizeOff.il.net472.release.bsl | 911 +++++++++++++++ ...gnatureOn.OptimizeOff.il.netcore.debug.bsl | 935 +++++++++++++++ ...atureOn.OptimizeOff.il.netcore.release.bsl | 821 +++++++++++++ ...SignatureOn.OptimizeOn.il.net472.debug.bsl | 821 +++++++++++++ ...gnatureOn.OptimizeOn.il.net472.release.bsl | 821 +++++++++++++ ...ignatureOn.OptimizeOn.il.netcore.debug.bsl | 731 ++++++++++++ ...natureOn.OptimizeOn.il.netcore.release.bsl | 731 ++++++++++++ .../EmittedIL/TestFunctions/TestFunctions.fs | 89 +- ...ernalSignatureOff.OptimizeOn.il.debug.bsl} | 310 +++-- ...rnalSignatureOff.OptimizeOn.il.release.bsl | 384 ++++++ ...3.fs.RealInternalSignatureOff.il.debug.bsl | 405 ------- ...fs.RealInternalSignatureOff.il.release.bsl | 405 ------- ...ternalSignatureOn.OptimizeOn.il.debug.bsl} | 310 +++-- ...ernalSignatureOn.OptimizeOn.il.release.bsl | 384 ++++++ ...43.fs.RealInternalSignatureOn.il.debug.bsl | 415 ------- ....fs.RealInternalSignatureOn.il.release.bsl | 415 ------- .../Signatures/SigGenerationRoundTripTests.fs | 16 +- .../E_LessThanDotOpenParen001.fs | 31 - tests/FSharp.Test.Utilities/Compiler.fs | 35 +- .../FileInlineDataAttribute.fs | 26 +- tests/FSharp.Test.Utilities/XunitHelpers.fs | 6 +- ...FSharp.Compiler.Service_Release_net9.0.bsl | 4 +- ...ompiler.Service_Release_netstandard2.0.bsl | 4 +- .../CodeGen/EmittedIL/TaskGeneratedCode.fs | 56 +- 168 files changed, 26831 insertions(+), 3758 deletions(-) create mode 100644 docs/release-notes/.FSharp.Compiler.Service/9.0.300.md create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/nested_generic_closure.fs rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction01.fs.il.bsl => TestFunction01.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction02.fs.il.bsl => TestFunction02.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction03.fs.il.net472.bsl => TestFunction03.fs.OptimizeOff.il.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction03.fs.il.netcore.bsl => TestFunction03.fs.OptimizeOn.il.debug.bsl} (66%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction03b.fs.il.bsl => TestFunction03b.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction03c.fs.il.net472.bsl => TestFunction03c.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction04.fs.il.bsl => TestFunction04.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction05.fs.il.bsl => TestFunction05.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction06.fs.il.bsl => TestFunction06.fs.RealInternalSignatureOff.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction03c.fs.il.netcore.bsl => TestFunction06.fs.RealInternalSignatureOn.OptimizeOff.il.bsl} (59%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction09b.fs.il.bsl => TestFunction09b.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b.fs.OptimizeOn.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction09b1.fs.il.bsl => TestFunction09b1.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b1.fs.OptimizeOn.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction09b2.fs.il.bsl => TestFunction09b2.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b2.fs.OptimizeOn.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction09b3.fs.il.bsl => TestFunction09b3.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b3.fs.OptimizeOn.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction09b4.fs.RealInternalSignatureOff.il.bsl => TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction09b4.fs.RealInternalSignatureOn.il.bsl => TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl} (96%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction10.fs.il.bsl => TestFunction10.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction10.fs.OptimizeOn.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction15.fs.il.bsl => TestFunction15.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOn.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction16.fs.il.net472.debug.bsl => TestFunction16.fs.OptimizeOff.il.net472.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction16.fs.il.net472.release.bsl => TestFunction16.fs.OptimizeOff.il.net472.release.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction16.fs.il.netcore.debug.bsl => TestFunction16.fs.OptimizeOff.il.netcore.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction16.fs.il.netcore.release.bsl => TestFunction16.fs.OptimizeOff.il.netcore.release.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction17.fs.il.net472.debug.bsl => TestFunction17.fs.OptimizeOff.il.net472.debug.bsl} (96%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction17.fs.il.net472.release.bsl => TestFunction17.fs.OptimizeOff.il.net472.release.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction17.fs.il.netcore.debug.bsl => TestFunction17.fs.OptimizeOff.il.netcore.debug.bsl} (95%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction17.fs.il.netcore.release.bsl => TestFunction17.fs.OptimizeOff.il.netcore.release.bsl} (95%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.net472.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.netcore.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction19.fs.il.bsl => TestFunction19.fs.OptimizeOff.il.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction20.fs.il.bsl => TestFunction20.fs.OptimizeOff.il.bsl} (97%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction21.fs.il.net472.debug.bsl => TestFunction21.fs.OptimizeOff.il.net472.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction21.fs.il.net472.release.bsl => TestFunction21.fs.OptimizeOff.il.net472.release.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction21.fs.il.netcore.debug.bsl => TestFunction21.fs.OptimizeOff.il.netcore.debug.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction21.fs.il.netcore.release.bsl => TestFunction21.fs.OptimizeOff.il.netcore.release.bsl} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f.fs.RealInternalSignatureOff.il.net472.bsl => TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f.fs.RealInternalSignatureOff.il.netcore.bsl => TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl} (94%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f.fs.RealInternalSignatureOn.il.netcore .bsl => TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl} (75%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f.fs.RealInternalSignatureOn.il.net472.bsl => TestFunction22f.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22f.fs.RealInternalSignatureOn.il.bsl => TestFunction22f.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl} (95%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22g.fs.RealInternalSignatureOff.il.net472.bsl => TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22g.fs.RealInternalSignatureOff.il.netcore.bsl => TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl} (93%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22g.fs.RealInternalSignatureOn.il.net472.bsl => TestFunction22g.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22g.fs.RealInternalSignatureOn.il.netcore.bsl => TestFunction22g.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl} (94%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h.fs.RealInternalSignatureOff.il.net472.bsl => TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl} (100%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h.fs.RealInternalSignatureOn.il.netcore .bsl => TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl} (98%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h.fs.RealInternalSignatureOff.il.netcore.bsl => TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl} (68%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h.fs.RealInternalSignatureOn.il.net472.bsl => TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl} (98%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction22h.fs.RealInternalSignatureOn.il.bsl => TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl} (98%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction23.fs.il.net472.bsl => TestFunction23.fs.OptimizeOff.il.bsl} (90%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction23.fs.il.netcore.bsl => TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl} (87%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.net472.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.net472.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction24.fs.il.net472.debug.bsl => TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.debug.bsl} (97%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction24.fs.il.net472.release.bsl => TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.release.bsl} (96%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction24.fs.il.netcore.debug.bsl => TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.debug.bsl} (97%) rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{TestFunction24.fs.il.netcore.release.bsl => TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.release.bsl} (96%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.release.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl => Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl} (57%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.debug.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.release.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/{Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl => Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl} (57%) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.debug.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.release.bsl delete mode 100644 tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalAnalysis/SymbolicOperators/E_LessThanDotOpenParen001.fs diff --git a/.gitignore b/.gitignore index f0dbae4d2f3..33c9666c14b 100644 --- a/.gitignore +++ b/.gitignore @@ -129,4 +129,9 @@ tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstanda /tests/AheadOfTime/Trimming/output.txt *.svclog micro.exe -positive.exe \ No newline at end of file +positive.exe +/tests/FSharp.Compiler.ComponentTests/FSharpChecker/StandardError.txt +/tests/FSharp.Compiler.ComponentTests/FSharpChecker/StandardOutput.txt + +# ilverify baseline result files +*.bsl.actual \ No newline at end of file diff --git a/DEVGUIDE.md b/DEVGUIDE.md index cf3a9419481..2ca137ba100 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -204,6 +204,33 @@ Linux/macOS: export TEST_UPDATE_BSL=1 ``` +## Retain Test run built artifacts + +When investigating tests issues it is sometimes useful to examine the artifacts built when running tests. Those built using the newer test framework are usually, +built in the %TEMP%\FSharp.Test.Utilities subdirectory. + +To tell the test framework to not cleanup these files use the: FSHARP_RETAIN_TESTBUILDS environment variable + +Windows: + +CMD: + +```shell +set FSHARP_RETAIN_TESTBUILDS=1 +``` + +PowerShell: + +```shell +$env:FSHARP_RETAIN_TESTBUILDS=1 +``` + +Linux/macOS: + +```shell +export FSHARP_RETAIN_TESTBUILDS=1 +``` + Next, run a build script build (debug or release, desktop or coreclr, depending which baselines you need to update), and test as described [above](#Testing-from-the-command-line). For example: `./Build.cmd -c Release -testCoreClr` to update Release CoreCLR baselines. diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md index 1d799b37f11..3908fc98dd5 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md @@ -1,5 +1,6 @@ ### Fixed +* Fix Realsig+ generates nested closures with incorrect Generic ([Issue #17797](https://github.com/dotnet/fsharp/issues/17797), [PR #17877](https://github.com/dotnet/fsharp/pull/17877)) * Fix missing TailCall warning in Sequential in use scope ([PR #17927](https://github.com/dotnet/fsharp/pull/17927)) * Fix false negatives for passing null to "obj" arguments. Only "obj | null" can now subsume any type ([PR #17757](https://github.com/dotnet/fsharp/pull/17757)) * Fix internal error when calling 'AddSingleton' and other overloads only differing in generic arity ([PR #17804](https://github.com/dotnet/fsharp/pull/17804)) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md new file mode 100644 index 00000000000..375263a2a0e --- /dev/null +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -0,0 +1,12 @@ +### Fixed + +* Fix Realsig+ generates nested closures with incorrect Generic ([Issue #17797](https://github.com/dotnet/fsharp/issues/17797), [PR #17877](https://github.com/dotnet/fsharp/pull/17877)) + +### Added + + +### Changed + + +### Breaking Changes + diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 60a6f012976..861caeea4ab 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -521,7 +521,8 @@ let ComputeTypeAccess (tref: ILTypeRef) hidden (accessibility: Accessibility) re /// Indicates how type parameters are mapped to IL type variables [] -type TypeReprEnv(reprs: Map, count: int, templateReplacement: (TyconRef * ILTypeRef * Typars * TyparInstantiation) option) = +type TypeReprEnv + (reprs: Map, count: int, templateReplacement: (TyconRef * ILTypeRef * Typars * TyparInstantiation) option) = static let empty = TypeReprEnv(count = 0, reprs = Map.empty, templateReplacement = None) @@ -536,7 +537,7 @@ type TypeReprEnv(reprs: Map, count: int, templateReplacement: (Ty /// Lookup a type parameter member _.Item(tp: Typar, m: range) = try - reprs[tp.Stamp] + reprs[tp.Stamp] |> fst with :? KeyNotFoundException -> errorR (InternalError("Undefined or unsolved type variable: " + showL (typarL tp), m)) // Random value for post-hoc diagnostic analysis on generated tree * @@ -546,7 +547,7 @@ type TypeReprEnv(reprs: Map, count: int, templateReplacement: (Ty /// then it is ignored, since it doesn't correspond to a .NET type parameter. member tyenv.AddOne(tp: Typar) = if IsNonErasedTypar tp then - TypeReprEnv(reprs.Add(tp.Stamp, uint16 count), count + 1, templateReplacement) + TypeReprEnv(reprs.Add(tp.Stamp, (uint16 count, tp)), count + 1, templateReplacement) else tyenv @@ -573,6 +574,14 @@ type TypeReprEnv(reprs: Map, count: int, templateReplacement: (Ty /// Get the environment for generating a reference to items within a type definition member eenv.ForTyconRef(tcref: TyconRef) = eenv.ForTycon tcref.Deref + /// Get a list of the Typars in this environment + member eenv.AsUserProvidedTypars() = + reprs + |> Map.toList + |> List.map (fun (_, (_, tp)) -> tp) + |> List.filter (fun tp -> not tp.IsCompilerGenerated) + |> Zset.ofList typarOrder + //-------------------------------------------------------------------------- // Generate type references //-------------------------------------------------------------------------- @@ -6904,14 +6913,6 @@ and GenFreevar cenv m eenvouter tyenvinner (fv: Val) = and GetIlxClosureFreeVars cenv m (thisVars: ValRef list) boxity eenv takenNames expr = let g = cenv.g - // Choose a base name for the closure - let basename = - let boundv = eenv.letBoundVars |> List.tryFind (fun v -> not v.IsCompilerGenerated) - - match boundv with - | Some v -> v.CompiledName cenv.g.CompilerGlobalState - | None -> "clo" - // Get a unique stamp for the closure. This must be stable for things that can be part of a let rec. let uniq = match expr with @@ -6921,18 +6922,34 @@ and GetIlxClosureFreeVars cenv m (thisVars: ValRef list) boxity eenv takenNames | _ -> newUnique () // Choose a name for the closure - let ilCloTypeRef = + let ilCloTypeRef, initialFreeTyvars = + let boundvar = + eenv.letBoundVars |> List.tryFind (fun v -> not v.IsCompilerGenerated) + + let basename = + match boundvar with + | Some v -> v.CompiledName cenv.g.CompilerGlobalState + | None -> "clo" + // FSharp 1.0 bug 3404: System.Reflection doesn't like '.' and '`' in type names let basenameSafeForUseAsTypename = CleanUpGeneratedTypeName basename - let suffixmark = expr.Range - let cloName = // Ensure that we have an g.CompilerGlobalState assert (g.CompilerGlobalState |> Option.isSome) - g.CompilerGlobalState.Value.StableNameGenerator.GetUniqueCompilerGeneratedName(basenameSafeForUseAsTypename, suffixmark, uniq) + g.CompilerGlobalState.Value.StableNameGenerator.GetUniqueCompilerGeneratedName(basenameSafeForUseAsTypename, expr.Range, uniq) + + let ilCloTypeRef = NestedTypeRefForCompLoc eenv.cloc cloName - NestedTypeRefForCompLoc eenv.cloc cloName + let initialFreeTyvars = + match g.realsig with + | true -> + { emptyFreeTyvars with + FreeTypars = eenv.tyenv.AsUserProvidedTypars() + } + | false -> emptyFreeTyvars + + ilCloTypeRef, initialFreeTyvars // Collect the free variables of the closure let cloFreeVarResults = @@ -6943,7 +6960,12 @@ and GetIlxClosureFreeVars cenv m (thisVars: ValRef list) boxity eenv takenNames | None -> opts | Some(tcref, _, typars, _) -> opts.WithTemplateReplacement(tyconRefEq g tcref, typars) - freeInExpr opts expr + accFreeInExpr + opts + expr + { emptyFreeVars with + FreeTyvars = initialFreeTyvars + } // Partition the free variables when some can be accessed from places besides the immediate environment // Also filter out the current value being bound, if any, as it is available from the "this" diff --git a/src/Compiler/TypedTree/CompilerGlobalState.fs b/src/Compiler/TypedTree/CompilerGlobalState.fs index 72da3da4f58..12dda2b08d8 100644 --- a/src/Compiler/TypedTree/CompilerGlobalState.fs +++ b/src/Compiler/TypedTree/CompilerGlobalState.fs @@ -73,4 +73,6 @@ let newUnique() = System.Threading.Interlocked.Increment &uniqueCount /// Unique name generator for stamps attached to to val_specs, tycon_specs etc. //++GLOBAL MUTABLE STATE (concurrency-safe) let mutable private stampCount = 0L -let newStamp() = System.Threading.Interlocked.Increment &stampCount +let newStamp() = + let stamp = System.Threading.Interlocked.Increment &stampCount + stamp \ No newline at end of file diff --git a/src/Compiler/TypedTree/TypedTreeOps.fsi b/src/Compiler/TypedTree/TypedTreeOps.fsi index 6433cf16d3e..10f66bf63bf 100755 --- a/src/Compiler/TypedTree/TypedTreeOps.fsi +++ b/src/Compiler/TypedTree/TypedTreeOps.fsi @@ -1186,6 +1186,9 @@ val accFreeInDecisionTree: FreeVarOptions -> DecisionTree -> FreeVars -> FreeVar /// Get the free variables in a module definition. val freeInModuleOrNamespace: FreeVarOptions -> ModuleOrNamespaceContents -> FreeVars +/// Get the free variables in an expression with accumulator +val accFreeInExpr: FreeVarOptions -> Expr -> FreeVars -> FreeVars + /// Get the free variables in an expression. val freeInExpr: FreeVarOptions -> Expr -> FreeVars diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalAnalysis/SymbolicOperators.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalAnalysis/SymbolicOperators.fs index 331086d940a..73a94c080ec 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalAnalysis/SymbolicOperators.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalAnalysis/SymbolicOperators.fs @@ -31,11 +31,38 @@ module SymbolicOperators = // This test was automatically generated (moved from FSharpQA suite - Conformance/LexicalAnalysis/SymbolicOperators) //This code is not sufficiently generic\. The type variable \^T when \^T : \(static member \( \+ \) : \^T \* \^T -> \^a\) could not be generalized because it would escape its scope - [] - let ``SymbolicOperators - E_LessThanDotOpenParen001_fs - --flaterrors`` compilation = - compilation - |> asFsx + [] // RealSig + [] // Regular + [] + let ``SymbolicOperators_E_LessThanDotOpenParen001_fs`` (realsig) = + Fsx """ + +type public TestType<'T,'S>() = + + member public s.Value with get() = Unchecked.defaultof<'T> + static member public (+++) (a : TestType<'T,'S>, b : TestType<'T,'S>) = a.Value + static member public (+++) (a : TestType<'T,'S>, b : 'T) = b + static member public (+++) (a : 'T, b : TestType<'T,'S>) = a + static member public (+++) (a : TestType<'T,'S>, b : 'T -> 'S) = a.Value + static member public (+++) (a : 'S -> 'T, b : TestType<'T,'S>) = (a 17) + b.Value + +let inline (+++) (a : ^a) (b : ^b) = ((^a or ^b): (static member (+++): ^a * ^b -> ^c) (a,b) ) + +let tt0 = TestType() +let tt1 = TestType() + +let f (x : string) = 18 + +let a0 = tt0 +++ tt1 +let a1 = tt0 +++ 11 +let a2 = 12 +++ tt1 +let a3 = tt0 +++ (fun x -> "18") +let a4 = f +++ tt0 + +let a5 = TestType.(+++)(f, tt0) +let a6 = TestType.(+++)((fun (x : string) -> 18), tt0)""" |> withOptions ["--flaterrors"] + |> withRealInternalSignature realsig |> compile |> shouldFail |> withErrorCode 0670 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs index 5623ac08ca7..bfa44185a1c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs @@ -8,18 +8,20 @@ open FSharp.Test.Compiler module TypesAndTypeConstraints_IWSAMsAndSRTPs = - let typesModule = + let typesModule realsig = FSharp (loadSourceFromFile (Path.Combine(__SOURCE_DIRECTORY__, "Types.fs"))) |> withName "Types" |> withLangVersion70 + |> withRealInternalSignature realsig |> withOptions ["--nowarn:3535"] - let setupCompilation compilation = + let setupCompilation realsig compilation = compilation |> asExe |> withLangVersion70 - |> withReferences [typesModule] - + |> withRealInternalSignature realsig + |> withReferences [typesModule realsig] + let verifyCompile compilation = compilation |> asExe @@ -71,7 +73,7 @@ let main _ = #endif let ``IWSAM test files`` compilation = compilation - |> setupCompilation + |> setupCompilation false |> withLangVersionPreview |> compileAndRun |> shouldSucceed @@ -380,43 +382,57 @@ let main _ = |> withDiagnosticMessage errorMessage |> ignore - [] - let ``IWSAM warning`` () = - Fsx "let fExpectAWarning(x: Types.ISinOperator<'T>) = ()" - |> withReferences [typesModule] + [] // RealSig + [] // Regular + [] + let ``IWSAM warning`` (realsig) = + Fsx "let fExpectAWarning(x: Types.ISinOperator<'T>) = (realsig)" + |> withReferences [typesModule realsig] + |> withRealInternalSignature realsig |> compile |> shouldFail |> withWarningCode 3536 |> withDiagnosticMessage """'ISinOperator<_>' is normally used as a type constraint in generic code, e.g. "'T when ISomeInterface<'T>" or "let f (x: #ISomeInterface<_>)". See https://aka.ms/fsharp-iwsams for guidance. You can disable this warning by using '#nowarn "3536"' or '--nowarn:3536'.""" |> ignore - [] - let ``Multiple support types trait error`` () = + [] // RealSig + [] // Regular + [] + let ``Multiple support types trait error`` (realsig) = Fsx "let inline f5 (x: 'T when ('T or int) : (static member A: int) ) = 'T.A" + |> withRealInternalSignature realsig |> compile |> shouldFail |> withErrorCode 3537 |> withDiagnosticMessage "The trait 'A' invoked by this call has multiple support types. This invocation syntax is not permitted for such traits. See https://aka.ms/fsharp-srtp for guidance." |> ignore - [] - let ``SRTP Delegate conversion not supported`` () = + [] // RealSig + [] // Regular + [] + let ``SRTP Delegate conversion not supported`` (realsig) = Fsx "let inline f_TraitWithDelegate<'T when 'T : (static member StaticMethod: x: System.Func -> int) >() = 'T.StaticMethod(fun x -> x + 1)" + |> withRealInternalSignature realsig |> compile |> shouldFail |> withErrorMessage "This function takes too many arguments, or is used in a context where a function is not expected" - [] - let ``SRTP Expression conversion not supported`` () = + [] // RealSig + [] // Regular + [] + let ``SRTP Expression conversion not supported`` (realsig) = Fsx "let inline f_TraitWithExpression<'T when 'T : (static member StaticMethod: x: System.Linq.Expressions.Expression> -> int) >() = 'T.StaticMethod(fun x -> x + 1)" + |> withRealInternalSignature realsig |> compile |> shouldFail |> withErrorMessage "This function takes too many arguments, or is used in a context where a function is not expected" - [] - let ``IWSAM Delegate conversion works`` () = + [] // RealSig + [] // Regular + [] + let ``IWSAM Delegate conversion works`` (realsig) = Fsx """ open Types @@ -428,12 +444,14 @@ let main _ = failwith "Unexpected result" """ - |> setupCompilation + |> setupCompilation realsig |> compileAndRun |> shouldSucceed - [] - let ``IWSAM Expression conversion works`` () = + [] // RealSig + [] // Regular + [] + let ``IWSAM Expression conversion works`` (realsig) = Fsx """ open Types @@ -445,28 +463,36 @@ let main _ = failwith "Unexpected result" """ - |> setupCompilation + |> setupCompilation realsig |> compileAndRun |> shouldSucceed - [] - let ``SRTP Byref can be passed with old syntax`` () = + [] // RealSig + [] // Regular + [] + let ``SRTP Byref can be passed with old syntax`` (realsig) = Fsx "let inline f_TraitWithByref<'T when 'T : ( static member TryParse: string * byref -> bool) >() = let mutable result = 0 (^T : ( static member TryParse: x: string * byref -> bool) (\"42\", &result))" + |> withRealInternalSignature realsig |> compile |> shouldSucceed - [] - let ``SRTP Byref can be passed with new syntax`` () = + [] // RealSig + [] // Regular + [] + let ``SRTP Byref can be passed with new syntax`` (realsig) = Fsx "let inline f_TraitWithByref<'T when 'T : ( static member TryParse: string * byref -> bool) >() = let mutable result = 0 'T.TryParse(\"42\", &result)" + |> withRealInternalSignature realsig |> compile |> shouldSucceed - [] - let ``Call with old syntax`` () = + [] // RealSig + [] // Regular + [] + let ``Call with old syntax`` (realsig) = Fsx """ type C1() = static member X(p: C1 byref) = p @@ -479,11 +505,14 @@ let main _ = if g1 <> c1 then failwith "Unexpected result" """ + |> withRealInternalSignature realsig |> compileExeAndRun |> shouldSucceed - [] - let ``Call with new syntax`` () = + [] // RealSig + [] // Regular + [] + let ``Call with new syntax`` (realsig) = Fsx """ type C2() = static member X(p: C2 byref) = p @@ -495,11 +524,14 @@ let main _ = if g2 <> c2 then failwith "Unexpected result" """ + |> withRealInternalSignature realsig |> compileExeAndRun |> shouldSucceed - [] - let ``Call with tuple`` () = + [] // RealSig + [] // Regular + [] + let ``Call with tuple`` (realsig) = Fsx """ type C3() = @@ -512,11 +544,14 @@ let main _ = if g3 <> c3 then failwith "Unexpected result" """ + |> withRealInternalSignature realsig |> compileExeAndRun |> shouldSucceed - [] - let test4 () = + [] // RealSig + [] // Regular + [] + let test4 (realsig) = Fsx """ type C4() = static member X() = C4() @@ -527,14 +562,17 @@ let main _ = if g4.GetType() <> typeof then failwith "Unexpected result" """ + |> withRealInternalSignature realsig |> compileExeAndRun |> shouldSucceed // NOTE: Trait constraints that involve byref returns currently can never be satisfied by any method. No other warning is given. // This is a bug that may be fixed in the future. // These tests are pinning down current behavior. - [] - let ``Byref returns not allowed`` () = + [] // RealSig + [] // Regular + [] + let ``Byref returns not allowed`` (realsig) = Fsx """ type C5() = static member X(p: C5 byref) = &p @@ -543,12 +581,15 @@ let main _ = let mutable c5 = C5() let g5 () = callX5 &c5 """ + |> withRealInternalSignature realsig |> compile |> shouldFail |> withDiagnosticMessageMatches "This expression was expected to have type\\s+'byref'\\s+but here has type\\s+'C5'" - [] - let ``Byref returns not allowed pt 2`` () = + [] // RealSig + [] // Regular + [] + let ``Byref returns not allowed pt 2`` (realsig) = Fsx """ type C6() = static member X(p: C6 byref) = &p @@ -558,11 +599,12 @@ let main _ = let mutable c6 = C6() let g6 () = callX6 &c6 """ + |> withRealInternalSignature realsig |> compile |> shouldFail |> withDiagnosticMessageMatches "This expression was expected to have type\\s+'byref'\\s+but here has type\\s+'C6'" - let library = + let library realsig= FSharp """ module Lib @@ -580,65 +622,79 @@ let main _ = let add1 (x: int) = x + 1 """ + |> withRealInternalSignature realsig |> withLangVersion70 |> withOptions ["--nowarn:3535"] - [] - let ``Function implicit conversion not supported on constrained type`` () = + [] // RealSig + [] // Regular + [] + let ``Function implicit conversion not supported on constrained type`` (realsig) = Fsx """ open Lib let f_function_implicit_conversion<'T when ICanBeInt<'T>>(a: 'T) : int = add1(a) """ - |> withReferences [library] + |> withReferences [library realsig] |> withLangVersion70 + |> withRealInternalSignature realsig |> compile |> shouldFail |> withDiagnosticMessageMatches "This expression was expected to have type\\s+'int'\\s+but here has type\\s+''T'" - [] - let ``Method implicit conversion not supported on constrained type`` () = + [] // RealSig + [] // Regular + [] + let ``Method implicit conversion not supported on constrained type`` (realsig) = Fsx """ open Lib let f_method_implicit_conversion<'T when ICanBeInt<'T>>(a: 'T) : int = C.TakeInt(a) """ - |> withReferences [library] + |> withRealInternalSignature realsig + |> withReferences [library realsig] |> withLangVersion70 |> compile |> shouldFail |> withDiagnosticMessageMatches "This expression was expected to have type\\s+'int'\\s+but here has type\\s+''T'" - [] - let ``Function explicit conversion works on constrained type`` () = + [] // RealSig + [] // Regular + [] + let ``Function explicit conversion works on constrained type`` (realsig) = Fsx """ open Lib let f_function_explicit_conversion<'T when ICanBeInt<'T>>(a: 'T) : int = add1(int(a)) """ - |> withReferences [library] + |> withReferences [library realsig] |> withLangVersion70 |> compile |> shouldSucceed - [] - let ``Method explicit conversion works on constrained type`` () = + [] // RealSig + [] // Regular + [] + let ``Method explicit conversion works on constrained type`` (realsig) = Fsx """ open Lib let f_method_explicit_conversion<'T when ICanBeInt<'T>>(a: 'T) : int = C.TakeInt(int(a)) """ - |> withReferences [library] + |> withRealInternalSignature realsig + |> withReferences [library realsig] |> withLangVersion70 |> compile |> shouldSucceed - [] - let ``Nominal type can be used after or`` () = + [] // RealSig + [] // Regular + [] + let ``Nominal type can be used after or`` (realsig) = Fsx """ type C() = @@ -652,13 +708,16 @@ let main _ = if not (callX "A" (C()) = "A OK") then failwith "Unexpected result" """ + |> withRealInternalSignature realsig |> withLangVersion70 |> asExe |> compileAndRun |> shouldSucceed - [] - let ``Nominal type can't be used before or`` () = + [] // RealSig + [] // Regular + [] + let ``Nominal type can't be used before or`` (realsig) = Fsx """ type C() = @@ -666,13 +725,16 @@ let main _ = let inline callX (x: 'T) (y: C) = ((C or ^T): (static member X : 'T * C -> string) (x, y));; """ + |> withRealInternalSignature realsig |> withLangVersion70 |> compile |> shouldFail |> withDiagnosticMessageMatches "Unexpected keyword 'static' in binding" - [] - let ``Nominal type is preferred`` () = + [] // RealSig + [] // Regular + [] + let ``Nominal type is preferred`` (realsig) = Fsx """ type C() = @@ -691,12 +753,13 @@ let main _ = if not (callX2 (C()) (D()) = "C") then failwith "Unexpected result" """ + |> withRealInternalSignature realsig |> withLangVersion70 |> asExe |> compileAndRun |> shouldSucceed - let library2 = + let library2 realsig = FSharp """ module Potato.Lib type IPotato<'T when 'T :> IPotato<'T>> = @@ -713,12 +776,15 @@ let main _ = static member IsGood c = false static member op_Equality (a, b) = false """ + |> withRealInternalSignature realsig |> withLangVersion70 |> withName "Potato" |> withOptions ["--nowarn:3535"] - [] - let ``Active patterns- Using IWSAM in active pattern`` () = + [] // RealSig + [] // Regular + [] + let ``Active patterns- Using IWSAM in active pattern`` (realsig) = FSharp """ module Potato.Test @@ -729,7 +795,8 @@ let main _ = match Potato() with GoodPotato -> () | _ -> failwith "Unexpected result" match Rock() with GoodPotato -> failwith "Unexpected result" | _ -> () """ - |> withReferences [library2] + |> withReferences [library2 realsig] + |> withRealInternalSignature realsig |> withLangVersion70 |> compileExeAndRun |> shouldSucceed @@ -746,8 +813,10 @@ let main _ = """ ] - [] - let ``Active patterns - Using IWSAM equality in active pattern uses generic equality intrinsic`` () = + [] // RealSig + [] // Regular + [] + let ``Active patterns - Using IWSAM equality in active pattern uses generic equality intrinsic`` (realsig) = FSharp """ module Potato.Test @@ -762,7 +831,8 @@ let main _ = | IsEqual -> failwith "Unexpected result" | IsNonEqual -> () """ - |> withReferences [library2] + |> withReferences [library2 realsig] + |> withRealInternalSignature realsig |> withLangVersion70 |> asExe |> compileAndRun @@ -780,12 +850,15 @@ let main _ = """ ] - [] - let ``Suppression of System Numerics interfaces on unitized types`` () = + [] // RealSig + [] // Regular + [] + let ``Suppression of System Numerics interfaces on unitized types`` (realsig) = Fsx """ open System.Numerics let f (x: 'T when 'T :> IMultiplyOperators<'T,'T,'T>) = x;; f 3.0 |> ignore""" + |> withRealInternalSignature realsig |> withLangVersion70 |> compile |> shouldSucceed @@ -840,8 +913,10 @@ let main _ = |> shouldFail |> withErrorMessage $"The type 'float' is not compatible with the type '{potatoType}'" - [] - let ``Interface A with static abstracts can be inherited in interface B and then implemented in type C which inherits B in lang version70`` () = + [] // RealSig + [] // Regular + [] + let ``Interface A with static abstracts can be inherited in interface B and then implemented in type C which inherits B in lang version70`` (realsig) = Fsx """ type IParsable<'T when 'T :> IParsable<'T>> = static abstract member Parse : string -> 'T @@ -863,12 +938,15 @@ let main _ = failwith "failed" """ |> withNoWarn 3535 + |> withRealInternalSignature realsig |> withLangVersion70 |> compile |> shouldSucceed - [] - let ``Static abstracts can be inherited through multiple levels in lang version70`` () = + [] // RealSig + [] // Regular + [] + let ``Static abstracts can be inherited through multiple levels in lang version70`` (realsig) = Fsx """ type IParsable<'T when 'T :> IParsable<'T>> = static abstract member Parse : string -> 'T @@ -902,12 +980,15 @@ let main _ = failwith "failed" """ |> withNoWarn 3535 + |> withRealInternalSignature realsig |> withLangVersion70 |> compile |> shouldSucceed - [] - let ``Static abstracts from BCL can be inherited through multiple levels in lang version70`` () = + [] // RealSig + [] // Regular + [] + let ``Static abstracts from BCL can be inherited through multiple levels in lang version70`` (realsig) = Fsx """ open System open System.Globalization @@ -927,12 +1008,15 @@ let main _ = failwith "failed" """ |> withNoWarn 3535 + |> withRealInternalSignature realsig |> withLangVersion70 |> compile |> shouldSucceed - - [] - let ``Produce an error when one leaves out keyword "static" in an implementation of IWSAM`` () = + + [] // RealSig + [] // Regular + [] + let ``Produce an error when one leaves out keyword "static" in an implementation of IWSAM`` (realsig) = Fsx """ module StaticAbstractBug = type IOperation = @@ -951,19 +1035,22 @@ module StaticAbstractBug = member this.Property3 = 0 member this.Property3 with set value = () """ - |> withOptions [ "--nowarn:3535" ] - |> withLangVersion80 - |> compile - |> shouldFail - |> withDiagnostics [ + |> withOptions [ "--nowarn:3535" ] + |> withRealInternalSignature realsig + |> withLangVersion80 + |> compile + |> shouldFail + |> withDiagnostics [ (Error 855, Line 12, Col 22, Line 12, Col 29, "No abstract or interface member was found that corresponds to this override") (Error 859, Line 14, Col 25, Line 14, Col 33, "No abstract property was found that corresponds to this override") (Error 859, Line 16, Col 25, Line 16, Col 34, "No abstract property was found that corresponds to this override") (Error 859, Line 17, Col 25, Line 17, Col 34, "No abstract property was found that corresponds to this override") - ] - - [] - let ``Produce an error when one leaves out keyword "static" in an implementation of IWSAM with multiple overloads`` () = + ] + + [] // RealSig + [] // Regular + [] + let ``Produce an error when one leaves out keyword "static" in an implementation of IWSAM with multiple overloads`` (realsig) = Fsx """ module StaticAbstractBug = type IOperation = @@ -979,11 +1066,12 @@ module StaticAbstractBug = member this.Property = 0 member this.Property = false """ - |> withOptions [ "--nowarn:3535" ] - |> withLangVersion80 - |> compile - |> shouldFail - |> withDiagnostics [ + |> withOptions [ "--nowarn:3535" ] + |> withRealInternalSignature realsig + |> withLangVersion80 + |> compile + |> shouldFail + |> withDiagnostics [ (Error 1, Line 11, Col 34, Line 11, Col 36, "This expression was expected to have type 'bool' but here has type @@ -992,10 +1080,12 @@ but here has type 'int' but here has type 'bool' ") - ] - - [] - let ``Produce an error for interface with static abstract member that is implemented as instance member`` () = + ] + + [] // RealSig + [] // Regular + [] + let ``Produce an error for interface with static abstract member that is implemented as instance member`` (realsig) = Fsx """ module StaticAbstractBug = type IFoo<'T> = @@ -1015,19 +1105,22 @@ module StaticAbstractBug = member this.Property3 = 0 member this.Property3 with set value = () """ - |> withOptions [ "--nowarn:3535" ] - |> withLangVersion80 - |> compile - |> shouldFail - |> withDiagnostics [ + |> withOptions [ "--nowarn:3535" ] + |> withRealInternalSignature realsig + |> withLangVersion80 + |> compile + |> shouldFail + |> withDiagnostics [ (Error 855, Line 14, Col 18, Line 14, Col 23, "No abstract or interface member was found that corresponds to this override"); (Error 859, Line 15, Col 21, Line 15, Col 29, "No abstract property was found that corresponds to this override"); (Error 859, Line 17, Col 21, Line 17, Col 30, "No abstract property was found that corresponds to this override"); (Error 859, Line 18, Col 21, Line 18, Col 30, "No abstract property was found that corresponds to this override") - ] + ] - [] - let ``Produce an error for interface with static abstract member that is implemented as instance member with multiple overloads`` () = + [] // RealSig + [] // Regular + [] + let ``Produce an error for interface with static abstract member that is implemented as instance member with multiple overloads`` (realsig) = Fsx """ module StaticAbstractBug = type IFoo<'T> = @@ -1046,11 +1139,12 @@ module StaticAbstractBug = member this.Property = 0 member this.Property = false """ - |> withOptions [ "--nowarn:3535" ] - |> withLangVersion80 - |> compile - |> shouldFail - |> withDiagnostics [ + |> withOptions [ "--nowarn:3535" ] + |> withRealInternalSignature realsig + |> withLangVersion80 + |> compile + |> shouldFail + |> withDiagnostics [ (Error 1, Line 14, Col 41, Line 14, Col 42, "The type 'bool' does not match the type 'int'") (Error 1, Line 16, Col 32, Line 16, Col 33, "This expression was expected to have type 'bool' @@ -1058,8 +1152,10 @@ but here has type 'int' ") ] - [] - let ``Produce an error when one leaves out keyword "static" in multiple IWSAM implementations`` () = + [] // RealSig + [] // Regular + [] + let ``Produce an error when one leaves out keyword "static" in multiple IWSAM implementations`` (realsig) = Fsx """ module StaticAbstractBug = type IOperation = @@ -1079,17 +1175,20 @@ module StaticAbstractBug = member this.Execute() = 0 member this.Execute2() = () """ - |> withOptions [ "--nowarn:3535" ] - |> withLangVersion80 - |> compile - |> shouldFail - |> withDiagnostics [ + |> withOptions [ "--nowarn:3535" ] + |> withLangVersion80 + |> withRealInternalSignature realsig + |> compile + |> shouldFail + |> withDiagnostics [ (Error 855, Line 13, Col 25, Line 13, Col 32, "No abstract or interface member was found that corresponds to this override") (Error 855, Line 17, Col 25, Line 17, Col 32, "No abstract or interface member was found that corresponds to this override") - ] + ] - [] - let ``Produces errors when includes keyword "static" when implementing a generic interface in a type`` () = + [] // RealSig + [] // Regular + [] + let ``Produces errors when includes keyword "static" when implementing a generic interface in a type`` (realsig) = Fsx """ module StaticAbstractBug = type IFoo<'T> = @@ -1109,21 +1208,24 @@ module StaticAbstractBug = static member Property3 = 0 static member Property3 with set value = () """ - |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withDiagnostics [ + |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withDiagnostics [ (Error 3855, Line 13, Col 23, Line 13, Col 27, "No static abstract member was found that corresponds to this override") (Error 3855, Line 14, Col 23, Line 14, Col 28, "No static abstract member was found that corresponds to this override") (Error 3859, Line 15, Col 23, Line 15, Col 31, "No static abstract property was found that corresponds to this override") (Error 3859, Line 16, Col 23, Line 16, Col 32, "No static abstract property was found that corresponds to this override") (Error 3859, Line 17, Col 23, Line 17, Col 32, "No static abstract property was found that corresponds to this override") (Error 3859, Line 18, Col 23, Line 18, Col 32, "No static abstract property was found that corresponds to this override") - ] - - [] - let ``Produces errors when includes keyword "static" when implementing an interface in a type`` () = + ] + + [] // RealSig + [] // Regular + [] + let ``Produces errors when includes keyword "static" when implementing an interface in a type`` (realsig) = Fsx """ module StaticAbstractBug = type IOperation = @@ -1139,19 +1241,22 @@ module StaticAbstractBug = static member Property = 0 static member Property = false """ - |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withDiagnostics [ + |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withDiagnostics [ (Error 3855, Line 11, Col 27, Line 11, Col 34, "No static abstract member was found that corresponds to this override") (Error 3855, Line 12, Col 27, Line 12, Col 34, "No static abstract member was found that corresponds to this override") (Error 3859, Line 13, Col 27, Line 13, Col 35, "No static abstract property was found that corresponds to this override") (Error 3859, Line 14, Col 27, Line 14, Col 35, "No static abstract property was found that corresponds to this override") - ] - - [] - let ``No error when implementing interfaces with static members by using class types`` () = + ] + + [] // RealSig + [] // Regular + [] + let ``No error when implementing interfaces with static members by using class types`` (realsig) = Fsx """ type IPrintable = abstract member Print: unit -> unit @@ -1170,13 +1275,16 @@ let someClass1 = SomeClass1(1, 2.0) someClass.Print() someClass1.GetPrint() """ - |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] - |> withLangVersion80 - |> typecheck - |> shouldSucceed - - [] - let ``No error when implementing interfaces with static members and IWSAM by using class types`` () = + |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig + |> withLangVersion80 + |> typecheck + |> shouldSucceed + + [] // RealSig + [] // Regular + [] + let ``No error when implementing interfaces with static members and IWSAM by using class types`` (realsig) = Fsx """ [] type IPrintable = @@ -1190,39 +1298,46 @@ type SomeClass1() = let someClass1 = SomeClass1() let execute = IPrintable.Say("hello") """ - |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] - |> withLangVersion80 - |> typecheck - |> shouldSucceed + |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig + |> withLangVersion80 + |> typecheck + |> shouldSucceed - [] - let ``Accessing to IWSAM(System.Numerics non virtual) produces a compilation error`` () = + [] // RealSig + [] // Regular + [] + let ``Accessing to IWSAM(System.Numerics non virtual) produces a compilation error`` (realsig) = Fsx """ open System.Numerics IAdditionOperators.op_Addition (3, 6) - """ - |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] - |> withLangVersion80 - |> compile - |> shouldFail - |> withSingleDiagnostic (Error 3866, Line 4, Col 1, Line 4, Col 38, "A static abstract non-virtual interface member should only be called via type parameter (for example: 'T.op_Addition).") - - [] - let ``Accessing to IWSAM(System.Numerics virtual member) compiles and runs`` () = + """ + |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig + |> withLangVersion80 + |> compile + |> shouldFail + |> withSingleDiagnostic (Error 3866, Line 4, Col 1, Line 4, Col 38, "A static abstract non-virtual interface member should only be called via type parameter (for example: 'T.op_Addition).") + + [] // RealSig + [] // Regular + [] + let ``Accessing to IWSAM(System.Numerics virtual member) compiles and runs`` (realsig) = Fsx """ open System.Numerics let res = IAdditionOperators.op_CheckedAddition (3, 6) printf "%A" res""" - |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] - |> withLangVersion80 - |> asExe - |> compile - |> shouldSucceed - |> run - |> verifyOutput "9" + |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig + |> withLangVersion80 + |> asExe + |> compile + |> shouldSucceed + |> run + |> verifyOutput "9" #if !NETCOREAPP [] @@ -1242,35 +1357,43 @@ printf "%A" res""" (Error 3866, Line 15, Col 82, Line 15, Col 129, "A static abstract non-virtual interface member should only be called via type parameter (for example: 'T.Parse).") ] - [] - let ``Error message that explicitly disallows static abstract methods in abstract classes.`` () = + [] // RealSig + [] // Regular + [] + let ``Error message that explicitly disallows static abstract methods in abstract classes.`` (realsig) = Fsx """ [] type A () = static abstract M : unit -> unit """ |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig |> typecheck |> shouldFail |> withDiagnostics [ (Error 3867, Line 4, Col 21, Line 4, Col 22, "Classes cannot contain static abstract members.") ] - [] - let ``Error message that explicitly disallows static abstract methods in classes.`` () = + [] // RealSig + [] // Regular + [] + let ``Error message that explicitly disallows static abstract methods in classes.`` (realsig) = Fsx """ type A () = static abstract M : unit -> unit """ |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig |> typecheck |> shouldFail |> withDiagnostics [ (Error 3867, Line 3, Col 21, Line 3, Col 22, "Classes cannot contain static abstract members.") ] - - [] - let ``Access modifiers cannot be applied to an SRTP constraint in preview`` () = + + [] // RealSig + [] // Regular + [] + let ``Access modifiers cannot be applied to an SRTP constraint in preview`` (realsig) = FSharp """ let inline length (x: ^a when ^a: (member public Length: int)) = x.Length let inline length2 (x: ^a when ^a: (member Length: int with public get)) = x.Length @@ -1278,6 +1401,7 @@ let inline length3 (x: ^a when ^a: (member Length: int with public set)) = x.set let inline length4 (x: ^a when ^a: (member public get_Length: unit -> int)) = x.get_Length() """ |> withLangVersionPreview + |> withRealInternalSignature realsig |> typecheck |> shouldFail |> withDiagnostics [ @@ -1286,9 +1410,11 @@ let inline length4 (x: ^a when ^a: (member public get_Length: unit -> int)) = x. (Error 3871, Line 4, Col 61, Line 4, Col 67, "Access modifiers cannot be applied to an SRTP constraint.") (Error 3871, Line 5, Col 44, Line 5, Col 50, "Access modifiers cannot be applied to an SRTP constraint.") ] - - [] - let ``Access modifiers in an SRTP constraint generate warning in F# 8.0`` () = + + [] // RealSig + [] // Regular + [] + let ``Access modifiers in an SRTP constraint generate warning in F# 8.0`` (realsig) = FSharp """ let inline length (x: ^a when ^a: (member public Length: int)) = x.Length let inline length2 (x: ^a when ^a: (member Length: int with public get)) = x.Length @@ -1296,6 +1422,7 @@ let inline length3 (x: ^a when ^a: (member Length: int with public set)) = x.set let inline length4 (x: ^a when ^a: (member public get_Length: unit -> int)) = x.get_Length() """ |> withLangVersion80 + |> withRealInternalSignature realsig |> typecheck |> shouldFail |> withDiagnostics [ @@ -1305,8 +1432,10 @@ let inline length4 (x: ^a when ^a: (member public get_Length: unit -> int)) = x. (Warning 3871, Line 5, Col 44, Line 5, Col 50, "Access modifiers cannot be applied to an SRTP constraint.") ] - [] - let ``Error for partial implementation of interface with static abstract members`` () = + [] // RealSig + [] // Regular + [] + let ``Error for partial implementation of interface with static abstract members`` (realsig) = Fsx """ type IFace = static abstract P1 : int @@ -1318,14 +1447,17 @@ type T = """ |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig |> typecheck |> shouldFail |> withDiagnostics [ (Error 366, Line 7, Col 15, Line 7, Col 20, "No implementation was given for 'static abstract IFace.P2: int'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") ] - - [] - let ``Error for no implementation of interface with static abstract members`` () = + + [] // RealSig + [] // Regular + [] + let ``Error for no implementation of interface with static abstract members`` (realsig) = Fsx """ type IFace = static abstract P1 : int @@ -1335,6 +1467,7 @@ type T = interface IFace with """ |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig |> typecheck |> shouldFail |> withDiagnostics [ @@ -1344,8 +1477,10 @@ type T = Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") ] - [] - let ``Error for partial implementation of interface with static and non static abstract members`` () = + [] // RealSig + [] // Regular + [] + let ``Error for partial implementation of interface with static and non static abstract members`` (realsig) = Fsx """ type IFace = static abstract P1 : int @@ -1360,6 +1495,7 @@ type T = """ |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig |> typecheck |> shouldFail |> withDiagnostics [ @@ -1368,9 +1504,11 @@ type T = 'abstract IFace.P4: int' Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") ] - - [] - let ``Error for no implementation of interface with static and non static abstract members`` () = + + [] // RealSig + [] // Regular + [] + let ``Error for no implementation of interface with static and non static abstract members`` (realsig) = Fsx """ type IFace = static abstract P1 : int @@ -1380,9 +1518,10 @@ type IFace = type T = interface IFace with - + """ |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig |> typecheck |> shouldFail |> withDiagnostics [ @@ -1394,8 +1533,10 @@ type T = Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") ] - [] - let ``Error for partial implementation of interface with non static abstract members`` () = + [] // RealSig + [] // Regular + [] + let ``Error for partial implementation of interface with non static abstract members`` (realsig) = Fsx """ type IFace = abstract member P3 : int @@ -1404,17 +1545,20 @@ type IFace = type T = interface IFace with member this.P3 = 3 - + """ |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig |> typecheck |> shouldFail |> withDiagnostics [ (Error 366, Line 7, Col 15, Line 7, Col 20, "No implementation was given for 'abstract IFace.P4: int'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") ] - - [] - let ``Error for no implementation of interface with non static abstract members`` () = + + [] // RealSig + [] // Regular + [] + let ``Error for no implementation of interface with non static abstract members`` (realsig) = Fsx """ type IFace = abstract member P3 : int @@ -1425,6 +1569,7 @@ type T = """ |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] + |> withRealInternalSignature realsig |> typecheck |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs index ebc7634013a..49db6354ad8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs @@ -13,73 +13,73 @@ module ComputedCollections = |> ignoreWarnings |> verifyILBaseline - [] - let Int32RangeArrays_fs (compilation: CompilationHelper) = + [] + let Int32RangeArrays_fs compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``Int32RangeLists_fs`` compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``UInt64RangeArrays_fs`` compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``UInt64RangeLists_fs`` compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``ForNInRangeArrays_fs`` compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``ForNInRangeLists_fs`` compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``ForXInArray_ToArray_fs`` compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``ForXInArray_ToList_fs`` compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``ForXInList_ToArray_fs`` compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``ForXInList_ToList_fs`` compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``ForXInSeq_ToArray_fs`` compilation = compilation |> getCompilation |> verifyCompilation - [] + [] let ``ForXInSeq_ToList_fs`` compilation = compilation |> getCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl index 614d86d0f56..1c4d00cee7e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl @@ -1274,7 +1274,7 @@ IL_0001: ldsfld class assembly/'for _ in List-groupBy id -- do ---@28' assembly/'for _ in List-groupBy id -- do ---@28'::@_instance 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>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0010: stloc.1 IL_0011: ldloc.1 IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() @@ -1313,7 +1313,7 @@ IL_0001: ldsfld class assembly/'for _ | _ in List-groupBy id -- do ---@29' assembly/'for _ | _ in List-groupBy id -- do ---@29'::@_instance 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>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0010: stloc.1 IL_0011: ldloc.1 IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() @@ -1352,7 +1352,7 @@ IL_0001: ldsfld class assembly/'for _ - _ in List-groupBy id -- do ---@30' assembly/'for _ - _ in List-groupBy id -- do ---@30'::@_instance 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>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0010: stloc.1 IL_0011: ldloc.1 IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() @@ -1391,7 +1391,7 @@ IL_0001: ldsfld class assembly/'for _, _group in List-groupBy id -- do ---@31' assembly/'for _, _group in List-groupBy id -- do ---@31'::@_instance 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>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0010: stloc.1 IL_0011: ldloc.1 IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() @@ -1431,7 +1431,7 @@ IL_0001: ldsfld class assembly/'for _, group in List-groupBy id -- do ---@32' assembly/'for _, group in List-groupBy id -- do ---@32'::@_instance 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>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0010: stloc.1 IL_0011: ldloc.1 IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs index d37be433345..7fc56dba8c1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs @@ -7,13 +7,16 @@ 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 realsig compilation = + + let computationExprLibrary = + FsxFromPath (Path.Combine(__SOURCE_DIRECTORY__, "DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs")) + |> withRealInternalSignature realsig + |> withName "DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth_fs" - let verifyCompilation compilation = compilation |> asFs + |> withRealInternalSignature realsig |> withOptions ["--test:EmitFeeFeeAs100001"] |> asExe |> withReferences [computationExprLibrary] @@ -28,88 +31,88 @@ module DoNotBoxStruct = let ``DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth_fs`` compilation = compilation |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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_FSInterface_fs`` compilation = compilation |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false //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 |> getCompilation - |> verifyCompilation + |> verifyCompilation false diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeInitialization.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeInitialization.fs index fe209b3e50e..fd9eb1848d4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeInitialization.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeInitialization.fs @@ -5,6 +5,7 @@ namespace EmittedIL.RealInternalSignature open Xunit open FSharp.Test open FSharp.Test.Compiler +open System.IO module ClassTypeInitialization = @@ -484,364 +485,322 @@ printfn "%A" (MyClass.result()) ] - [] // RealSig - [] // Regular + [] // RealSig Optimize + [] // RealSig NoOptimize + [] // Regular Optimize + [] // Regular NoOptimize [] - let ``nested generic closure`` (realSig) = + let ``nested generic closure`` (realSig, optimize) = + let path = __SOURCE_DIRECTORY__ ++ "nested_generic_closure.fs" + let source = File.ReadAllText (path) + + FSharp source + |> asExe + |> withRealInternalSignature realSig + |> withOptimization optimize + |> compileAndRun + |> shouldSucceed + + [] // RealSig Optimize + [] // RealSig NoOptimize + [] // Regular Optimize + [] // Regular NoOptimize + [] + let ``Generic class with closure with constraints`` (realSig, optimize) = FSharp """ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +namespace Test +open System -namespace MyCollections +module RuntimeHelpers = + [] + type MyType<'A,'B when 'B :> seq<'A>>(sources: seq<'B>) = + + member x.MoveNext() = + let rec takeInner c = + let rec takeOuter b = + if b.ToString () = "1" then failwith "Oops" + if sources |> Seq.length > 10 then + sources |> Seq.skip 10 + else + sources + if c.ToString() = "1" then failwith "Oops" + if sources |> Seq.length < 5 then + sources + else + takeOuter 7 + takeInner 3 + +open RuntimeHelpers +module doIt = + let x = seq { ArraySegment([|1uy; 2uy; 3uy|]); ArraySegment([|1uy; 2uy; 3uy|]); ArraySegment([|1uy; 2uy; 3uy|]); } + let enumerator = x |> MyType<_,_> + for i in enumerator.MoveNext() do + printfn "%A" i + """ + |> asExe + |> withRealInternalSignature realSig + |> withOptimization optimize + |> compileAndRun + |> shouldSucceed -#nowarn "52" // The value has been copied to ensure the original is not mutated by this operation + [] // RealSig Optimize + [] // RealSig NoOptimize + [] // Regular Optimize + [] // Regular NoOptimize + [] + let ``AgedLookup`` (realSig, optimize) = -open System.Diagnostics -open System.Collections -open System.Collections.Generic -open Microsoft.FSharp.Core + FSharp """ +namespace Internal.Utilities.Collections -module internal IEnumerator = +open System + +[] +type internal ValueStrength<'T when 'T: not struct> = + | Strong of 'T + | Weak of WeakReference<'T> + +type internal AgedLookup<'Token, 'Key, 'Value when 'Value: not struct>(keepStrongly: int, areSimilar, ?requiredToKeep, ?keepMax: int) = + /// The list of items stored. Youngest is at the end of the list. + /// The choice of order is somewhat arbitrary. If the other way then adding + /// items would be O(1) and removing O(N). + let mutable refs: ('Key * ValueStrength<'Value>) list = [] + + let mutable keepStrongly = keepStrongly + + // The 75 here determines how long the list should be passed the end of strongly held + // references. Some operations are O(N) and we don't want to let things get out of + // hand. + let keepMax = defaultArg keepMax 75 + let mutable keepMax = max keepStrongly keepMax + let requiredToKeep = defaultArg requiredToKeep (fun _ -> false) + + /// Look up the given key, return None if not found. + let TryPeekKeyValueImpl (data, key) = + let rec Lookup key = + function + // Treat a list of key-value pairs as a lookup collection. + // This function returns true if two keys are the same according to the predicate + // function passed in. + | [] -> None + | (similarKey, value) :: t -> + if areSimilar (key, similarKey) then + Some(similarKey, value) + else + Lookup key t + + Lookup key data + + /// Determines whether a particular key exists. + let Exists (data, key) = TryPeekKeyValueImpl(data, key).IsSome + + /// Set a particular key's value. + let Add (data, key, value) = data @ [ key, value ] + + /// Promote a particular key value. + let Promote (data, key, value) = + (data |> List.filter (fun (similarKey, _) -> not (areSimilar (key, similarKey)))) + @ [ (key, value) ] + + /// Remove a particular key value. + let RemoveImpl (data, key) = + let keep = + data |> List.filter (fun (similarKey, _) -> not (areSimilar (key, similarKey))) + + keep + + let TryGetKeyValueImpl (data, key) = + match TryPeekKeyValueImpl(data, key) with + | Some(similarKey, value) as result -> + // If the result existed, move it to the end of the list (more likely to keep it) + result, Promote(data, similarKey, value) + | None -> None, data + + /// Remove weak entries from the list that have been collected. + let FilterAndHold (tok: 'Token) = + ignore tok // reading 'refs' requires a token + + [ + for key, value in refs do + match value with + | Strong(value) -> yield (key, value) + | Weak(weakReference) -> + match weakReference.TryGetTarget() with + | false, _ -> () + | true, value -> yield key, value + ] - let noReset() = raise (new System.NotSupportedException("SR.GetString(SR.resetNotSupported)")) - let notStarted() = raise (new System.InvalidOperationException("SR.GetString(SR.enumerationNotStarted)")) - let alreadyFinished() = raise (new System.InvalidOperationException("SR.GetString(SR.enumerationAlreadyFinished)")) - let check started = if not started then notStarted() - let dispose (r : System.IDisposable) = r.Dispose() + let AssignWithStrength (tok, newData) = + let actualLength = List.length newData + let tossThreshold = max 0 (actualLength - keepMax) // Delete everything less than this threshold + let weakThreshold = max 0 (actualLength - keepStrongly) // Weaken everything less than this threshold + + let newData = newData |> List.mapi (fun n kv -> n, kv) // Place the index. + + let newData = + newData + |> List.filter (fun (n: int, v) -> n >= tossThreshold || requiredToKeep (snd v)) + + let newData = + newData + |> List.map (fun (n: int, (k, v)) -> + let handle = + if n < weakThreshold && not (requiredToKeep v) then + Weak(WeakReference<_>(v)) + else + Strong(v) + + k, handle) + + ignore tok // Updating refs requires tok + refs <- newData + + member al.TryPeekKeyValue(tok, key) = + // Returns the original key value as well since it may be different depending on equality test. + let data = FilterAndHold(tok) + TryPeekKeyValueImpl(data, key) + + member al.TryGetKeyValue(tok, key) = + let data = FilterAndHold(tok) + let result, newData = TryGetKeyValueImpl(data, key) + AssignWithStrength(tok, newData) + result + + member al.TryGet(tok, key) = + let data = FilterAndHold(tok) + let result, newData = TryGetKeyValueImpl(data, key) + AssignWithStrength(tok, newData) + + match result with + | Some(_, value) -> Some(value) + | None -> None + + member al.Put(tok, key, value) = + let data = FilterAndHold(tok) + + let data = if Exists(data, key) then RemoveImpl(data, key) else data + + let data = Add(data, key, value) + AssignWithStrength(tok, data) // This will remove extras + + member al.Remove(tok, key) = + let data = FilterAndHold(tok) + let newData = RemoveImpl(data, key) + AssignWithStrength(tok, newData) + + member al.Clear(tok) = + let _discards = FilterAndHold(tok) + AssignWithStrength(tok, []) + + member al.Resize(tok, newKeepStrongly, ?newKeepMax) = + let newKeepMax = defaultArg newKeepMax 75 + keepStrongly <- newKeepStrongly + keepMax <- max newKeepStrongly newKeepMax + let keep = FilterAndHold(tok) + AssignWithStrength(tok, keep) + """ + |> asLibrary + |> withRealInternalSignature realSig + |> withOptimization optimize + |> compile + |> shouldSucceed - let cast (e : IEnumerator) : IEnumerator<'T> = - { new IEnumerator<'T> with - member _.Current = unbox<'T> e.Current + [] // RealSig Optimize + [] // RealSig NoOptimize + [] // Regular Optimize + [] // Regular NoOptimize + [] + let ``BigTuples`` (realSig, optimize) = - interface IEnumerator with - member _.Current = unbox<'T> e.Current :> obj + FSharp """ +namespace Equality - [] - member _.MoveNext() = e.MoveNext() +type BigGenericTuple<'a> = BigGenericTuple of int * 'a * byte * int * 'a * byte + """ + |> asLibrary + |> withRealInternalSignature realSig + |> withOptimization optimize + |> compile + |> shouldSucceed - member _.Reset() = noReset() + [] // RealSig Optimize + [] // RealSig NoOptimize + [] // Regular Optimize + [] // Regular NoOptimize + [] + let ``Array groupBy id`` (realSig, optimize) = - interface System.IDisposable with - member _.Dispose() = - match e with - | :? System.IDisposable as e -> e.Dispose() - | _ -> () } + FSharp """ +module GroupByTest +let ``for _ in Array groupBy id [||] do ...`` () = [|for _ in Array.groupBy id [||] do 0|] + """ + |> asLibrary + |> withRealInternalSignature realSig + |> withOptimization optimize + |> compile + |> shouldSucceed - /// A concrete implementation of an enumerator that returns no values - [] - type EmptyEnumerator<'T>() = - let mutable started = false - interface IEnumerator<'T> with - member _.Current = - check started - (alreadyFinished() : 'T) - - interface System.Collections.IEnumerator with - member _.Current = - check started - (alreadyFinished() : obj) - - [] - member _.MoveNext() = - if not started then started <- true - false - - member _.Reset() = noReset() - - interface System.IDisposable with - member _.Dispose() = () - - let Empty<'T> () = (new EmptyEnumerator<'T>() :> IEnumerator<'T>) - - [] - type EmptyEnumerable<'T> = - - | EmptyEnumerable - - interface IEnumerable<'T> with - member _.GetEnumerator() = Empty<'T>() - - interface IEnumerable with - member _.GetEnumerator() = (Empty<'T>() :> IEnumerator) - - type GeneratedEnumerable<'T, 'State>(openf: unit -> 'State, compute: 'State -> 'T option, closef: 'State -> unit) = - let mutable started = false - let mutable curr = None - let state = ref (Some (openf ())) - let getCurr() : 'T = - check started - match curr with - | None -> alreadyFinished() - | Some x -> x - - let readAndClear () = - lock state (fun () -> - match state.Value with - | None -> None - | Some _ as res -> - state.Value <- None - res) - - let start() = - if not started then - started <- true - - let dispose() = - readAndClear() |> Option.iter closef - - let finish() = - try dispose() - finally curr <- None - - interface IEnumerator<'T> with - member _.Current = getCurr() - - interface IEnumerator with - member _.Current = box (getCurr()) - - [] - member _.MoveNext() = - start() - match state.Value with - | None -> false // we started, then reached the end, then got another MoveNext - | Some s -> - match (try compute s with e -> finish(); reraise()) with - | None -> finish(); false - | Some _ as x -> - curr <- x - true - - member _.Reset() = noReset() - - interface System.IDisposable with - member _.Dispose() = dispose() - [] - type Singleton<'T>(v:'T) = - let mutable started = false + let roundTripWithInterfaceGeneration(realsig, optimize, implementationFile) = - interface IEnumerator<'T> with - member _.Current = v + let generatedSignature = + Fs implementationFile + |> withRealInternalSignature realsig + |> withOptimization optimize + |> printSignatures - interface IEnumerator with - member _.Current = box v + Fsi generatedSignature + |> asLibrary + |> withAdditionalSourceFile (FsSource implementationFile) + |> withRealInternalSignature realsig + |> withOptimization optimize + |> compile + |> shouldSucceed - [] - member _.MoveNext() = if started then false else (started <- true; true) + [] // RealSig Optimize + [] // RealSig NoOptimize + [] // Regular Optimize + [] // Regular NoOptimize + [] + let ``generic-parameter-order-roundtrip`` (realsig, optimize) = - member _.Reset() = noReset() + let implementationFile = """ +module OrderMatters - interface System.IDisposable with - member _.Dispose() = () +type IMonad<'a> = + interface + // Hash constraint leads to another type parameter + abstract bind : #IMonad<'a> -> ('a -> #IMonad<'b>) -> IMonad<'b> + end""" - let Singleton x = (new Singleton<'T>(x) :> IEnumerator<'T>) + roundTripWithInterfaceGeneration(realsig, optimize, implementationFile) - let EnumerateThenFinally f (e : IEnumerator<'T>) = - { new IEnumerator<'T> with - member _.Current = e.Current + [] // RealSig Optimize + [] // RealSig NoOptimize + [] // Regular Optimize + [] // Regular NoOptimize + [] + let ``members_basic-roundtrip`` (realsig, optimize) = - interface IEnumerator with - member _.Current = (e :> IEnumerator).Current + let implementationFile = """ +namespace GenericInterfaceTest - [] - member _.MoveNext() = e.MoveNext() + type Foo<'a> = + interface + abstract fun1 : 'a -> 'a + abstract fun2 : int -> int + end - member _.Reset() = noReset() - interface System.IDisposable with - member _.Dispose() = - try - e.Dispose() - finally - f() - } + type Bar<'b> = + class + val store : 'b + interface Foo<'b> with + member self.fun1(x) = x + member self.fun2(x) = 1 + end + new(x) = { store = x } + end""" - let inline checkNonNull argName arg = - if isNull arg then - nullArg argName - - let mkSeq f = - { new IEnumerable<'U> with - member _.GetEnumerator() = f() - - interface IEnumerable with - member _.GetEnumerator() = (f() :> IEnumerator) } - -namespace Microsoft.FSharp.Core.CompilerServices - - open System.Diagnostics - open Microsoft.FSharp.Core - open MyCollections - open MyCollections.IEnumerator - open System.Collections - open System.Collections.Generic - - module RuntimeHelpers = - - [] - type internal StructBox<'T when 'T:equality>(value:'T) = - member x.Value = value - - static member Comparer = - let gcomparer = HashIdentity.Structural<'T> - { new IEqualityComparer> with - member _.GetHashCode(v) = gcomparer.GetHashCode(v.Value) - member _.Equals(v1,v2) = gcomparer.Equals(v1.Value,v2.Value) } - - let Generate openf compute closef = - mkSeq (fun () -> new IEnumerator.GeneratedEnumerable<_,_>(openf, compute, closef) :> IEnumerator<'T>) - - let EnumerateFromFunctions create moveNext current = - Generate - create - (fun x -> if moveNext x then Some(current x) else None) - (fun x -> match box(x) with :? System.IDisposable as id -> id.Dispose() | _ -> ()) - - // A family of enumerators that can have additional 'finally' actions added to the enumerator through - // the use of mutation. This is used to 'push' the disposal action for a 'use' into the next enumerator. - // For example, - // seq { use x = ... - // while ... } - // results in the 'while' loop giving an adjustable enumerator. This is then adjusted by adding the disposal action - // from the 'use' into the enumerator. This means that we avoid constructing a two-deep enumerator chain in this - // common case. - type IFinallyEnumerator = - abstract AppendFinallyAction : (unit -> unit) -> unit - - /// A concrete implementation of IEnumerable that adds the given compensation to the "Dispose" chain of any - /// enumerators returned by the enumerable. - [] - type FinallyEnumerable<'T>(compensation: unit -> unit, restf: unit -> seq<'T>) = - interface IEnumerable<'T> with - member _.GetEnumerator() = - try - let ie = restf().GetEnumerator() - match ie with - | :? IFinallyEnumerator as a -> - a.AppendFinallyAction(compensation) - ie - | _ -> - IEnumerator.EnumerateThenFinally compensation ie - with e -> - compensation() - reraise() - interface IEnumerable with - member x.GetEnumerator() = ((x :> IEnumerable<'T>).GetEnumerator() :> IEnumerator) - - /// An optimized object for concatenating a sequence of enumerables - [] - type ConcatEnumerator<'T,'U when 'U :> seq<'T>>(sources: seq<'U>) = - let mutable outerEnum = sources.GetEnumerator() - let mutable currInnerEnum = IEnumerator.Empty() - - let mutable started = false - let mutable finished = false - let mutable compensations = [] - - [] // false = unchecked - val mutable private currElement : 'T - - member _.Finish() = - finished <- true - try - match currInnerEnum with - | null -> () - | _ -> - try - currInnerEnum.Dispose() - finally - currInnerEnum <- null - finally - try - match outerEnum with - | null -> () - | _ -> - try - outerEnum.Dispose() - finally - outerEnum <- null - finally - let rec iter comps = - match comps with - | [] -> () - | h :: t -> - try h() finally iter t - try - compensations |> List.rev |> iter - finally - compensations <- [] - - member x.GetCurrent() = - IEnumerator.check started - if finished then IEnumerator.alreadyFinished() else x.currElement - - interface IFinallyEnumerator with - member _.AppendFinallyAction(f) = - compensations <- f :: compensations - - interface IEnumerator<'T> with - member x.Current = x.GetCurrent() - - interface IEnumerator with - member x.Current = box (x.GetCurrent()) - - [] - member x.MoveNext() = - if not started then started <- true - if finished then false - else - let rec takeInner () = - // check the inner list - if currInnerEnum.MoveNext() then - x.currElement <- currInnerEnum.Current - true - else - // check the outer list - let rec takeOuter() = - if outerEnum.MoveNext() then - let ie = outerEnum.Current - // Optimization to detect the statically-allocated empty IEnumerables - match box ie with - | :? EmptyEnumerable<'T> -> - // This one is empty, just skip, don't call GetEnumerator, try again - takeOuter() - | _ -> - // OK, this one may not be empty. - // Don't forget to dispose of the enumerator for the inner list now we're done with it - currInnerEnum.Dispose() - currInnerEnum <- ie.GetEnumerator() - takeInner () - else - // We're done - x.Finish() - false - takeOuter() - takeInner () - - member _.Reset() = IEnumerator.noReset() - - interface System.IDisposable with - - [] - member x.Dispose() = - if not finished then - x.Finish() - - module doIt = - open System - open Microsoft.FSharp.Core.CompilerServices - open Microsoft.FSharp.Collections - - let x = seq { ArraySegment([|1uy; 2uy; 3uy|]); ArraySegment([|1uy; 2uy; 3uy|]); ArraySegment([|1uy; 2uy; 3uy|]); } - let enumerator = new RuntimeHelpers.ConcatEnumerator<_,_>(x) :> IEnumerator - let rec loop () = - if enumerator.MoveNext() then - printfn $"{enumerator.Current}" - loop () - loop () -""" - |> asExe - |> withRealInternalSignature realSig - |> withOptimize - |> compileAndRun - |> shouldSucceed + roundTripWithInterfaceGeneration(realsig, optimize, implementationFile) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/nested_generic_closure.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/nested_generic_closure.fs new file mode 100644 index 00000000000..4d63e54ce28 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/nested_generic_closure.fs @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace MyCollections + +#nowarn "52" // The value has been copied to ensure the original is not mutated by this operation + +open System.Diagnostics +open System.Collections +open System.Collections.Generic +open Microsoft.FSharp.Core + +module internal IEnumerator = + + let noReset() = raise (new System.NotSupportedException("SR.GetString(SR.resetNotSupported)")) + let notStarted() = raise (new System.InvalidOperationException("SR.GetString(SR.enumerationNotStarted)")) + let alreadyFinished() = raise (new System.InvalidOperationException("SR.GetString(SR.enumerationAlreadyFinished)")) + let check started = if not started then notStarted() + let dispose (r : System.IDisposable) = r.Dispose() + + let cast (e : IEnumerator) : IEnumerator<'T> = + { new IEnumerator<'T> with + member _.Current = unbox<'T> e.Current + + interface IEnumerator with + member _.Current = unbox<'T> e.Current :> obj + + [] + member _.MoveNext() = e.MoveNext() + + member _.Reset() = noReset() + + interface System.IDisposable with + member _.Dispose() = + match e with + | :? System.IDisposable as e -> e.Dispose() + | _ -> () } + + /// A concrete implementation of an enumerator that returns no values + [] + type EmptyEnumerator<'T>() = + let mutable started = false + interface IEnumerator<'T> with + member _.Current = + check started + (alreadyFinished() : 'T) + + interface System.Collections.IEnumerator with + member _.Current = + check started + (alreadyFinished() : obj) + + [] + member _.MoveNext() = + if not started then started <- true + false + + member _.Reset() = noReset() + + interface System.IDisposable with + member _.Dispose() = () + + let Empty<'T> () = (new EmptyEnumerator<'T>() :> IEnumerator<'T>) + + [] + type EmptyEnumerable<'T> = + + | EmptyEnumerable + + interface IEnumerable<'T> with + member _.GetEnumerator() = Empty<'T>() + + interface IEnumerable with + member _.GetEnumerator() = (Empty<'T>() :> IEnumerator) + + type GeneratedEnumerable<'T, 'State>(openf: unit -> 'State, compute: 'State -> 'T option, closef: 'State -> unit) = + let mutable started = false + let mutable curr = None + let state = ref (Some (openf ())) + let getCurr() : 'T = + check started + match curr with + | None -> alreadyFinished() + | Some x -> x + + let readAndClear () = + lock state (fun () -> + match state.Value with + | None -> None + | Some _ as res -> + state.Value <- None + res) + + let start() = + if not started then + started <- true + + let dispose() = + readAndClear() |> Option.iter closef + + let finish() = + try dispose() + finally curr <- None + + interface IEnumerator<'T> with + member _.Current = getCurr() + + interface IEnumerator with + member _.Current = box (getCurr()) + + [] + member _.MoveNext() = + start() + match state.Value with + | None -> false // we started, then reached the end, then got another MoveNext + | Some s -> + match (try compute s with e -> finish(); reraise()) with + | None -> finish(); false + | Some _ as x -> + curr <- x + true + + member _.Reset() = noReset() + + interface System.IDisposable with + member _.Dispose() = dispose() + + [] + type Singleton<'T>(v:'T) = + let mutable started = false + + interface IEnumerator<'T> with + member _.Current = v + + interface IEnumerator with + member _.Current = box v + + [] + member _.MoveNext() = if started then false else (started <- true; true) + + member _.Reset() = noReset() + + interface System.IDisposable with + member _.Dispose() = () + + let Singleton x = (new Singleton<'T>(x) :> IEnumerator<'T>) + + let EnumerateThenFinally f (e : IEnumerator<'T>) = + { new IEnumerator<'T> with + member _.Current = e.Current + + interface IEnumerator with + member _.Current = (e :> IEnumerator).Current + + [] + member _.MoveNext() = e.MoveNext() + + member _.Reset() = noReset() + + interface System.IDisposable with + member _.Dispose() = + try + e.Dispose() + finally + f() + } + + let inline checkNonNull argName arg = + if isNull arg then + nullArg argName + + let mkSeq f = + { new IEnumerable<'U> with + member _.GetEnumerator() = f() + + interface IEnumerable with + member _.GetEnumerator() = (f() :> IEnumerator) } + +namespace Microsoft.FSharp.Core.CompilerServices + + open System.Diagnostics + open Microsoft.FSharp.Core + open MyCollections + open MyCollections.IEnumerator + open System.Collections + open System.Collections.Generic + + module RuntimeHelpers = + + [] + type internal StructBox<'T when 'T:equality>(value:'T) = + member x.Value = value + + static member Comparer = + let gcomparer = HashIdentity.Structural<'T> + { new IEqualityComparer> with + member _.GetHashCode(v) = gcomparer.GetHashCode(v.Value) + member _.Equals(v1,v2) = gcomparer.Equals(v1.Value,v2.Value) } + + let Generate openf compute closef = + mkSeq (fun () -> new IEnumerator.GeneratedEnumerable<_,_>(openf, compute, closef) :> IEnumerator<'T>) + + let EnumerateFromFunctions create moveNext current = + Generate + create + (fun x -> if moveNext x then Some(current x) else None) + (fun x -> match box(x) with :? System.IDisposable as id -> id.Dispose() | _ -> ()) + + // A family of enumerators that can have additional 'finally' actions added to the enumerator through + // the use of mutation. This is used to 'push' the disposal action for a 'use' into the next enumerator. + // For example, + // seq { use x = ... + // while ... } + // results in the 'while' loop giving an adjustable enumerator. This is then adjusted by adding the disposal action + // from the 'use' into the enumerator. This means that we avoid constructing a two-deep enumerator chain in this + // common case. + type IFinallyEnumerator = + abstract AppendFinallyAction : (unit -> unit) -> unit + + /// A concrete implementation of IEnumerable that adds the given compensation to the "Dispose" chain of any + /// enumerators returned by the enumerable. + [] + type FinallyEnumerable<'T>(compensation: unit -> unit, restf: unit -> seq<'T>) = + interface IEnumerable<'T> with + member _.GetEnumerator() = + try + let ie = restf().GetEnumerator() + match ie with + | :? IFinallyEnumerator as a -> + a.AppendFinallyAction(compensation) + ie + | _ -> + IEnumerator.EnumerateThenFinally compensation ie + with e -> + compensation() + reraise() + interface IEnumerable with + member x.GetEnumerator() = ((x :> IEnumerable<'T>).GetEnumerator() :> IEnumerator) + + /// An optimized object for concatenating a sequence of enumerables + [] + type ConcatEnumerator<'T,'U when 'U :> seq<'T>>(sources: seq<'U>) = + let mutable outerEnum = sources.GetEnumerator() + let mutable currInnerEnum = IEnumerator.Empty() + + let mutable started = false + let mutable finished = false + let mutable compensations = [] + + [] // false = unchecked + val mutable private currElement : 'T + + member _.Finish() = + finished <- true + try + match currInnerEnum with + | null -> () + | _ -> + try + currInnerEnum.Dispose() + finally + currInnerEnum <- null + finally + try + match outerEnum with + | null -> () + | _ -> + try + outerEnum.Dispose() + finally + outerEnum <- null + finally + let rec iter comps = + match comps with + | [] -> () + | h :: t -> + try h() finally iter t + try + compensations |> List.rev |> iter + finally + compensations <- [] + + member x.GetCurrent() = + IEnumerator.check started + if finished then IEnumerator.alreadyFinished() else x.currElement + + interface IFinallyEnumerator with + member _.AppendFinallyAction(f) = + compensations <- f :: compensations + + interface IEnumerator<'T> with + member x.Current = x.GetCurrent() + + interface IEnumerator with + member x.Current = box (x.GetCurrent()) + + [] + member x.MoveNext() = + if not started then started <- true + if finished then false + else + let rec takeInner () = + // check the inner list + if currInnerEnum.MoveNext() then + x.currElement <- currInnerEnum.Current + true + else + // check the outer list + let rec takeOuter() = + if outerEnum.MoveNext() then + let ie = outerEnum.Current + // Optimization to detect the statically-allocated empty IEnumerables + match box ie with + | :? EmptyEnumerable<'T> -> + // This one is empty, just skip, don't call GetEnumerator, try again + takeOuter() + | _ -> + // OK, this one may not be empty. + // Don't forget to dispose of the enumerator for the inner list now we're done with it + currInnerEnum.Dispose() + currInnerEnum <- ie.GetEnumerator() + takeInner () + else + // We're done + x.Finish() + false + takeOuter() + takeInner () + + member _.Reset() = IEnumerator.noReset() + + interface System.IDisposable with + + [] + member x.Dispose() = + if not finished then + x.Finish() + + module doIt = + open System + open Microsoft.FSharp.Core.CompilerServices + open Microsoft.FSharp.Collections + + let x = seq { ArraySegment([|1uy; 2uy; 3uy|]); ArraySegment([|1uy; 2uy; 3uy|]); ArraySegment([|1uy; 2uy; 3uy|]); } + let enumerator = new RuntimeHelpers.ConcatEnumerator<_,_>(x) :> IEnumerator + let rec loop () = + if enumerator.MoveNext() then + printfn $"{enumerator.Current}" + loop () + loop () diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..19521c33bdd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.OptimizeOn.il.debug.bsl @@ -0,0 +1,71 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() 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 "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 + IL_0020: ldc.i4.7 + IL_0021: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..6259c8c71fd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction01.fs.OptimizeOn.il.release.bsl @@ -0,0 +1,85 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "World" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ldc.i4.7 + IL_002f: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..5e66edefaa5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.OptimizeOn.il.debug.bsl @@ -0,0 +1,97 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() 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 "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 + IL_0020: ldc.i4.7 + IL_0021: ret + } + + .method public static void TestFunction2() cil managed + { + + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + IL_0010: 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 + IL_0020: ldc.i4.7 + IL_0021: stloc.0 + IL_0022: ldstr "Hello" + IL_0027: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0031: pop + IL_0032: ldstr "World" + IL_0037: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_003c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0041: pop + IL_0042: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..4acf6ff711a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction02.fs.OptimizeOn.il.release.bsl @@ -0,0 +1,112 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "World" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ldc.i4.7 + IL_002f: ret + } + + .method public static void TestFunction2() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_1) + IL_0000: call int32 assembly::TestFunction1() + IL_0005: stloc.0 + IL_0006: ldstr "Hello" + IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0010: stloc.1 + IL_0011: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0016: ldloc.1 + IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001c: pop + IL_001d: ldstr "World" + IL_0022: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0027: stloc.1 + IL_0028: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_002d: ldloc.1 + IL_002e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0033: pop + IL_0034: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.OptimizeOn.il.debug.bsl similarity index 66% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.OptimizeOn.il.debug.bsl index dd6e6ab1b40..ea7a3bfd97d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.OptimizeOn.il.debug.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -55,10 +45,8 @@ 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: ldc.i4.3 - IL_0021: ldc.i4.4 - IL_0022: add - IL_0023: ret + IL_0020: ldc.i4.7 + IL_0021: ret } .method public static void TestFunction3() cil managed @@ -70,27 +58,35 @@ .try { IL_0000: nop - IL_0001: call int32 assembly::TestFunction1() - IL_0006: stloc.0 - 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 + 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: ldstr "World" + IL_0016: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0020: pop + IL_0021: ldc.i4.7 + IL_0022: stloc.0 + IL_0023: ldstr "Hello" + IL_0028: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0032: pop + IL_0033: leave.s IL_004d } catch [runtime]System.Object { - IL_0019: castclass [runtime]System.Exception - IL_001e: stloc.1 - 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 + IL_0035: castclass [runtime]System.Exception + IL_003a: stloc.1 + IL_003b: ldstr "World" + IL_0040: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0045: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_004a: pop + IL_004b: leave.s IL_004d } - IL_0031: ret + IL_004d: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..d360b2a91eb --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03.fs.OptimizeOn.il.release.bsl @@ -0,0 +1,126 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "World" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ldc.i4.7 + IL_002f: ret + } + + .method public static void TestFunction3() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_1, + class [runtime]System.Exception V_2) + .try + { + IL_0000: nop + IL_0001: call int32 assembly::TestFunction1() + IL_0006: stloc.0 + IL_0007: ldstr "Hello" + IL_000c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0011: stloc.1 + IL_0012: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0017: ldloc.1 + IL_0018: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001d: pop + IL_001e: leave.s IL_003f + + } + catch [runtime]System.Object + { + IL_0020: castclass [runtime]System.Exception + IL_0025: stloc.2 + IL_0026: ldstr "World" + IL_002b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0030: stloc.1 + IL_0031: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0036: ldloc.1 + IL_0037: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_003c: pop + IL_003d: leave.s IL_003f + + } + IL_003f: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..2328fef8d8d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.OptimizeOn.il.debug.bsl @@ -0,0 +1,122 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() 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 "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 + IL_0020: ldc.i4.7 + IL_0021: ret + } + + .method public static void TestFunction3b() cil managed + { + + .maxstack 3 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_2) + .try + { + 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: ldstr "World" + IL_0016: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0020: pop + IL_0021: ldc.i4.7 + IL_0022: stloc.0 + IL_0023: ldstr "hello" + IL_0028: call class [runtime]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_002d: throw + + } + catch [runtime]System.Object + { + IL_002e: castclass [runtime]System.Exception + IL_0033: stloc.1 + IL_0034: ldloc.1 + IL_0035: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_003a: stloc.2 + IL_003b: ldloc.2 + IL_003c: brfalse.s IL_0050 + + IL_003e: ldstr "World" + IL_0043: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0048: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_004d: pop + IL_004e: leave.s IL_005b + + IL_0050: rethrow + IL_0052: ldnull + IL_0053: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0058: pop + IL_0059: leave.s IL_005b + + } + IL_005b: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..0a3ae50e3e0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03b.fs.OptimizeOn.il.release.bsl @@ -0,0 +1,133 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "World" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ldc.i4.7 + IL_002f: ret + } + + .method public static void TestFunction3b() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_3) + .try + { + IL_0000: nop + IL_0001: call int32 assembly::TestFunction1() + IL_0006: stloc.0 + IL_0007: ldstr "hello" + IL_000c: newobj instance void [netstandard]System.Exception::.ctor(string) + IL_0011: throw + + } + catch [runtime]System.Object + { + IL_0012: castclass [runtime]System.Exception + IL_0017: stloc.1 + IL_0018: ldloc.1 + IL_0019: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_001e: stloc.2 + IL_001f: ldloc.2 + IL_0020: brfalse.s IL_003b + + IL_0022: ldstr "World" + IL_0027: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002c: stloc.3 + IL_002d: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0032: ldloc.3 + IL_0033: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0038: pop + IL_0039: leave.s IL_0046 + + IL_003b: rethrow + IL_003d: ldnull + IL_003e: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0043: pop + IL_0044: leave.s IL_0046 + + } + IL_0046: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..76aacaacac4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.OptimizeOn.il.debug.bsl @@ -0,0 +1,138 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() 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 "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 + IL_0020: ldc.i4.7 + IL_0021: ret + } + + .method public static void TestFunction3c() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_2, + string V_3) + .try + { + 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: ldstr "World" + IL_0016: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0020: pop + IL_0021: ldc.i4.7 + IL_0022: stloc.0 + IL_0023: ldstr "hello" + IL_0028: call class [runtime]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_002d: throw + + } + catch [runtime]System.Object + { + IL_002e: castclass [runtime]System.Exception + IL_0033: stloc.1 + IL_0034: ldloc.1 + IL_0035: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_003a: stloc.2 + IL_003b: ldloc.2 + IL_003c: brfalse.s IL_0069 + + IL_003e: ldloc.2 + IL_003f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_0044: ldstr "hello" + IL_0049: call bool [netstandard]System.String::Equals(string, + string) + IL_004e: brfalse.s IL_0069 + + IL_0050: ldloc.2 + IL_0051: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_0056: stloc.3 + IL_0057: ldstr "World" + IL_005c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0061: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0066: pop + IL_0067: leave.s IL_0074 + + IL_0069: rethrow + IL_006b: ldnull + IL_006c: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0071: pop + IL_0072: leave.s IL_0074 + + } + IL_0074: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..ad3903afb89 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.OptimizeOn.il.release.bsl @@ -0,0 +1,144 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "World" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ldc.i4.7 + IL_002f: ret + } + + .method public static void TestFunction3c() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_2, + string V_3, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_4) + .try + { + IL_0000: nop + IL_0001: call int32 assembly::TestFunction1() + IL_0006: stloc.0 + IL_0007: ldstr "hello" + IL_000c: newobj instance void [netstandard]System.Exception::.ctor(string) + IL_0011: throw + + } + catch [runtime]System.Object + { + IL_0012: castclass [runtime]System.Exception + IL_0017: stloc.1 + IL_0018: ldloc.1 + IL_0019: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_001e: stloc.2 + IL_001f: ldloc.2 + IL_0020: brfalse.s IL_0056 + + IL_0022: ldloc.2 + IL_0023: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_0028: ldstr "hello" + IL_002d: call bool [netstandard]System.String::Equals(string, + string) + IL_0032: brfalse.s IL_0056 + + IL_0034: ldloc.2 + IL_0035: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_003a: stloc.3 + IL_003b: ldstr "World" + IL_0040: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0045: stloc.s V_4 + IL_0047: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_004c: ldloc.s V_4 + IL_004e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0053: pop + IL_0054: leave.s IL_0061 + + IL_0056: rethrow + IL_0058: ldnull + IL_0059: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005e: pop + IL_005f: leave.s IL_0061 + + } + IL_0061: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..c70e950c717 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.OptimizeOn.il.debug.bsl @@ -0,0 +1,108 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() 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 "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 + IL_0020: ldc.i4.7 + IL_0021: ret + } + + .method public static void TestFunction4() cil managed + { + + .maxstack 3 + .locals init (int32 V_0) + .try + { + 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: ldstr "World" + IL_0016: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0020: pop + IL_0021: ldc.i4.7 + IL_0022: stloc.0 + IL_0023: ldstr "Hello" + IL_0028: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0032: pop + IL_0033: leave.s IL_0047 + + } + finally + { + IL_0035: nop + IL_0036: ldstr "World" + IL_003b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0040: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0045: pop + IL_0046: endfinally + } + IL_0047: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..96b23abcb9c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction04.fs.OptimizeOn.il.release.bsl @@ -0,0 +1,123 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "World" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ldc.i4.7 + IL_002f: ret + } + + .method public static void TestFunction4() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_1) + .try + { + IL_0000: nop + IL_0001: call int32 assembly::TestFunction1() + IL_0006: stloc.0 + IL_0007: ldstr "Hello" + IL_000c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0011: stloc.1 + IL_0012: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0017: ldloc.1 + IL_0018: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001d: pop + IL_001e: leave.s IL_0039 + + } + finally + { + IL_0020: nop + IL_0021: ldstr "World" + IL_0026: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002b: stloc.1 + IL_002c: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0031: ldloc.1 + IL_0032: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0037: pop + IL_0038: endfinally + } + IL_0039: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..ea934ddc64e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.OptimizeOn.il.debug.bsl @@ -0,0 +1,101 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() 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 "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 + IL_0020: ldc.i4.7 + IL_0021: ret + } + + .method public static int32 TestFunction5() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + int32 V_1) + 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 "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 + IL_0020: ldc.i4.7 + IL_0021: stloc.1 + IL_0022: ldstr "Hello" + IL_0027: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0031: pop + IL_0032: ldloc.1 + IL_0033: ldloc.1 + IL_0034: add + IL_0035: stloc.0 + IL_0036: ldloc.0 + IL_0037: ldloc.0 + IL_0038: add + IL_0039: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..fbe5ab53d7d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction05.fs.OptimizeOn.il.release.bsl @@ -0,0 +1,112 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "World" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ldc.i4.7 + IL_002f: ret + } + + .method public static int32 TestFunction5() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_2) + IL_0000: call int32 assembly::TestFunction1() + IL_0005: stloc.1 + IL_0006: ldstr "Hello" + IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0010: stloc.2 + IL_0011: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0016: ldloc.2 + IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001c: pop + IL_001d: ldloc.1 + IL_001e: ldloc.1 + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ldloc.0 + IL_0023: add + IL_0024: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..05e56e999f0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl @@ -0,0 +1,108 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() 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 "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 + IL_0020: ldc.i4.7 + IL_0021: ret + } + + .method assembly static int32 f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 4 + .locals init (int32 V_0) + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + IL_0010: 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 + IL_0020: ldc.i4.7 + IL_0021: stloc.0 + IL_0022: ldstr "Hello" + IL_0027: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0031: pop + IL_0032: ldloc.0 + IL_0033: ldloc.0 + IL_0034: add + IL_0035: ret + } + + .method public static int32 TestFunction6() cil managed + { + + .maxstack 8 + IL_0000: ldnull + IL_0001: call int32 assembly::f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0006: ldnull + IL_0007: call int32 assembly::f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000c: add + IL_000d: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..e78c657be22 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl @@ -0,0 +1,119 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 TestFunction1() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "World" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ldc.i4.7 + IL_002f: ret + } + + .method assembly static int32 f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_1) + IL_0000: call int32 assembly::TestFunction1() + IL_0005: stloc.0 + IL_0006: ldstr "Hello" + IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0010: stloc.1 + IL_0011: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0016: ldloc.1 + IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001c: pop + IL_001d: ldloc.0 + IL_001e: ldloc.0 + IL_001f: add + IL_0020: ret + } + + .method public static int32 TestFunction6() cil managed + { + + .maxstack 8 + IL_0000: ldnull + IL_0001: call int32 assembly::f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0006: ldnull + IL_0007: call int32 assembly::f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000c: add + IL_000d: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOff.il.bsl similarity index 59% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index bad4d474c98..50b0eb21ac2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction03c.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -5,11 +5,6 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } -.assembly extern netstandard -{ - .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) - .ver 2:1:0:0 -} .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -48,6 +43,52 @@ 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 f@11 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/f@11 @_instance + .method assembly specialname rtspecialname + instance void .ctor() 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: ret + } + + .method public strict virtual instance int32 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 6 + .locals init (int32 V_0) + IL_0000: call int32 assembly::TestFunction1() + IL_0005: stloc.0 + IL_0006: ldstr "Hello" + IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0015: pop + IL_0016: ldloc.0 + IL_0017: ldloc.0 + IL_0018: add + IL_0019: ret + } + + .method private specialname rtspecialname static + void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/f@11::.ctor() + IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance + IL_000a: ret + } + + } + .method public static int32 TestFunction1() cil managed { @@ -66,64 +107,21 @@ IL_0023: ret } - .method public static void TestFunction3c() cil managed + .method public static int32 TestFunction6() cil managed { - .maxstack 4 - .locals init (int32 V_0, - string V_1, - class [runtime]System.Exception V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3, - string V_4, - string V_5) - .try - { - IL_0000: nop - IL_0001: call int32 assembly::TestFunction1() - IL_0006: stloc.0 - IL_0007: ldstr "hello" - IL_000c: stloc.1 - IL_000d: ldloc.1 - IL_000e: call class [runtime]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) - IL_0013: throw - - } - catch [runtime]System.Object - { - IL_0014: castclass [runtime]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 [runtime]System.Exception) - IL_0020: stloc.3 - IL_0021: ldloc.3 - IL_0022: brfalse.s IL_0054 - - IL_0024: ldloc.3 - IL_0025: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() - IL_002a: stloc.s V_4 - IL_002c: ldloc.s V_4 - IL_002e: ldstr "hello" - IL_0033: call bool [netstandard]System.String::Equals(string, - string) - IL_0038: brfalse.s IL_0054 - - 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 - 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 - - 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 - - } - IL_005f: ret + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldsfld class assembly/f@11 assembly/f@11::@_instance + IL_0005: stloc.0 + 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 } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..3aecc9d17a0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl @@ -0,0 +1,139 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested assembly beforefieldinit f@11 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/f@11 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 6 + .locals init (int32 V_0) + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + IL_0010: 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 + IL_0020: ldc.i4.7 + IL_0021: stloc.0 + IL_0022: ldstr "Hello" + IL_0027: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0031: pop + IL_0032: ldloc.0 + IL_0033: ldloc.0 + IL_0034: add + IL_0035: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/f@11::.ctor() + IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance + IL_000a: ret + } + + } + + .method public static int32 TestFunction1() 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 "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 + IL_0020: ldc.i4.7 + IL_0021: ret + } + + .method public static int32 TestFunction6() cil managed + { + + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldsfld class assembly/f@11 assembly/f@11::@_instance + IL_0005: stloc.0 + 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 + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..fa8c139a871 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl @@ -0,0 +1,150 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested assembly beforefieldinit f@11 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/f@11 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 6 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_1) + IL_0000: call int32 assembly::TestFunction1() + IL_0005: stloc.0 + IL_0006: ldstr "Hello" + IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0010: stloc.1 + IL_0011: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0016: ldloc.1 + IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001c: pop + IL_001d: ldloc.0 + IL_001e: ldloc.0 + IL_001f: add + IL_0020: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/f@11::.ctor() + IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance + IL_000a: ret + } + + } + + .method public static int32 TestFunction1() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "World" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ldc.i4.7 + IL_002f: ret + } + + .method public static int32 TestFunction6() cil managed + { + + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldsfld class assembly/f@11 assembly/f@11::@_instance + IL_0005: stloc.0 + 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 + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b.fs.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b.fs.OptimizeOn.il.bsl new file mode 100644 index 00000000000..d1b6847e2fa --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b.fs.OptimizeOn.il.bsl @@ -0,0 +1,206 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2, + int32 V_3) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0007: brfalse IL_015e + + IL_000c: ldarg.0 + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0014: ldc.i4.1 + IL_0015: sub + IL_0016: switch ( + IL_00df) + IL_001f: ldloc.0 + IL_0020: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0025: ldc.i4.3 + IL_0026: sub + IL_0027: switch ( + IL_006f) + IL_0030: ldloc.0 + IL_0031: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003b: brfalse IL_015e + + IL_0040: ldloc.0 + IL_0041: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0046: stloc.1 + IL_0047: ldloc.1 + IL_0048: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0052: brtrue IL_015e + + IL_0057: ldloc.0 + IL_0058: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_005d: ldloc.1 + IL_005e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0063: add + IL_0064: ldc.i4.4 + IL_0065: bne.un IL_015e + + IL_006a: br IL_014a + + IL_006f: ldloc.0 + IL_0070: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0075: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007a: brfalse IL_015e + + IL_007f: ldloc.0 + IL_0080: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0085: stloc.1 + IL_0086: ldloc.1 + IL_0087: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_008c: ldc.i4.4 + IL_008d: sub + IL_008e: switch ( + IL_00cd) + IL_0097: ldloc.1 + IL_0098: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_009d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00a2: brtrue IL_015e + + IL_00a7: ldloc.0 + IL_00a8: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00ad: ldloc.1 + IL_00ae: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00b3: add + IL_00b4: ldc.i4.4 + IL_00b5: bne.un IL_015e + + IL_00ba: ldloc.1 + IL_00bb: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c0: ldloc.0 + IL_00c1: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c6: stloc.3 + IL_00c7: stloc.2 + IL_00c8: br IL_0158 + + IL_00cd: ldloc.1 + IL_00ce: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00d3: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00d8: brtrue IL_015e + + IL_00dd: br.s IL_0144 + + IL_00df: ldloc.0 + IL_00e0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00e5: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00ea: brfalse.s IL_015e + + IL_00ec: ldloc.0 + IL_00ed: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f2: stloc.1 + IL_00f3: ldloc.1 + IL_00f4: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00f9: ldc.i4.2 + IL_00fa: sub + IL_00fb: switch ( + IL_0131) + IL_0104: ldloc.1 + IL_0105: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010f: brtrue.s IL_015e + + IL_0111: ldloc.0 + IL_0112: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0117: ldloc.1 + IL_0118: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_011d: add + IL_011e: ldc.i4.4 + IL_011f: bne.un.s IL_015e + + IL_0121: ldloc.1 + IL_0122: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0127: ldloc.0 + IL_0128: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_012d: stloc.3 + IL_012e: stloc.2 + IL_012f: br.s IL_0158 + + IL_0131: ldloc.1 + IL_0132: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0137: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_013c: brtrue.s IL_015e + + IL_013e: ldstr "three" + IL_0143: ret + + IL_0144: ldstr "seven" + IL_0149: ret + + IL_014a: ldloc.1 + IL_014b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0150: stloc.2 + IL_0151: ldloc.0 + IL_0152: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0157: stloc.3 + IL_0158: ldstr "four" + IL_015d: ret + + IL_015e: ldstr "big" + IL_0163: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b1.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b1.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b1.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b1.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b1.fs.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b1.fs.OptimizeOn.il.bsl new file mode 100644 index 00000000000..d1b6847e2fa --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b1.fs.OptimizeOn.il.bsl @@ -0,0 +1,206 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2, + int32 V_3) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0007: brfalse IL_015e + + IL_000c: ldarg.0 + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0014: ldc.i4.1 + IL_0015: sub + IL_0016: switch ( + IL_00df) + IL_001f: ldloc.0 + IL_0020: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0025: ldc.i4.3 + IL_0026: sub + IL_0027: switch ( + IL_006f) + IL_0030: ldloc.0 + IL_0031: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003b: brfalse IL_015e + + IL_0040: ldloc.0 + IL_0041: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0046: stloc.1 + IL_0047: ldloc.1 + IL_0048: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0052: brtrue IL_015e + + IL_0057: ldloc.0 + IL_0058: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_005d: ldloc.1 + IL_005e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0063: add + IL_0064: ldc.i4.4 + IL_0065: bne.un IL_015e + + IL_006a: br IL_014a + + IL_006f: ldloc.0 + IL_0070: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0075: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007a: brfalse IL_015e + + IL_007f: ldloc.0 + IL_0080: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0085: stloc.1 + IL_0086: ldloc.1 + IL_0087: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_008c: ldc.i4.4 + IL_008d: sub + IL_008e: switch ( + IL_00cd) + IL_0097: ldloc.1 + IL_0098: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_009d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00a2: brtrue IL_015e + + IL_00a7: ldloc.0 + IL_00a8: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00ad: ldloc.1 + IL_00ae: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00b3: add + IL_00b4: ldc.i4.4 + IL_00b5: bne.un IL_015e + + IL_00ba: ldloc.1 + IL_00bb: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c0: ldloc.0 + IL_00c1: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c6: stloc.3 + IL_00c7: stloc.2 + IL_00c8: br IL_0158 + + IL_00cd: ldloc.1 + IL_00ce: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00d3: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00d8: brtrue IL_015e + + IL_00dd: br.s IL_0144 + + IL_00df: ldloc.0 + IL_00e0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00e5: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00ea: brfalse.s IL_015e + + IL_00ec: ldloc.0 + IL_00ed: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f2: stloc.1 + IL_00f3: ldloc.1 + IL_00f4: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00f9: ldc.i4.2 + IL_00fa: sub + IL_00fb: switch ( + IL_0131) + IL_0104: ldloc.1 + IL_0105: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010f: brtrue.s IL_015e + + IL_0111: ldloc.0 + IL_0112: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0117: ldloc.1 + IL_0118: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_011d: add + IL_011e: ldc.i4.4 + IL_011f: bne.un.s IL_015e + + IL_0121: ldloc.1 + IL_0122: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0127: ldloc.0 + IL_0128: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_012d: stloc.3 + IL_012e: stloc.2 + IL_012f: br.s IL_0158 + + IL_0131: ldloc.1 + IL_0132: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0137: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_013c: brtrue.s IL_015e + + IL_013e: ldstr "three" + IL_0143: ret + + IL_0144: ldstr "seven" + IL_0149: ret + + IL_014a: ldloc.1 + IL_014b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0150: stloc.2 + IL_0151: ldloc.0 + IL_0152: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0157: stloc.3 + IL_0158: ldstr "four" + IL_015d: ret + + IL_015e: ldstr "big" + IL_0163: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b2.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b2.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b2.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b2.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b2.fs.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b2.fs.OptimizeOn.il.bsl new file mode 100644 index 00000000000..d1b6847e2fa --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b2.fs.OptimizeOn.il.bsl @@ -0,0 +1,206 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2, + int32 V_3) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0007: brfalse IL_015e + + IL_000c: ldarg.0 + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0014: ldc.i4.1 + IL_0015: sub + IL_0016: switch ( + IL_00df) + IL_001f: ldloc.0 + IL_0020: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0025: ldc.i4.3 + IL_0026: sub + IL_0027: switch ( + IL_006f) + IL_0030: ldloc.0 + IL_0031: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003b: brfalse IL_015e + + IL_0040: ldloc.0 + IL_0041: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0046: stloc.1 + IL_0047: ldloc.1 + IL_0048: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0052: brtrue IL_015e + + IL_0057: ldloc.0 + IL_0058: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_005d: ldloc.1 + IL_005e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0063: add + IL_0064: ldc.i4.4 + IL_0065: bne.un IL_015e + + IL_006a: br IL_014a + + IL_006f: ldloc.0 + IL_0070: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0075: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007a: brfalse IL_015e + + IL_007f: ldloc.0 + IL_0080: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0085: stloc.1 + IL_0086: ldloc.1 + IL_0087: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_008c: ldc.i4.4 + IL_008d: sub + IL_008e: switch ( + IL_00cd) + IL_0097: ldloc.1 + IL_0098: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_009d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00a2: brtrue IL_015e + + IL_00a7: ldloc.0 + IL_00a8: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00ad: ldloc.1 + IL_00ae: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00b3: add + IL_00b4: ldc.i4.4 + IL_00b5: bne.un IL_015e + + IL_00ba: ldloc.1 + IL_00bb: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c0: ldloc.0 + IL_00c1: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c6: stloc.3 + IL_00c7: stloc.2 + IL_00c8: br IL_0158 + + IL_00cd: ldloc.1 + IL_00ce: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00d3: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00d8: brtrue IL_015e + + IL_00dd: br.s IL_0144 + + IL_00df: ldloc.0 + IL_00e0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00e5: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00ea: brfalse.s IL_015e + + IL_00ec: ldloc.0 + IL_00ed: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f2: stloc.1 + IL_00f3: ldloc.1 + IL_00f4: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00f9: ldc.i4.2 + IL_00fa: sub + IL_00fb: switch ( + IL_0131) + IL_0104: ldloc.1 + IL_0105: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010f: brtrue.s IL_015e + + IL_0111: ldloc.0 + IL_0112: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0117: ldloc.1 + IL_0118: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_011d: add + IL_011e: ldc.i4.4 + IL_011f: bne.un.s IL_015e + + IL_0121: ldloc.1 + IL_0122: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0127: ldloc.0 + IL_0128: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_012d: stloc.3 + IL_012e: stloc.2 + IL_012f: br.s IL_0158 + + IL_0131: ldloc.1 + IL_0132: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0137: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_013c: brtrue.s IL_015e + + IL_013e: ldstr "three" + IL_0143: ret + + IL_0144: ldstr "seven" + IL_0149: ret + + IL_014a: ldloc.1 + IL_014b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0150: stloc.2 + IL_0151: ldloc.0 + IL_0152: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0157: stloc.3 + IL_0158: ldstr "four" + IL_015d: ret + + IL_015e: ldstr "big" + IL_0163: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b3.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b3.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b3.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b3.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b3.fs.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b3.fs.OptimizeOn.il.bsl new file mode 100644 index 00000000000..d1b6847e2fa --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b3.fs.OptimizeOn.il.bsl @@ -0,0 +1,206 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2, + int32 V_3) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0007: brfalse IL_015e + + IL_000c: ldarg.0 + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0014: ldc.i4.1 + IL_0015: sub + IL_0016: switch ( + IL_00df) + IL_001f: ldloc.0 + IL_0020: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0025: ldc.i4.3 + IL_0026: sub + IL_0027: switch ( + IL_006f) + IL_0030: ldloc.0 + IL_0031: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003b: brfalse IL_015e + + IL_0040: ldloc.0 + IL_0041: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0046: stloc.1 + IL_0047: ldloc.1 + IL_0048: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0052: brtrue IL_015e + + IL_0057: ldloc.0 + IL_0058: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_005d: ldloc.1 + IL_005e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0063: add + IL_0064: ldc.i4.4 + IL_0065: bne.un IL_015e + + IL_006a: br IL_014a + + IL_006f: ldloc.0 + IL_0070: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0075: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007a: brfalse IL_015e + + IL_007f: ldloc.0 + IL_0080: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0085: stloc.1 + IL_0086: ldloc.1 + IL_0087: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_008c: ldc.i4.4 + IL_008d: sub + IL_008e: switch ( + IL_00cd) + IL_0097: ldloc.1 + IL_0098: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_009d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00a2: brtrue IL_015e + + IL_00a7: ldloc.0 + IL_00a8: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00ad: ldloc.1 + IL_00ae: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00b3: add + IL_00b4: ldc.i4.4 + IL_00b5: bne.un IL_015e + + IL_00ba: ldloc.1 + IL_00bb: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c0: ldloc.0 + IL_00c1: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c6: stloc.3 + IL_00c7: stloc.2 + IL_00c8: br IL_0158 + + IL_00cd: ldloc.1 + IL_00ce: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00d3: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00d8: brtrue IL_015e + + IL_00dd: br.s IL_0144 + + IL_00df: ldloc.0 + IL_00e0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00e5: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00ea: brfalse.s IL_015e + + IL_00ec: ldloc.0 + IL_00ed: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f2: stloc.1 + IL_00f3: ldloc.1 + IL_00f4: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00f9: ldc.i4.2 + IL_00fa: sub + IL_00fb: switch ( + IL_0131) + IL_0104: ldloc.1 + IL_0105: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010f: brtrue.s IL_015e + + IL_0111: ldloc.0 + IL_0112: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0117: ldloc.1 + IL_0118: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_011d: add + IL_011e: ldc.i4.4 + IL_011f: bne.un.s IL_015e + + IL_0121: ldloc.1 + IL_0122: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0127: ldloc.0 + IL_0128: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_012d: stloc.3 + IL_012e: stloc.2 + IL_012f: br.s IL_0158 + + IL_0131: ldloc.1 + IL_0132: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0137: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_013c: brtrue.s IL_015e + + IL_013e: ldstr "three" + IL_0143: ret + + IL_0144: ldstr "seven" + IL_0149: ret + + IL_014a: ldloc.1 + IL_014b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0150: stloc.2 + IL_0151: ldloc.0 + IL_0152: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0157: stloc.3 + IL_0158: ldstr "four" + IL_015d: ret + + IL_015e: ldstr "big" + IL_0163: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..3a71ba2a668 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl @@ -0,0 +1,100 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static !!a Null() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (!!a V_0) + IL_0000: ldloc.0 + IL_0001: ret + } + + .method public specialname static int32 get_x() 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: ldc.i4.5 + IL_0001: ret + } + + .property int32 x() + { + .get int32 assembly::get_x() + } +} + +.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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: nop + IL_0001: nop + IL_0002: ldc.i4.5 + IL_0003: box [runtime]System.Int32 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_001f + + IL_000c: ldstr "Is null" + 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: nop + IL_001d: br.s IL_0021 + + IL_001f: nop + IL_0020: nop + IL_0021: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..eb2cb7152ea --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl @@ -0,0 +1,110 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static !!a Null() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (!!a V_0) + IL_0000: ldloc.0 + IL_0001: ret + } + + .method public specialname static int32 get_x() 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: ldc.i4.5 + IL_0001: ret + } + + .property int32 x() + { + .get int32 assembly::get_x() + } +} + +.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 public static void main@() cil managed + { + .entrypoint + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + IL_0000: nop + IL_0001: nop + IL_0002: ldc.i4.5 + IL_0003: box [runtime]System.Int32 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_0026 + + IL_000c: ldstr "Is null" + IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0016: stloc.0 + IL_0017: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_001c: ldloc.0 + IL_001d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0022: pop + IL_0023: nop + IL_0024: br.s IL_0028 + + IL_0026: nop + IL_0027: nop + IL_0028: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 56d60188bec..8e7e9131047 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..c23d0f0be87 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl @@ -0,0 +1,119 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static !!a Null() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (!!a V_0) + IL_0000: ldloc.0 + IL_0001: ret + } + + .method public specialname static int32 get_x() 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: ldc.i4.5 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: nop + IL_0002: ldc.i4.5 + IL_0003: box [runtime]System.Int32 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_001f + + IL_000c: ldstr "Is null" + 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: nop + IL_001d: br.s IL_0021 + + IL_001f: nop + IL_0020: nop + IL_0021: ret + } + + .property int32 x() + { + .get int32 assembly::get_x() + } +} + +.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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..222c70142b7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl @@ -0,0 +1,129 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static !!a Null() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (!!a V_0) + IL_0000: ldloc.0 + IL_0001: ret + } + + .method public specialname static int32 get_x() 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: ldc.i4.5 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + IL_0000: nop + IL_0001: nop + IL_0002: ldc.i4.5 + IL_0003: box [runtime]System.Int32 + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_0026 + + IL_000c: ldstr "Is null" + IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0016: stloc.0 + IL_0017: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_001c: ldloc.0 + IL_001d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0022: pop + IL_0023: nop + IL_0024: br.s IL_0028 + + IL_0026: nop + IL_0027: nop + IL_0028: ret + } + + .property int32 x() + { + .get int32 assembly::get_x() + } +} + +.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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction10.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction10.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction10.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction10.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction10.fs.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction10.fs.OptimizeOn.il.bsl new file mode 100644 index 00000000000..16b4ee0ef05 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction10.fs.OptimizeOn.il.bsl @@ -0,0 +1,67 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static int32 assembly(int32 x, + int32 y) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldarg.1 + IL_0003: add + IL_0004: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOn.il.bsl new file mode 100644 index 00000000000..d8bdd5101a0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOn.il.bsl @@ -0,0 +1,113 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested assembly beforefieldinit assembly@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/assembly@6 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance int32 Invoke(int32 x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldc.i4.1 + IL_0002: add + IL_0003: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly@6::.ctor() + IL_0005: stsfld class assembly/assembly@6 assembly/assembly@6::@_instance + IL_000a: ret + } + + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly(int32 inp) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldsfld class assembly/assembly@6 assembly/assembly@6::@_instance + IL_0006: ldc.i4.1 + IL_0007: ldc.i4.2 + IL_0008: ldc.i4.3 + 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: tail. + IL_001f: 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_0024: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.netcore.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.netcore.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.debug.bsl new file mode 100644 index 00000000000..6184cdff6e8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.debug.bsl @@ -0,0 +1,681 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto autochar serializable sealed nested public beforefieldinit U + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable + { + .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C + 61 79 28 29 2C 6E 71 7D 00 00 ) + .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 [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 ) + .field assembly initonly int32 item2 + .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 public static class assembly/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 ) + .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: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: ret + } + + .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 36 2B 55 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 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/U::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/U::item2 + IL_0014: ret + } + + .method public hidebysig instance int32 get_Item1() 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: ldfld int32 assembly/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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: ldfld int32 assembly/U::item2 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Tag() 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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: 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 + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0062 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0060 + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 assembly/U::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: cgt + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: clt + IL_002e: sub + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldc.i4.0 + IL_0032: bge.s IL_0036 + + IL_0034: ldloc.2 + IL_0035: ret + + IL_0036: ldloc.2 + IL_0037: ldc.i4.0 + IL_0038: ble.s IL_003c + + IL_003a: ldloc.2 + IL_003b: ret + + IL_003c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0041: stloc.3 + IL_0042: ldloc.0 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.1 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: brfalse.s IL_0067 + + IL_0065: ldc.i4.m1 + IL_0066: ret + + IL_0067: ldc.i4.0 + IL_0068: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/U + IL_0007: callvirt instance int32 assembly/U::CompareTo(class assembly/U) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + class assembly/U V_2, + int32 V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/U + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0062 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/U + IL_0010: brfalse.s IL_0060 + + IL_0012: ldarg.0 + IL_0013: pop + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 assembly/U::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 assembly/U::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: cgt + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: clt + IL_0034: sub + IL_0035: stloc.3 + IL_0036: ldloc.3 + IL_0037: ldc.i4.0 + IL_0038: bge.s IL_003c + + IL_003a: ldloc.3 + IL_003b: ret + + IL_003c: ldloc.3 + IL_003d: ldc.i4.0 + IL_003e: ble.s IL_0042 + + IL_0040: ldloc.3 + IL_0041: ret + + IL_0042: ldloc.1 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: unbox.any assembly/U + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/U::Equals(class assembly/U, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/U::Equals(class assembly/U) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 Tag() + { + .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 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_Item2() + } + } + + .method public static class [runtime]System.Tuple`2 assembly(int32 inp) cil managed + { + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: call class assembly/U assembly/U::NewU(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_000f: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.release.bsl new file mode 100644 index 00000000000..6184cdff6e8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.release.bsl @@ -0,0 +1,681 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto autochar serializable sealed nested public beforefieldinit U + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable + { + .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C + 61 79 28 29 2C 6E 71 7D 00 00 ) + .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 [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 ) + .field assembly initonly int32 item2 + .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 public static class assembly/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 ) + .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: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: ret + } + + .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 36 2B 55 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 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/U::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/U::item2 + IL_0014: ret + } + + .method public hidebysig instance int32 get_Item1() 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: ldfld int32 assembly/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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: ldfld int32 assembly/U::item2 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Tag() 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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: 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 + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0062 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0060 + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 assembly/U::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: cgt + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: clt + IL_002e: sub + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldc.i4.0 + IL_0032: bge.s IL_0036 + + IL_0034: ldloc.2 + IL_0035: ret + + IL_0036: ldloc.2 + IL_0037: ldc.i4.0 + IL_0038: ble.s IL_003c + + IL_003a: ldloc.2 + IL_003b: ret + + IL_003c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0041: stloc.3 + IL_0042: ldloc.0 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.1 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: brfalse.s IL_0067 + + IL_0065: ldc.i4.m1 + IL_0066: ret + + IL_0067: ldc.i4.0 + IL_0068: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/U + IL_0007: callvirt instance int32 assembly/U::CompareTo(class assembly/U) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + class assembly/U V_2, + int32 V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/U + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0062 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/U + IL_0010: brfalse.s IL_0060 + + IL_0012: ldarg.0 + IL_0013: pop + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 assembly/U::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 assembly/U::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: cgt + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: clt + IL_0034: sub + IL_0035: stloc.3 + IL_0036: ldloc.3 + IL_0037: ldc.i4.0 + IL_0038: bge.s IL_003c + + IL_003a: ldloc.3 + IL_003b: ret + + IL_003c: ldloc.3 + IL_003d: ldc.i4.0 + IL_003e: ble.s IL_0042 + + IL_0040: ldloc.3 + IL_0041: ret + + IL_0042: ldloc.1 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: unbox.any assembly/U + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/U::Equals(class assembly/U, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/U::Equals(class assembly/U) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 Tag() + { + .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 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_Item2() + } + } + + .method public static class [runtime]System.Tuple`2 assembly(int32 inp) cil managed + { + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: call class assembly/U assembly/U::NewU(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_000f: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.debug.bsl new file mode 100644 index 00000000000..947e3ebf7aa --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.debug.bsl @@ -0,0 +1,591 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto autochar serializable sealed nested public beforefieldinit U + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable + { + .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C + 61 79 28 29 2C 6E 71 7D 00 00 ) + .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 [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 ) + .field assembly initonly int32 item2 + .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 public static class assembly/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 ) + .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: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: ret + } + + .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 36 2B 55 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 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/U::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/U::item2 + IL_0014: ret + } + + .method public hidebysig instance int32 get_Item1() 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: ldfld int32 assembly/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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: ldfld int32 assembly/U::item2 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Tag() 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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: 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 + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0062 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0060 + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 assembly/U::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: cgt + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: clt + IL_002e: sub + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldc.i4.0 + IL_0032: bge.s IL_0036 + + IL_0034: ldloc.2 + IL_0035: ret + + IL_0036: ldloc.2 + IL_0037: ldc.i4.0 + IL_0038: ble.s IL_003c + + IL_003a: ldloc.2 + IL_003b: ret + + IL_003c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0041: stloc.3 + IL_0042: ldloc.0 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.1 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: brfalse.s IL_0067 + + IL_0065: ldc.i4.m1 + IL_0066: ret + + IL_0067: ldc.i4.0 + IL_0068: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/U + IL_0007: callvirt instance int32 assembly/U::CompareTo(class assembly/U) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + class assembly/U V_2, + int32 V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/U + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0062 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/U + IL_0010: brfalse.s IL_0060 + + IL_0012: ldarg.0 + IL_0013: pop + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 assembly/U::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 assembly/U::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: cgt + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: clt + IL_0034: sub + IL_0035: stloc.3 + IL_0036: ldloc.3 + IL_0037: ldc.i4.0 + IL_0038: bge.s IL_003c + + IL_003a: ldloc.3 + IL_003b: ret + + IL_003c: ldloc.3 + IL_003d: ldc.i4.0 + IL_003e: ble.s IL_0042 + + IL_0040: ldloc.3 + IL_0041: ret + + IL_0042: ldloc.1 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: unbox.any assembly/U + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/U::Equals(class assembly/U, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/U::Equals(class assembly/U) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 Tag() + { + .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 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_Item2() + } + } + + .method public static class [runtime]System.Tuple`2 assembly(int32 inp) cil managed + { + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: call class assembly/U assembly/U::NewU(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_000f: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.release.bsl new file mode 100644 index 00000000000..947e3ebf7aa --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.release.bsl @@ -0,0 +1,591 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto autochar serializable sealed nested public beforefieldinit U + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable + { + .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C + 61 79 28 29 2C 6E 71 7D 00 00 ) + .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 [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 ) + .field assembly initonly int32 item2 + .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 public static class assembly/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 ) + .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: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: ret + } + + .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 36 2B 55 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 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/U::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/U::item2 + IL_0014: ret + } + + .method public hidebysig instance int32 get_Item1() 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: ldfld int32 assembly/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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: ldfld int32 assembly/U::item2 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Tag() 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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: 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 + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0062 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0060 + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 assembly/U::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: cgt + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: clt + IL_002e: sub + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldc.i4.0 + IL_0032: bge.s IL_0036 + + IL_0034: ldloc.2 + IL_0035: ret + + IL_0036: ldloc.2 + IL_0037: ldc.i4.0 + IL_0038: ble.s IL_003c + + IL_003a: ldloc.2 + IL_003b: ret + + IL_003c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0041: stloc.3 + IL_0042: ldloc.0 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.1 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: brfalse.s IL_0067 + + IL_0065: ldc.i4.m1 + IL_0066: ret + + IL_0067: ldc.i4.0 + IL_0068: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/U + IL_0007: callvirt instance int32 assembly/U::CompareTo(class assembly/U) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + class assembly/U V_2, + int32 V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/U + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0062 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/U + IL_0010: brfalse.s IL_0060 + + IL_0012: ldarg.0 + IL_0013: pop + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 assembly/U::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 assembly/U::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: cgt + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: clt + IL_0034: sub + IL_0035: stloc.3 + IL_0036: ldloc.3 + IL_0037: ldc.i4.0 + IL_0038: bge.s IL_003c + + IL_003a: ldloc.3 + IL_003b: ret + + IL_003c: ldloc.3 + IL_003d: ldc.i4.0 + IL_003e: ble.s IL_0042 + + IL_0040: ldloc.3 + IL_0041: ret + + IL_0042: ldloc.1 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: unbox.any assembly/U + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/U::Equals(class assembly/U, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/U::Equals(class assembly/U) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 Tag() + { + .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 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_Item2() + } + } + + .method public static class [runtime]System.Tuple`2 assembly(int32 inp) cil managed + { + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: call class assembly/U assembly/U::NewU(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_000f: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.net472.debug.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.net472.debug.bsl index 7ac3e544a40..dc1f44b8100 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.net472.debug.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -80,9 +70,7 @@ IL_0006: ret } - .method public specialname rtspecialname - instance void .ctor(int32 x, - int32 y) cil managed + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 @@ -221,9 +209,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -401,9 +387,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(class assembly/R obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/R obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -469,9 +453,7 @@ IL_004a: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -634,9 +616,7 @@ .field private class [runtime]System.Type Type@ .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) cil managed + .method public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.netcore.debug.bsl similarity index 95% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.netcore.debug.bsl index a65cea31c60..5d852fc64f3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.netcore.debug.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -80,9 +70,7 @@ IL_0006: ret } - .method public specialname rtspecialname - instance void .ctor(int32 x, - int32 y) cil managed + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 @@ -221,9 +209,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -401,9 +387,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(class assembly/R obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/R obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -469,9 +453,7 @@ IL_004a: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.netcore.release.bsl similarity index 95% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.netcore.release.bsl index f73cfafb59f..73ec84dc342 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.netcore.release.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -80,9 +70,7 @@ IL_0006: ret } - .method public specialname rtspecialname - instance void .ctor(int32 x, - int32 y) cil managed + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 @@ -203,9 +191,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -353,9 +339,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(class assembly/R obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/R obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -403,9 +387,7 @@ IL_0036: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.net472.bsl new file mode 100644 index 00000000000..4f3b183612d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.net472.bsl @@ -0,0 +1,582 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public R + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 assembly int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/R::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/R::y@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 37 2B 52 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/R obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/R::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/R::y@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/R::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/R + IL_0007: callvirt instance int32 assembly/R::CompareTo(class assembly/R) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/R V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/R + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/R + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/R::x@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/R::x@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/R::y@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/R::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/R + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/R::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/R::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/R obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/R::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/R::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/R::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/R V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/R + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/R::Equals(class assembly/R, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/R obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/R::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/R::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/R::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/R V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/R + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/R::Equals(class assembly/R) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/R::get_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 assembly/R::get_y() + } + } + + .method public static class [runtime]System.Tuple`2 assembly(int32 inp) cil managed + { + + .maxstack 4 + .locals init (class assembly/R V_0) + IL_0000: ldc.i4.3 + IL_0001: ldarg.0 + IL_0002: newobj instance void assembly/R::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_000f: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.netcore.bsl new file mode 100644 index 00000000000..2187485370e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.netcore.bsl @@ -0,0 +1,492 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public R + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 assembly int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/R::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/R::y@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 37 2B 52 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/R obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/R::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/R::y@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/R::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/R + IL_0007: callvirt instance int32 assembly/R::CompareTo(class assembly/R) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/R V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/R + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/R + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/R::x@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/R::x@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/R::y@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/R::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/R + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/R::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/R::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/R obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/R::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/R::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/R::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/R V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/R + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/R::Equals(class assembly/R, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/R obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/R::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/R::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/R::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/R V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/R + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/R::Equals(class assembly/R) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/R::get_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 assembly/R::get_y() + } + } + + .method public static class [runtime]System.Tuple`2 assembly(int32 inp) cil managed + { + + .maxstack 4 + .locals init (class assembly/R V_0) + IL_0000: ldc.i4.3 + IL_0001: ldarg.0 + IL_0002: newobj instance void assembly/R::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_000f: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction18.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction18.fs.il.netcore.bsl index 5ae41fb6039..9905ef38bb1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction18.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction18.fs.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..e8747679fec --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.debug.bsl @@ -0,0 +1,211 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld int32 assembly/C::x + IL_000f: ldarg.0 + IL_0010: ldarg.2 + IL_0011: stfld int32 assembly/C::y + IL_0016: ret + } + + .method public hidebysig specialname instance int32 get_X() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/C::x + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_Y() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/C::y + IL_0006: ret + } + + .property instance int32 X() + { + .get instance int32 assembly/C::get_X() + } + .property instance int32 Y() + { + .get instance int32 assembly/C::get_Y() + } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@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 [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.Core.FSharpFunc`2 clo2) 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.Core.FSharpFunc`2 assembly/'assembly@11-1'::clo2 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class assembly/C arg20) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'assembly@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 + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit assembly@11 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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.Core.FSharpFunc`2> clo1) 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.Core.FSharpFunc`2> assembly/assembly@11::clo1 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class assembly/C arg10) cil managed + { + + .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> assembly/assembly@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 assembly/'assembly@11-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } + + } + + .method public static void assembly(int32 inp) cil managed + { + + .maxstack 5 + .locals init (class assembly/C V_0, + class assembly/C V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: newobj instance void assembly/C::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: ldarg.0 + IL_000a: newobj instance void assembly/C::.ctor(int32, + int32) + IL_000f: stloc.1 + IL_0010: ldstr "c1 = %A, c2 = %A" + IL_0015: 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,class [runtime]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 assembly/assembly@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 + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..7d58e14e9df --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.release.bsl @@ -0,0 +1,221 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld int32 assembly/C::x + IL_000f: ldarg.0 + IL_0010: ldarg.2 + IL_0011: stfld int32 assembly/C::y + IL_0016: ret + } + + .method public hidebysig specialname instance int32 get_X() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/C::x + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_Y() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/C::y + IL_0006: ret + } + + .property instance int32 X() + { + .get instance int32 assembly/C::get_X() + } + .property instance int32 Y() + { + .get instance int32 assembly/C::get_Y() + } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@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 [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.Core.FSharpFunc`2 clo2) 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.Core.FSharpFunc`2 assembly/'assembly@11-1'::clo2 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class assembly/C arg20) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'assembly@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 + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit assembly@11 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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.Core.FSharpFunc`2> clo1) 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.Core.FSharpFunc`2> assembly/assembly@11::clo1 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class assembly/C arg10) cil managed + { + + .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> assembly/assembly@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 assembly/'assembly@11-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } + + } + + .method public static void assembly(int32 inp) cil managed + { + + .maxstack 5 + .locals init (class assembly/C V_0, + class assembly/C V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_3) + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: newobj instance void assembly/C::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: ldarg.0 + IL_000a: newobj instance void assembly/C::.ctor(int32, + int32) + IL_000f: stloc.1 + IL_0010: ldstr "c1 = %A, c2 = %A" + IL_0015: 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,class [runtime]System.Tuple`2>::.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 [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: newobj instance void assembly/assembly@11::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_002d: ldloc.0 + IL_002e: ldloc.1 + IL_002f: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !0, + !1) + IL_0034: pop + IL_0035: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOff.il.bsl similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOff.il.bsl index f926ac566bb..3450ee5d002 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOff.il.bsl @@ -1,256 +1,256 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 auto ansi serializable nested public D - extends [runtime]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 - { - - .maxstack 4 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldarg.0 - IL_0001: callvirt instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: stfld int32 assembly/D::x - IL_000f: ldarg.0 - IL_0010: ldarg.2 - IL_0011: stfld int32 assembly/D::y - IL_0016: ldarg.0 - IL_0017: ldfld int32 assembly/D::x - IL_001c: ldarg.0 - IL_001d: ldfld int32 assembly/D::y - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldarg.0 - IL_0025: ldloc.0 - IL_0026: callvirt instance int32 assembly/D::f(int32) - IL_002b: ldloc.0 - IL_002c: add - IL_002d: stloc.1 - IL_002e: ret - } - - .method public hidebysig specialname - instance int32 get_X() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/D::x - IL_0006: ret - } - - .method public hidebysig specialname - instance int32 get_Y() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/D::y - IL_0006: ret - } - - .method assembly hidebysig instance int32 - f(int32 a) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/D::x - IL_0006: ldarg.1 - IL_0007: add - IL_0008: ret - } - - .property instance int32 X() - { - .get instance int32 assembly/D::get_X() - } - .property instance int32 Y() - { - .get instance int32 assembly/D::get_Y() - } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@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 [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.Core.FSharpFunc`2 clo2) 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.Core.FSharpFunc`2 assembly/'assembly@14-1'::clo2 - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit - Invoke(class assembly/D arg20) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'assembly@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 - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit assembly@14 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 - .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.Core.FSharpFunc`2> clo1) 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.Core.FSharpFunc`2> assembly/assembly@14::clo1 - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - Invoke(class assembly/D arg10) cil managed - { - - .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> assembly/assembly@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 assembly/'assembly@14-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0013: ret - } - - } - - .method public static void assembly(int32 inp) cil managed - { - - .maxstack 5 - .locals init (class assembly/D V_0, - class assembly/D V_1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) - IL_0000: ldarg.0 - IL_0001: ldarg.0 - IL_0002: newobj instance void assembly/D::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: ldarg.0 - IL_000a: newobj instance void assembly/D::.ctor(int32, - int32) - IL_000f: stloc.1 - IL_0010: ldstr "d1 = %A, d2 = %A" - IL_0015: 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,class [runtime]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 assembly/assembly@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 - } - -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: ret - } - -} - - - - - - + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public D + extends [runtime]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 + { + + .maxstack 4 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld int32 assembly/D::x + IL_000f: ldarg.0 + IL_0010: ldarg.2 + IL_0011: stfld int32 assembly/D::y + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/D::x + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/D::y + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldarg.0 + IL_0025: ldloc.0 + IL_0026: callvirt instance int32 assembly/D::f(int32) + IL_002b: ldloc.0 + IL_002c: add + IL_002d: stloc.1 + IL_002e: ret + } + + .method public hidebysig specialname + instance int32 get_X() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/D::x + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_Y() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/D::y + IL_0006: ret + } + + .method assembly hidebysig instance int32 + f(int32 a) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/D::x + IL_0006: ldarg.1 + IL_0007: add + IL_0008: ret + } + + .property instance int32 X() + { + .get instance int32 assembly/D::get_X() + } + .property instance int32 Y() + { + .get instance int32 assembly/D::get_Y() + } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@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 [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.Core.FSharpFunc`2 clo2) 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.Core.FSharpFunc`2 assembly/'assembly@14-1'::clo2 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit + Invoke(class assembly/D arg20) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'assembly@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 + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit assembly@14 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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.Core.FSharpFunc`2> clo1) 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.Core.FSharpFunc`2> assembly/assembly@14::clo1 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + Invoke(class assembly/D arg10) cil managed + { + + .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> assembly/assembly@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 assembly/'assembly@14-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } + + } + + .method public static void assembly(int32 inp) cil managed + { + + .maxstack 5 + .locals init (class assembly/D V_0, + class assembly/D V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: newobj instance void assembly/D::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: ldarg.0 + IL_000a: newobj instance void assembly/D::.ctor(int32, + int32) + IL_000f: stloc.1 + IL_0010: ldstr "d1 = %A, d2 = %A" + IL_0015: 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,class [runtime]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 assembly/assembly@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 + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.debug.bsl new file mode 100644 index 00000000000..8561b29ba42 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.debug.bsl @@ -0,0 +1,237 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public D + extends [runtime]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 + { + + .maxstack 4 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld int32 assembly/D::x + IL_000f: ldarg.0 + IL_0010: ldarg.2 + IL_0011: stfld int32 assembly/D::y + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/D::x + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/D::y + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldarg.0 + IL_0025: ldloc.0 + IL_0026: callvirt instance int32 assembly/D::f(int32) + IL_002b: ldloc.0 + IL_002c: add + IL_002d: stloc.1 + IL_002e: ret + } + + .method public hidebysig specialname instance int32 get_X() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/D::x + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_Y() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/D::y + IL_0006: ret + } + + .method assembly hidebysig instance int32 f(int32 a) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/D::x + IL_0006: ldarg.1 + IL_0007: add + IL_0008: ret + } + + .property instance int32 X() + { + .get instance int32 assembly/D::get_X() + } + .property instance int32 Y() + { + .get instance int32 assembly/D::get_Y() + } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@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 [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.Core.FSharpFunc`2 clo2) 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.Core.FSharpFunc`2 assembly/'assembly@14-1'::clo2 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class assembly/D arg20) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'assembly@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 + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit assembly@14 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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.Core.FSharpFunc`2> clo1) 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.Core.FSharpFunc`2> assembly/assembly@14::clo1 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class assembly/D arg10) cil managed + { + + .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> assembly/assembly@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 assembly/'assembly@14-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } + + } + + .method public static void assembly(int32 inp) cil managed + { + + .maxstack 5 + .locals init (class assembly/D V_0, + class assembly/D V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: newobj instance void assembly/D::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: ldarg.0 + IL_000a: newobj instance void assembly/D::.ctor(int32, + int32) + IL_000f: stloc.1 + IL_0010: ldstr "d1 = %A, d2 = %A" + IL_0015: 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,class [runtime]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 assembly/assembly@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 + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..fd47d9be0a3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.release.bsl @@ -0,0 +1,247 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public D + extends [runtime]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 + { + + .maxstack 4 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld int32 assembly/D::x + IL_000f: ldarg.0 + IL_0010: ldarg.2 + IL_0011: stfld int32 assembly/D::y + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/D::x + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/D::y + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldarg.0 + IL_0025: ldloc.0 + IL_0026: callvirt instance int32 assembly/D::f(int32) + IL_002b: ldloc.0 + IL_002c: add + IL_002d: stloc.1 + IL_002e: ret + } + + .method public hidebysig specialname instance int32 get_X() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/D::x + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_Y() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/D::y + IL_0006: ret + } + + .method assembly hidebysig instance int32 f(int32 a) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/D::x + IL_0006: ldarg.1 + IL_0007: add + IL_0008: ret + } + + .property instance int32 X() + { + .get instance int32 assembly/D::get_X() + } + .property instance int32 Y() + { + .get instance int32 assembly/D::get_Y() + } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@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 [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.Core.FSharpFunc`2 clo2) 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.Core.FSharpFunc`2 assembly/'assembly@14-1'::clo2 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class assembly/D arg20) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'assembly@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 + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit assembly@14 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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.Core.FSharpFunc`2> clo1) 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.Core.FSharpFunc`2> assembly/assembly@14::clo1 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class assembly/D arg10) cil managed + { + + .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> assembly/assembly@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 assembly/'assembly@14-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } + + } + + .method public static void assembly(int32 inp) cil managed + { + + .maxstack 5 + .locals init (class assembly/D V_0, + class assembly/D V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_3) + IL_0000: ldarg.0 + IL_0001: ldarg.0 + IL_0002: newobj instance void assembly/D::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: ldarg.0 + IL_000a: newobj instance void assembly/D::.ctor(int32, + int32) + IL_000f: stloc.1 + IL_0010: ldstr "d1 = %A, d2 = %A" + IL_0015: 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,class [runtime]System.Tuple`2>::.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 [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: newobj instance void assembly/assembly@14::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_002d: ldloc.0 + IL_002e: ldloc.1 + IL_002f: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !0, + !1) + IL_0034: pop + IL_0035: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.netcore.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.netcore.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.debug.bsl new file mode 100644 index 00000000000..64d7879c1b7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.debug.bsl @@ -0,0 +1,765 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto autochar serializable sealed nested public beforefieldinit U + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable + { + .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C + 61 79 28 29 2C 6E 71 7D 00 00 ) + .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 [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 ) + .field assembly initonly int32 item2 + .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 public static class assembly/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 ) + .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: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: ret + } + + .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 31 2B 55 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 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/U::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/U::item2 + IL_0014: ret + } + + .method public hidebysig instance int32 get_Item1() 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: ldfld int32 assembly/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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: ldfld int32 assembly/U::item2 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Tag() 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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: 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 + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0062 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0060 + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 assembly/U::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: cgt + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: clt + IL_002e: sub + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldc.i4.0 + IL_0032: bge.s IL_0036 + + IL_0034: ldloc.2 + IL_0035: ret + + IL_0036: ldloc.2 + IL_0037: ldc.i4.0 + IL_0038: ble.s IL_003c + + IL_003a: ldloc.2 + IL_003b: ret + + IL_003c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0041: stloc.3 + IL_0042: ldloc.0 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.1 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: brfalse.s IL_0067 + + IL_0065: ldc.i4.m1 + IL_0066: ret + + IL_0067: ldc.i4.0 + IL_0068: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/U + IL_0007: callvirt instance int32 assembly/U::CompareTo(class assembly/U) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + class assembly/U V_2, + int32 V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/U + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0062 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/U + IL_0010: brfalse.s IL_0060 + + IL_0012: ldarg.0 + IL_0013: pop + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 assembly/U::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 assembly/U::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: cgt + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: clt + IL_0034: sub + IL_0035: stloc.3 + IL_0036: ldloc.3 + IL_0037: ldc.i4.0 + IL_0038: bge.s IL_003c + + IL_003a: ldloc.3 + IL_003b: ret + + IL_003c: ldloc.3 + IL_003d: ldc.i4.0 + IL_003e: ble.s IL_0042 + + IL_0040: ldloc.3 + IL_0041: ret + + IL_0042: ldloc.1 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: unbox.any assembly/U + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/U::Equals(class assembly/U, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/U::Equals(class assembly/U) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 Tag() + { + .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 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_Item2() + } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@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 [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.Core.FSharpFunc`2 clo2) 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.Core.FSharpFunc`2 assembly/'assembly@7-1'::clo2 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(int32 arg20) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'assembly@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 + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit assembly@7 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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.Core.FSharpFunc`2> clo1) 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.Core.FSharpFunc`2> assembly/assembly@7::clo1 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(int32 arg10) cil managed + { + + .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> assembly/assembly@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 assembly/'assembly@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } + + } + + .method public static void assembly(class assembly/U _arg1) cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/U::item2 + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/U::item1 + IL_000d: stloc.1 + IL_000e: ldstr "a = %A, a = %A" + IL_0013: 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,class [runtime]System.Tuple`2>::.ctor(string) + IL_0018: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001d: stloc.2 + IL_001e: ldloc.2 + IL_001f: newobj instance void assembly/assembly@7::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0024: ldloc.1 + IL_0025: ldloc.0 + IL_0026: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !0, + !1) + IL_002b: pop + IL_002c: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.release.bsl new file mode 100644 index 00000000000..bc06902d8e3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.release.bsl @@ -0,0 +1,775 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 auto autochar serializable sealed nested public beforefieldinit U + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable + { + .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C + 61 79 28 29 2C 6E 71 7D 00 00 ) + .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 [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 ) + .field assembly initonly int32 item2 + .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 public static class assembly/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 ) + .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: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: ret + } + + .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 31 2B 55 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 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/U::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/U::item2 + IL_0014: ret + } + + .method public hidebysig instance int32 get_Item1() 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: ldfld int32 assembly/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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: ldfld int32 assembly/U::item2 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Tag() 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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: 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 + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0062 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0060 + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 assembly/U::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: cgt + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: clt + IL_002e: sub + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldc.i4.0 + IL_0032: bge.s IL_0036 + + IL_0034: ldloc.2 + IL_0035: ret + + IL_0036: ldloc.2 + IL_0037: ldc.i4.0 + IL_0038: ble.s IL_003c + + IL_003a: ldloc.2 + IL_003b: ret + + IL_003c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0041: stloc.3 + IL_0042: ldloc.0 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.1 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: brfalse.s IL_0067 + + IL_0065: ldc.i4.m1 + IL_0066: ret + + IL_0067: ldc.i4.0 + IL_0068: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/U + IL_0007: callvirt instance int32 assembly/U::CompareTo(class assembly/U) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + class assembly/U V_2, + int32 V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/U + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0062 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/U + IL_0010: brfalse.s IL_0060 + + IL_0012: ldarg.0 + IL_0013: pop + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 assembly/U::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 assembly/U::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: cgt + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: clt + IL_0034: sub + IL_0035: stloc.3 + IL_0036: ldloc.3 + IL_0037: ldc.i4.0 + IL_0038: bge.s IL_003c + + IL_003a: ldloc.3 + IL_003b: ret + + IL_003c: ldloc.3 + IL_003d: ldc.i4.0 + IL_003e: ble.s IL_0042 + + IL_0040: ldloc.3 + IL_0041: ret + + IL_0042: ldloc.1 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: unbox.any assembly/U + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/U::Equals(class assembly/U, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/U::Equals(class assembly/U) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 Tag() + { + .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 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_Item2() + } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@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 [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.Core.FSharpFunc`2 clo2) 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.Core.FSharpFunc`2 assembly/'assembly@7-1'::clo2 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(int32 arg20) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'assembly@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 + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit assembly@7 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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.Core.FSharpFunc`2> clo1) 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.Core.FSharpFunc`2> assembly/assembly@7::clo1 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(int32 arg10) cil managed + { + + .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> assembly/assembly@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 assembly/'assembly@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } + + } + + .method public static void assembly(class assembly/U _arg1) cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_3) + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/U::item2 + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/U::item1 + IL_000d: stloc.1 + IL_000e: ldstr "a = %A, a = %A" + IL_0013: 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,class [runtime]System.Tuple`2>::.ctor(string) + IL_0018: stloc.3 + IL_0019: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_001e: ldloc.3 + IL_001f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>>(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0024: stloc.2 + IL_0025: ldloc.2 + IL_0026: newobj instance void assembly/assembly@7::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_002b: ldloc.1 + IL_002c: ldloc.0 + IL_002d: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !0, + !1) + IL_0032: pop + IL_0033: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.debug.bsl new file mode 100644 index 00000000000..bf1d7ea6bf5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.debug.bsl @@ -0,0 +1,675 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto autochar serializable sealed nested public beforefieldinit U + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable + { + .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C + 61 79 28 29 2C 6E 71 7D 00 00 ) + .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 [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 ) + .field assembly initonly int32 item2 + .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 public static class assembly/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 ) + .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: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: ret + } + + .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 31 2B 55 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 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/U::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/U::item2 + IL_0014: ret + } + + .method public hidebysig instance int32 get_Item1() 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: ldfld int32 assembly/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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: ldfld int32 assembly/U::item2 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Tag() 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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: 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 + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0062 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0060 + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 assembly/U::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: cgt + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: clt + IL_002e: sub + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldc.i4.0 + IL_0032: bge.s IL_0036 + + IL_0034: ldloc.2 + IL_0035: ret + + IL_0036: ldloc.2 + IL_0037: ldc.i4.0 + IL_0038: ble.s IL_003c + + IL_003a: ldloc.2 + IL_003b: ret + + IL_003c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0041: stloc.3 + IL_0042: ldloc.0 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.1 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: brfalse.s IL_0067 + + IL_0065: ldc.i4.m1 + IL_0066: ret + + IL_0067: ldc.i4.0 + IL_0068: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/U + IL_0007: callvirt instance int32 assembly/U::CompareTo(class assembly/U) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + class assembly/U V_2, + int32 V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/U + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0062 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/U + IL_0010: brfalse.s IL_0060 + + IL_0012: ldarg.0 + IL_0013: pop + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 assembly/U::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 assembly/U::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: cgt + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: clt + IL_0034: sub + IL_0035: stloc.3 + IL_0036: ldloc.3 + IL_0037: ldc.i4.0 + IL_0038: bge.s IL_003c + + IL_003a: ldloc.3 + IL_003b: ret + + IL_003c: ldloc.3 + IL_003d: ldc.i4.0 + IL_003e: ble.s IL_0042 + + IL_0040: ldloc.3 + IL_0041: ret + + IL_0042: ldloc.1 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: unbox.any assembly/U + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/U::Equals(class assembly/U, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/U::Equals(class assembly/U) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 Tag() + { + .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 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_Item2() + } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@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 [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.Core.FSharpFunc`2 clo2) 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.Core.FSharpFunc`2 assembly/'assembly@7-1'::clo2 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(int32 arg20) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'assembly@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 + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit assembly@7 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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.Core.FSharpFunc`2> clo1) 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.Core.FSharpFunc`2> assembly/assembly@7::clo1 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(int32 arg10) cil managed + { + + .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> assembly/assembly@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 assembly/'assembly@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } + + } + + .method public static void assembly(class assembly/U _arg1) cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/U::item2 + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/U::item1 + IL_000d: stloc.1 + IL_000e: ldstr "a = %A, a = %A" + IL_0013: 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,class [runtime]System.Tuple`2>::.ctor(string) + IL_0018: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001d: stloc.2 + IL_001e: ldloc.2 + IL_001f: newobj instance void assembly/assembly@7::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0024: ldloc.1 + IL_0025: ldloc.0 + IL_0026: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !0, + !1) + IL_002b: pop + IL_002c: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.release.bsl new file mode 100644 index 00000000000..3a3fec8a284 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.release.bsl @@ -0,0 +1,685 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 auto autochar serializable sealed nested public beforefieldinit U + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable + { + .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C + 61 79 28 29 2C 6E 71 7D 00 00 ) + .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 [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 ) + .field assembly initonly int32 item2 + .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 public static class assembly/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 ) + .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: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: ret + } + + .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 31 2B 55 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 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/U::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/U::item2 + IL_0014: ret + } + + .method public hidebysig instance int32 get_Item1() 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: ldfld int32 assembly/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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: ldfld int32 assembly/U::item2 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Tag() 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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: 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 + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0062 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0060 + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 assembly/U::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: cgt + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: clt + IL_002e: sub + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldc.i4.0 + IL_0032: bge.s IL_0036 + + IL_0034: ldloc.2 + IL_0035: ret + + IL_0036: ldloc.2 + IL_0037: ldc.i4.0 + IL_0038: ble.s IL_003c + + IL_003a: ldloc.2 + IL_003b: ret + + IL_003c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0041: stloc.3 + IL_0042: ldloc.0 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.1 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: brfalse.s IL_0067 + + IL_0065: ldc.i4.m1 + IL_0066: ret + + IL_0067: ldc.i4.0 + IL_0068: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/U + IL_0007: callvirt instance int32 assembly/U::CompareTo(class assembly/U) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0, + class assembly/U V_1, + class assembly/U V_2, + int32 V_3, + int32 V_4, + int32 V_5) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/U + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0062 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/U + IL_0010: brfalse.s IL_0060 + + IL_0012: ldarg.0 + IL_0013: pop + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 assembly/U::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 assembly/U::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: cgt + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: clt + IL_0034: sub + IL_0035: stloc.3 + IL_0036: ldloc.3 + IL_0037: ldc.i4.0 + IL_0038: bge.s IL_003c + + IL_003a: ldloc.3 + IL_003b: ret + + IL_003c: ldloc.3 + IL_003d: ldc.i4.0 + IL_003e: ble.s IL_0042 + + IL_0040: ldloc.3 + IL_0041: ret + + IL_0042: ldloc.1 + IL_0043: ldfld int32 assembly/U::item2 + IL_0048: stloc.s V_4 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: stloc.s V_5 + IL_0052: ldloc.s V_4 + IL_0054: ldloc.s V_5 + IL_0056: cgt + IL_0058: ldloc.s V_4 + IL_005a: ldloc.s V_5 + IL_005c: clt + IL_005e: sub + IL_005f: ret + + IL_0060: ldc.i4.1 + IL_0061: ret + + IL_0062: ldarg.1 + IL_0063: unbox.any assembly/U + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/U::Equals(class assembly/U, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/U obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 assembly/U::item1 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item1 + IL_0018: bne.un.s IL_0029 + + IL_001a: ldloc.0 + IL_001b: ldfld int32 assembly/U::item2 + IL_0020: ldloc.1 + IL_0021: ldfld int32 assembly/U::item2 + IL_0026: ceq + IL_0028: ret + + IL_0029: ldc.i4.0 + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/U V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/U::Equals(class assembly/U) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 Tag() + { + .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 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .get instance int32 assembly/U::get_Item2() + } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@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 [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.Core.FSharpFunc`2 clo2) 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.Core.FSharpFunc`2 assembly/'assembly@7-1'::clo2 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(int32 arg20) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'assembly@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 + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit assembly@7 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo1 + .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.Core.FSharpFunc`2> clo1) 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.Core.FSharpFunc`2> assembly/assembly@7::clo1 + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(int32 arg10) cil managed + { + + .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> assembly/assembly@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 assembly/'assembly@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0013: ret + } + + } + + .method public static void assembly(class assembly/U _arg1) cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_3) + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/U::item2 + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/U::item1 + IL_000d: stloc.1 + IL_000e: ldstr "a = %A, a = %A" + IL_0013: 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,class [runtime]System.Tuple`2>::.ctor(string) + IL_0018: stloc.3 + IL_0019: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_001e: ldloc.3 + IL_001f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>>(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0024: stloc.2 + IL_0025: ldloc.2 + IL_0026: newobj instance void assembly/assembly@7::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_002b: ldloc.1 + IL_002c: ldloc.0 + IL_002d: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !0, + !1) + IL_0032: pop + IL_0033: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl index 4be84f3b9b0..a52189c9300 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.netcore.bsl index df7927a467b..41b244c5a7a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl index 4be84f3b9b0..a52189c9300 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.netcore.bsl index df7927a467b..41b244c5a7a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl index 4be84f3b9b0..a52189c9300 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.netcore.bsl index df7927a467b..41b244c5a7a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl index 4be84f3b9b0..a52189c9300 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.netcore.bsl index df7927a467b..41b244c5a7a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl index b3c737c5df4..85706bdfccd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.netcore.bsl index 965581a344c..6d9816702f2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl similarity index 94% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index ef0c2030d4a..f9b2fa31440 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -22,16 +22,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl new file mode 100644 index 00000000000..74cb3fb32ef --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl @@ -0,0 +1,77 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: nop + IL_0001: ldstr "A" + IL_0006: ldstr "A" + IL_000b: call bool [netstandard]System.String::Equals(string, + string) + IL_0010: brfalse.s IL_001a + + IL_0012: call void [runtime]System.Console::WriteLine() + IL_0017: nop + IL_0018: br.s IL_0020 + + IL_001a: call void [runtime]System.Console::WriteLine() + IL_001f: nop + IL_0020: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.netcore .bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl similarity index 75% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.netcore .bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl index ef0c2030d4a..b78a9ea4355 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.netcore .bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl @@ -22,16 +22,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -62,23 +52,21 @@ { .entrypoint - .maxstack 4 - .locals init (string V_0) - IL_0000: ldstr "A" - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldstr "A" - IL_000c: call bool [netstandard]System.String::Equals(string, + .maxstack 8 + IL_0000: nop + IL_0001: ldstr "A" + IL_0006: ldstr "A" + IL_000b: call bool [netstandard]System.String::Equals(string, string) - IL_0011: brfalse.s IL_001b + IL_0010: brfalse.s IL_001a - IL_0013: call void [runtime]System.Console::WriteLine() - IL_0018: nop - IL_0019: br.s IL_0021 + IL_0012: call void [runtime]System.Console::WriteLine() + IL_0017: nop + IL_0018: br.s IL_0020 - IL_001b: call void [runtime]System.Console::WriteLine() - IL_0020: nop - IL_0021: ret + IL_001a: call void [runtime]System.Console::WriteLine() + IL_001f: nop + IL_0020: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl similarity index 95% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl index d40d4a5eaec..3bebfff9e17 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -22,16 +22,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl new file mode 100644 index 00000000000..625456a9501 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl @@ -0,0 +1,96 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldstr "A" + IL_0006: ldstr "A" + IL_000b: call bool [netstandard]System.String::Equals(string, + string) + IL_0010: brfalse.s IL_001a + + IL_0012: call void [runtime]System.Console::WriteLine() + IL_0017: nop + IL_0018: br.s IL_0020 + + IL_001a: call void [runtime]System.Console::WriteLine() + IL_001f: nop + IL_0020: 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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl new file mode 100644 index 00000000000..d07a80b3bb2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl @@ -0,0 +1,97 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1:0:0 +} +.assembly extern runtime { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldstr "A" + IL_0006: ldstr "A" + IL_000b: call bool [netstandard]System.String::Equals(string, + string) + IL_0010: brfalse.s IL_001a + + IL_0012: call void [runtime]System.Console::WriteLine() + IL_0017: nop + IL_0018: br.s IL_0020 + + IL_001a: call void [runtime]System.Console::WriteLine() + IL_001f: nop + IL_0020: 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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl similarity index 93% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index be3321156ef..8e50cf1e6de 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl new file mode 100644 index 00000000000..24ef383498f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl @@ -0,0 +1,61 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl new file mode 100644 index 00000000000..3960fe05b8a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl @@ -0,0 +1,62 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern runtime { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl similarity index 94% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl index 034610cf4a5..bb3254b463e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl new file mode 100644 index 00000000000..385ee3b69d3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl @@ -0,0 +1,80 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: 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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl new file mode 100644 index 00000000000..2aa82125439 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl @@ -0,0 +1,81 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern runtime { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: 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 public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.netcore .bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl similarity index 98% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.netcore .bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index 1bc97bec0a1..0a339bb2ae3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.netcore .bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl new file mode 100644 index 00000000000..c85c72152d8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl @@ -0,0 +1,308 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static void test1() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_0015 + + } + catch [runtime]System.Object + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: call void [runtime]System.Console::WriteLine() + IL_0013: leave.s IL_0015 + + } + IL_0015: ret + } + + .method public static void test2() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.ArgumentException V_1, + class [runtime]System.Exception V_2) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_0042 + + } + filter + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [runtime]System.ArgumentException + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_001c + + IL_0018: ldc.i4.1 + IL_0019: nop + IL_001a: br.s IL_001e + + IL_001c: ldc.i4.0 + IL_001d: nop + IL_001e: endfilter + } + { + IL_0020: castclass [runtime]System.Exception + IL_0025: stloc.2 + IL_0026: ldloc.2 + IL_0027: isinst [runtime]System.ArgumentException + IL_002c: stloc.1 + IL_002d: ldloc.1 + IL_002e: brfalse.s IL_0037 + + IL_0030: call void [runtime]System.Console::WriteLine() + IL_0035: leave.s IL_0042 + + IL_0037: rethrow + IL_0039: ldnull + IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_003f: pop + IL_0040: leave.s IL_0042 + + } + IL_0042: ret + } + + .method public static void test3() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.ArgumentException V_1, + class [runtime]System.ArgumentException V_2, + class [runtime]System.Exception V_3) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_004c + + } + filter + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [runtime]System.ArgumentException + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_001e + + IL_0018: ldloc.1 + IL_0019: stloc.2 + IL_001a: ldc.i4.1 + IL_001b: nop + IL_001c: br.s IL_0020 + + IL_001e: ldc.i4.0 + IL_001f: nop + IL_0020: endfilter + } + { + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.3 + IL_0028: ldloc.3 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: brfalse.s IL_0041 + + IL_0032: ldloc.1 + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: callvirt instance string [runtime]System.Exception::get_Message() + IL_003a: call void [runtime]System.Console::WriteLine(string) + IL_003f: leave.s IL_004c + + IL_0041: rethrow + IL_0043: ldnull + IL_0044: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0049: pop + IL_004a: leave.s IL_004c + + } + IL_004c: ret + } + + .method public static void test4() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException V_1, + string V_2, + class [runtime]System.Exception V_3) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_005b + + } + filter + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_0028 + + IL_0018: ldloc.0 + IL_0019: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_001e: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0023: stloc.2 + IL_0024: ldc.i4.1 + IL_0025: nop + IL_0026: br.s IL_002a + + IL_0028: ldc.i4.0 + IL_0029: nop + IL_002a: endfilter + } + { + IL_002c: castclass [runtime]System.Exception + IL_0031: stloc.3 + IL_0032: ldloc.3 + IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0038: stloc.1 + IL_0039: ldloc.1 + IL_003a: brfalse.s IL_0050 + + IL_003c: ldloc.3 + IL_003d: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0042: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0047: stloc.2 + IL_0048: ldloc.2 + IL_0049: call void [runtime]System.Console::WriteLine(string) + IL_004e: leave.s IL_005b + + IL_0050: rethrow + IL_0052: ldnull + IL_0053: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0058: pop + IL_0059: leave.s IL_005b + + } + IL_005b: ret + } + + .method public static void test5() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.ArgumentException V_1) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_0051 + + } + catch [runtime]System.Object + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [runtime]System.ArgumentException + IL_0014: brtrue.s IL_0020 + + IL_0016: ldloc.0 + IL_0017: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_001c: brfalse.s IL_0046 + + IL_001e: br.s IL_0034 + + IL_0020: ldloc.0 + IL_0021: unbox.any [runtime]System.ArgumentException + IL_0026: stloc.1 + IL_0027: ldloc.1 + IL_0028: callvirt instance string [runtime]System.Exception::get_Message() + IL_002d: call void [runtime]System.Console::WriteLine(string) + IL_0032: leave.s IL_0051 + + IL_0034: ldloc.0 + IL_0035: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_003f: call void [runtime]System.Console::WriteLine(string) + IL_0044: leave.s IL_0051 + + IL_0046: rethrow + IL_0048: ldnull + IL_0049: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_004e: pop + IL_004f: leave.s IL_0051 + + } + IL_0051: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl similarity index 68% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl index 1bc97bec0a1..a73fda88e58 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -73,8 +63,7 @@ .maxstack 3 .locals init (class [runtime]System.Exception V_0, class [runtime]System.ArgumentException V_1, - class [runtime]System.Exception V_2, - class [runtime]System.ArgumentException V_3) + class [runtime]System.Exception V_2) .try { IL_0000: nop @@ -105,8 +94,8 @@ IL_0025: stloc.2 IL_0026: ldloc.2 IL_0027: isinst [runtime]System.ArgumentException - IL_002c: stloc.3 - IL_002d: ldloc.3 + IL_002c: stloc.1 + IL_002d: ldloc.1 IL_002e: brfalse.s IL_0037 IL_0030: call void [runtime]System.Console::WriteLine() @@ -129,14 +118,12 @@ .locals init (class [runtime]System.Exception V_0, class [runtime]System.ArgumentException V_1, class [runtime]System.ArgumentException V_2, - class [runtime]System.Exception V_3, - class [runtime]System.ArgumentException V_4, - class [runtime]System.ArgumentException V_5) + class [runtime]System.Exception V_3) .try { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0051 + IL_0006: leave.s IL_004c } filter @@ -164,25 +151,25 @@ IL_0027: stloc.3 IL_0028: ldloc.3 IL_0029: isinst [runtime]System.ArgumentException - IL_002e: stloc.s V_4 - IL_0030: ldloc.s V_4 - IL_0032: brfalse.s IL_0046 - - IL_0034: ldloc.s V_4 - IL_0036: stloc.s V_5 - IL_0038: ldloc.s V_5 - IL_003a: callvirt instance string [runtime]System.Exception::get_Message() - IL_003f: call void [runtime]System.Console::WriteLine(string) - IL_0044: leave.s IL_0051 - - IL_0046: rethrow - IL_0048: ldnull - IL_0049: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_004e: pop - IL_004f: leave.s IL_0051 + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: brfalse.s IL_0041 + + IL_0032: ldloc.1 + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: callvirt instance string [runtime]System.Exception::get_Message() + IL_003a: call void [runtime]System.Console::WriteLine(string) + IL_003f: leave.s IL_004c + + IL_0041: rethrow + IL_0043: ldnull + IL_0044: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0049: pop + IL_004a: leave.s IL_004c } - IL_0051: ret + IL_004c: ret } .method public static void test4() cil managed @@ -192,14 +179,12 @@ .locals init (class [runtime]System.Exception V_0, class [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException V_1, string V_2, - class [runtime]System.Exception V_3, - class [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException V_4, - string V_5) + class [runtime]System.Exception V_3) .try { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_005f + IL_0006: leave.s IL_005b } filter @@ -229,26 +214,26 @@ IL_0031: stloc.3 IL_0032: ldloc.3 IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0038: stloc.s V_4 - IL_003a: ldloc.s V_4 - IL_003c: brfalse.s IL_0054 - - IL_003e: ldloc.3 - IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0049: stloc.s V_5 - IL_004b: ldloc.s V_5 - IL_004d: call void [runtime]System.Console::WriteLine(string) - IL_0052: leave.s IL_005f - - 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 + IL_0038: stloc.1 + IL_0039: ldloc.1 + IL_003a: brfalse.s IL_0050 + + IL_003c: ldloc.3 + IL_003d: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0042: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0047: stloc.2 + IL_0048: ldloc.2 + IL_0049: call void [runtime]System.Console::WriteLine(string) + IL_004e: leave.s IL_005b + + IL_0050: rethrow + IL_0052: ldnull + IL_0053: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0058: pop + IL_0059: leave.s IL_005b } - IL_005f: ret + IL_005b: ret } .method public static void test5() cil managed @@ -256,15 +241,12 @@ .maxstack 3 .locals init (class [runtime]System.Exception V_0, - object V_1, - object V_2, - class [runtime]System.ArgumentException V_3, - string V_4) + class [runtime]System.ArgumentException V_1) .try { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_005f + IL_0006: leave.s IL_0051 } catch [runtime]System.Object @@ -272,47 +254,37 @@ IL_0008: castclass [runtime]System.Exception IL_000d: stloc.0 IL_000e: ldloc.0 - IL_000f: stloc.1 - IL_0010: ldloc.1 - IL_0011: isinst [runtime]System.ArgumentException - IL_0016: ldnull - IL_0017: cgt.un - IL_0019: brtrue.s IL_002a - - IL_001b: ldloc.0 - IL_001c: stloc.2 - IL_001d: ldloc.2 - IL_001e: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0023: ldnull - IL_0024: cgt.un - IL_0026: brfalse.s IL_0054 - - IL_0028: br.s IL_003e - - IL_002a: ldloc.0 - IL_002b: unbox.any [runtime]System.ArgumentException - IL_0030: stloc.3 - IL_0031: ldloc.3 - IL_0032: callvirt instance string [runtime]System.Exception::get_Message() - IL_0037: call void [runtime]System.Console::WriteLine(string) - IL_003c: leave.s IL_005f - - IL_003e: ldloc.0 - IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0049: stloc.s V_4 - IL_004b: ldloc.s V_4 - IL_004d: call void [runtime]System.Console::WriteLine(string) - IL_0052: leave.s IL_005f - - 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 + IL_000f: isinst [runtime]System.ArgumentException + IL_0014: brtrue.s IL_0020 + + IL_0016: ldloc.0 + IL_0017: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_001c: brfalse.s IL_0046 + + IL_001e: br.s IL_0034 + + IL_0020: ldloc.0 + IL_0021: unbox.any [runtime]System.ArgumentException + IL_0026: stloc.1 + IL_0027: ldloc.1 + IL_0028: callvirt instance string [runtime]System.Exception::get_Message() + IL_002d: call void [runtime]System.Console::WriteLine(string) + IL_0032: leave.s IL_0051 + + IL_0034: ldloc.0 + IL_0035: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_003f: call void [runtime]System.Console::WriteLine(string) + IL_0044: leave.s IL_0051 + + IL_0046: rethrow + IL_0048: ldnull + IL_0049: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_004e: pop + IL_004f: leave.s IL_0051 } - IL_005f: ret + IL_0051: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl similarity index 98% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl index 43e2de4d4aa..433c9858f45 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl similarity index 98% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl index 1bc97bec0a1..0a339bb2ae3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -17,16 +17,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl new file mode 100644 index 00000000000..c85c72152d8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl @@ -0,0 +1,308 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static void test1() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_0015 + + } + catch [runtime]System.Object + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: call void [runtime]System.Console::WriteLine() + IL_0013: leave.s IL_0015 + + } + IL_0015: ret + } + + .method public static void test2() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.ArgumentException V_1, + class [runtime]System.Exception V_2) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_0042 + + } + filter + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [runtime]System.ArgumentException + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_001c + + IL_0018: ldc.i4.1 + IL_0019: nop + IL_001a: br.s IL_001e + + IL_001c: ldc.i4.0 + IL_001d: nop + IL_001e: endfilter + } + { + IL_0020: castclass [runtime]System.Exception + IL_0025: stloc.2 + IL_0026: ldloc.2 + IL_0027: isinst [runtime]System.ArgumentException + IL_002c: stloc.1 + IL_002d: ldloc.1 + IL_002e: brfalse.s IL_0037 + + IL_0030: call void [runtime]System.Console::WriteLine() + IL_0035: leave.s IL_0042 + + IL_0037: rethrow + IL_0039: ldnull + IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_003f: pop + IL_0040: leave.s IL_0042 + + } + IL_0042: ret + } + + .method public static void test3() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.ArgumentException V_1, + class [runtime]System.ArgumentException V_2, + class [runtime]System.Exception V_3) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_004c + + } + filter + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [runtime]System.ArgumentException + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_001e + + IL_0018: ldloc.1 + IL_0019: stloc.2 + IL_001a: ldc.i4.1 + IL_001b: nop + IL_001c: br.s IL_0020 + + IL_001e: ldc.i4.0 + IL_001f: nop + IL_0020: endfilter + } + { + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.3 + IL_0028: ldloc.3 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: brfalse.s IL_0041 + + IL_0032: ldloc.1 + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: callvirt instance string [runtime]System.Exception::get_Message() + IL_003a: call void [runtime]System.Console::WriteLine(string) + IL_003f: leave.s IL_004c + + IL_0041: rethrow + IL_0043: ldnull + IL_0044: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0049: pop + IL_004a: leave.s IL_004c + + } + IL_004c: ret + } + + .method public static void test4() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException V_1, + string V_2, + class [runtime]System.Exception V_3) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_005b + + } + filter + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_0028 + + IL_0018: ldloc.0 + IL_0019: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_001e: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0023: stloc.2 + IL_0024: ldc.i4.1 + IL_0025: nop + IL_0026: br.s IL_002a + + IL_0028: ldc.i4.0 + IL_0029: nop + IL_002a: endfilter + } + { + IL_002c: castclass [runtime]System.Exception + IL_0031: stloc.3 + IL_0032: ldloc.3 + IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0038: stloc.1 + IL_0039: ldloc.1 + IL_003a: brfalse.s IL_0050 + + IL_003c: ldloc.3 + IL_003d: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0042: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0047: stloc.2 + IL_0048: ldloc.2 + IL_0049: call void [runtime]System.Console::WriteLine(string) + IL_004e: leave.s IL_005b + + IL_0050: rethrow + IL_0052: ldnull + IL_0053: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0058: pop + IL_0059: leave.s IL_005b + + } + IL_005b: ret + } + + .method public static void test5() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.ArgumentException V_1) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_0051 + + } + catch [runtime]System.Object + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [runtime]System.ArgumentException + IL_0014: brtrue.s IL_0020 + + IL_0016: ldloc.0 + IL_0017: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_001c: brfalse.s IL_0046 + + IL_001e: br.s IL_0034 + + IL_0020: ldloc.0 + IL_0021: unbox.any [runtime]System.ArgumentException + IL_0026: stloc.1 + IL_0027: ldloc.1 + IL_0028: callvirt instance string [runtime]System.Exception::get_Message() + IL_002d: call void [runtime]System.Console::WriteLine(string) + IL_0032: leave.s IL_0051 + + IL_0034: ldloc.0 + IL_0035: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_003f: call void [runtime]System.Console::WriteLine(string) + IL_0044: leave.s IL_0051 + + IL_0046: rethrow + IL_0048: ldnull + IL_0049: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_004e: pop + IL_004f: leave.s IL_0051 + + } + IL_0051: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl new file mode 100644 index 00000000000..a73fda88e58 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl @@ -0,0 +1,309 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern runtime { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 ) + .method public static void test1() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_0015 + + } + catch [runtime]System.Object + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: call void [runtime]System.Console::WriteLine() + IL_0013: leave.s IL_0015 + + } + IL_0015: ret + } + + .method public static void test2() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.ArgumentException V_1, + class [runtime]System.Exception V_2) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_0042 + + } + filter + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [runtime]System.ArgumentException + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_001c + + IL_0018: ldc.i4.1 + IL_0019: nop + IL_001a: br.s IL_001e + + IL_001c: ldc.i4.0 + IL_001d: nop + IL_001e: endfilter + } + { + IL_0020: castclass [runtime]System.Exception + IL_0025: stloc.2 + IL_0026: ldloc.2 + IL_0027: isinst [runtime]System.ArgumentException + IL_002c: stloc.1 + IL_002d: ldloc.1 + IL_002e: brfalse.s IL_0037 + + IL_0030: call void [runtime]System.Console::WriteLine() + IL_0035: leave.s IL_0042 + + IL_0037: rethrow + IL_0039: ldnull + IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_003f: pop + IL_0040: leave.s IL_0042 + + } + IL_0042: ret + } + + .method public static void test3() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.ArgumentException V_1, + class [runtime]System.ArgumentException V_2, + class [runtime]System.Exception V_3) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_004c + + } + filter + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [runtime]System.ArgumentException + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_001e + + IL_0018: ldloc.1 + IL_0019: stloc.2 + IL_001a: ldc.i4.1 + IL_001b: nop + IL_001c: br.s IL_0020 + + IL_001e: ldc.i4.0 + IL_001f: nop + IL_0020: endfilter + } + { + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.3 + IL_0028: ldloc.3 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: brfalse.s IL_0041 + + IL_0032: ldloc.1 + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: callvirt instance string [runtime]System.Exception::get_Message() + IL_003a: call void [runtime]System.Console::WriteLine(string) + IL_003f: leave.s IL_004c + + IL_0041: rethrow + IL_0043: ldnull + IL_0044: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0049: pop + IL_004a: leave.s IL_004c + + } + IL_004c: ret + } + + .method public static void test4() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException V_1, + string V_2, + class [runtime]System.Exception V_3) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_005b + + } + filter + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_0028 + + IL_0018: ldloc.0 + IL_0019: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_001e: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0023: stloc.2 + IL_0024: ldc.i4.1 + IL_0025: nop + IL_0026: br.s IL_002a + + IL_0028: ldc.i4.0 + IL_0029: nop + IL_002a: endfilter + } + { + IL_002c: castclass [runtime]System.Exception + IL_0031: stloc.3 + IL_0032: ldloc.3 + IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0038: stloc.1 + IL_0039: ldloc.1 + IL_003a: brfalse.s IL_0050 + + IL_003c: ldloc.3 + IL_003d: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0042: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0047: stloc.2 + IL_0048: ldloc.2 + IL_0049: call void [runtime]System.Console::WriteLine(string) + IL_004e: leave.s IL_005b + + IL_0050: rethrow + IL_0052: ldnull + IL_0053: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0058: pop + IL_0059: leave.s IL_005b + + } + IL_005b: ret + } + + .method public static void test5() cil managed + { + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.ArgumentException V_1) + .try + { + IL_0000: nop + IL_0001: call void [runtime]System.Console::WriteLine() + IL_0006: leave.s IL_0051 + + } + catch [runtime]System.Object + { + IL_0008: castclass [runtime]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [runtime]System.ArgumentException + IL_0014: brtrue.s IL_0020 + + IL_0016: ldloc.0 + IL_0017: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_001c: brfalse.s IL_0046 + + IL_001e: br.s IL_0034 + + IL_0020: ldloc.0 + IL_0021: unbox.any [runtime]System.ArgumentException + IL_0026: stloc.1 + IL_0027: ldloc.1 + IL_0028: callvirt instance string [runtime]System.Exception::get_Message() + IL_002d: call void [runtime]System.Console::WriteLine(string) + IL_0032: leave.s IL_0051 + + IL_0034: ldloc.0 + IL_0035: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_003f: call void [runtime]System.Console::WriteLine(string) + IL_0044: leave.s IL_0051 + + IL_0046: rethrow + IL_0048: ldnull + IL_0049: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_004e: pop + IL_004f: leave.s IL_0051 + + } + IL_0051: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.OptimizeOff.il.bsl similarity index 90% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.OptimizeOff.il.bsl index 3f4c324d6dd..879f6b4e90f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -49,8 +39,7 @@ .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 + .method public specialname rtspecialname instance void .ctor() cil managed { .maxstack 8 @@ -67,8 +56,7 @@ IL_001e: ret } - .method public hidebysig instance string - M() cil managed + .method public hidebysig instance string M() cil managed { .maxstack 4 @@ -84,8 +72,7 @@ IL_0013: ret } - .method assembly hidebysig instance string - g() cil managed + .method assembly hidebysig instance string g() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -101,8 +88,7 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/g@13 @_instance - .method assembly specialname rtspecialname - instance void .ctor() cil managed + .method assembly specialname rtspecialname instance void .ctor() 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 ) @@ -113,8 +99,7 @@ IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed { .maxstack 8 @@ -129,8 +114,7 @@ IL_0021: ret } - .method private specialname rtspecialname static - void .cctor() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 @@ -141,8 +125,7 @@ } - .method public static class [runtime]System.Tuple`2 - f(!!a x) cil managed + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed { .maxstack 5 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl new file mode 100644 index 00000000000..879f6b4e90f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -0,0 +1,165 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 4 + .locals init (class assembly/C V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld string assembly/C::x@8 + IL_0008: ldarg.0 + IL_0009: callvirt instance string assembly/C::g() + IL_000e: call string [runtime]System.String::Concat(string, + string) + IL_0013: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit g@13 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/g@13 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) 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 "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 + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance + IL_0005: stloc.0 + 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 [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0019: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl similarity index 87% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index 9f1ef581c16..3314328bdef 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -1,183 +1,166 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly extern runtime { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.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 auto ansi serializable nested public C - extends [runtime]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 - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: callvirt instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ldarg.0 - IL_0009: call string [runtime]System.Console::ReadLine() - IL_000e: stfld string assembly/C::x - IL_0013: ldarg.0 - IL_0014: call string [runtime]System.Console::ReadLine() - IL_0019: stfld string assembly/C::x@8 - IL_001e: ret - } - - .method public hidebysig instance string - M() cil managed - { - - .maxstack 4 - .locals init (class assembly/C V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld string assembly/C::x@8 - IL_0008: ldarg.0 - IL_0009: callvirt instance string assembly/C::g() - IL_000e: call string [runtime]System.String::Concat(string, - string) - IL_0013: ret - } - - .method assembly hidebysig instance string - g() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string assembly/C::x - IL_0006: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit g@13 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/g@13 @_instance - .method assembly specialname rtspecialname - instance void .ctor() 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: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) 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 "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 - } - - .method private specialname rtspecialname static - void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - - } - - .method public static class [runtime]System.Tuple`2 - f(!!a x) cil managed - { - - .maxstack 5 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance - IL_0005: stloc.0 - 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 [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0019: ret - } - -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: ret - } - -} - - - - - - + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern runtime { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 4 + .locals init (class assembly/C V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld string assembly/C::x@8 + IL_0008: ldarg.0 + IL_0009: callvirt instance string assembly/C::g() + IL_000e: call string [runtime]System.String::Concat(string, + string) + IL_0013: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit g@13 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/g@13 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) 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 "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 + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance + IL_0005: stloc.0 + 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 [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0019: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.net472.debug.bsl new file mode 100644 index 00000000000..87912f0102a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.net472.debug.bsl @@ -0,0 +1,126 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x@8 + IL_0006: ldarg.0 + IL_0007: callvirt instance string assembly/C::g() + IL_000c: call string [runtime]System.String::Concat(string, + string) + IL_0011: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 4 + 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 "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: ldstr "Hello" + 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: ldstr "Hello" + IL_0034: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0039: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_003e: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0043: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.net472.release.bsl new file mode 100644 index 00000000000..e9cb7d80f37 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.net472.release.bsl @@ -0,0 +1,149 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x@8 + IL_0006: ldarg.0 + IL_0007: callvirt instance string assembly/C::g() + IL_000c: call string [runtime]System.String::Concat(string, + string) + IL_0011: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .method assembly static void g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "Hello" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ret + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 8 + IL_0000: ldnull + IL_0001: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0006: nop + IL_0007: ldnull + IL_0008: ldnull + IL_0009: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000e: nop + IL_000f: ldnull + IL_0010: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0015: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.debug.bsl new file mode 100644 index 00000000000..245ae20eb9b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.debug.bsl @@ -0,0 +1,127 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern runtime { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x@8 + IL_0006: ldarg.0 + IL_0007: callvirt instance string assembly/C::g() + IL_000c: call string [runtime]System.String::Concat(string, + string) + IL_0011: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 4 + 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 "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: ldstr "Hello" + 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: ldstr "Hello" + IL_0034: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0039: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_003e: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0043: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.release.bsl new file mode 100644 index 00000000000..c3d7168eab9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.release.bsl @@ -0,0 +1,150 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1:0:0 +} +.assembly extern runtime { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x@8 + IL_0006: ldarg.0 + IL_0007: callvirt instance string assembly/C::g() + IL_000c: call string [runtime]System.String::Concat(string, + string) + IL_0011: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .method assembly static void g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "Hello" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ret + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 8 + IL_0000: ldnull + IL_0001: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0006: nop + IL_0007: ldnull + IL_0008: ldnull + IL_0009: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000e: nop + IL_000f: ldnull + IL_0010: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0015: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl new file mode 100644 index 00000000000..879f6b4e90f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl @@ -0,0 +1,165 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 4 + .locals init (class assembly/C V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld string assembly/C::x@8 + IL_0008: ldarg.0 + IL_0009: callvirt instance string assembly/C::g() + IL_000e: call string [runtime]System.String::Concat(string, + string) + IL_0013: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit g@13 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/g@13 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) 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 "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 + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance + IL_0005: stloc.0 + 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 [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0019: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl new file mode 100644 index 00000000000..3314328bdef --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -0,0 +1,166 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern runtime { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 4 + .locals init (class assembly/C V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld string assembly/C::x@8 + IL_0008: ldarg.0 + IL_0009: callvirt instance string assembly/C::g() + IL_000e: call string [runtime]System.String::Concat(string, + string) + IL_0013: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit g@13 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/g@13 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) 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 "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 + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance + IL_0005: stloc.0 + 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 [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0019: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.debug.bsl new file mode 100644 index 00000000000..87912f0102a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.debug.bsl @@ -0,0 +1,126 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x@8 + IL_0006: ldarg.0 + IL_0007: callvirt instance string assembly/C::g() + IL_000c: call string [runtime]System.String::Concat(string, + string) + IL_0011: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 4 + 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 "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: ldstr "Hello" + 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: ldstr "Hello" + IL_0034: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0039: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_003e: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0043: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.release.bsl new file mode 100644 index 00000000000..f4f126bbc5b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.release.bsl @@ -0,0 +1,176 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x@8 + IL_0006: ldarg.0 + IL_0007: callvirt instance string assembly/C::g() + IL_000c: call string [runtime]System.String::Concat(string, + string) + IL_0011: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit g@13 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/g@13 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "Hello" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: tail. + IL_002a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002f: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance + IL_0005: stloc.0 + 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 [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0019: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.debug.bsl new file mode 100644 index 00000000000..245ae20eb9b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.debug.bsl @@ -0,0 +1,127 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern runtime { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x@8 + IL_0006: ldarg.0 + IL_0007: callvirt instance string assembly/C::g() + IL_000c: call string [runtime]System.String::Concat(string, + string) + IL_0011: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 4 + 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 "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: ldstr "Hello" + 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: ldstr "Hello" + IL_0034: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0039: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_003e: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0043: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.release.bsl new file mode 100644 index 00000000000..422674eeb50 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.release.bsl @@ -0,0 +1,177 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern runtime { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable nested public C + extends [runtime]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 + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: call string [runtime]System.Console::ReadLine() + IL_000e: stfld string assembly/C::x + IL_0013: ldarg.0 + IL_0014: call string [runtime]System.Console::ReadLine() + IL_0019: stfld string assembly/C::x@8 + IL_001e: ret + } + + .method public hidebysig instance string M() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x@8 + IL_0006: ldarg.0 + IL_0007: callvirt instance string assembly/C::g() + IL_000c: call string [runtime]System.String::Concat(string, + string) + IL_0011: ret + } + + .method assembly hidebysig instance string g() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/C::x + IL_0006: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit g@13 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/g@13 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + 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: ldstr "Hello" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: tail. + IL_002a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002f: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + + } + + .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed + { + + .maxstack 5 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance + IL_0005: stloc.0 + 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 [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0019: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.debug.bsl similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.debug.bsl index d7f985f6888..7852e2509a4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.debug.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -104,9 +94,7 @@ IL_0007: ret } - .method public specialname rtspecialname - instance void .ctor(int32 x, - int32 y) cil managed + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 @@ -245,9 +233,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -425,9 +411,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(class assembly/Point obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -493,9 +477,7 @@ IL_004a: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -981,9 +963,7 @@ .field private class [runtime]System.Type Type@ .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) cil managed + .method public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.release.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.release.bsl index 2e425f74278..ab7bca6340a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.release.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -104,9 +94,7 @@ IL_0007: ret } - .method public specialname rtspecialname - instance void .ctor(int32 x, - int32 y) cil managed + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 @@ -227,9 +215,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -377,9 +363,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(class assembly/Point obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -427,9 +411,7 @@ IL_0036: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -867,9 +849,7 @@ .field private class [runtime]System.Type Type@ .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) cil managed + .method public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.debug.bsl similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.debug.bsl index 8de09a8c9d9..bda000c5fe3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.debug.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -104,9 +94,7 @@ IL_0007: ret } - .method public specialname rtspecialname - instance void .ctor(int32 x, - int32 y) cil managed + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 @@ -245,9 +233,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -425,9 +411,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(class assembly/Point obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -493,9 +477,7 @@ IL_004a: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.release.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.release.bsl index 896ab224ac8..d0244dfedf7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.release.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -104,9 +94,7 @@ IL_0007: ret } - .method public specialname rtspecialname - instance void .ctor(int32 x, - int32 y) cil managed + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 @@ -227,9 +215,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -377,9 +363,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(class assembly/Point obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -427,9 +411,7 @@ IL_0036: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.debug.bsl new file mode 100644 index 00000000000..5ce65a01960 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.debug.bsl @@ -0,0 +1,821 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/Point + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/Point::x@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/Point::x@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/Point + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + 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 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: nop + IL_0068: ldloc.0 + IL_0069: brfalse.s IL_0085 + + IL_006b: ldloc.0 + IL_006c: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0071: brfalse.s IL_0080 + + IL_0073: ldloc.0 + IL_0074: ldc.i4.0 + IL_0075: ldelema [runtime]System.Double + IL_007a: stloc.2 + IL_007b: ldloc.2 + IL_007c: conv.i + IL_007d: nop + IL_007e: br.s IL_0088 + + IL_0080: ldc.i4.0 + IL_0081: conv.i + IL_0082: nop + IL_0083: br.s IL_0088 + + IL_0085: ldc.i4.0 + IL_0086: conv.i + IL_0087: nop + IL_0088: stloc.1 + IL_0089: ldloc.1 + IL_008a: ldc.i4.0 + IL_008b: conv.i + IL_008c: sizeof [runtime]System.Double + IL_0092: mul + IL_0093: add + IL_0094: ldobj [runtime]System.Double + IL_0099: ldloc.1 + IL_009a: ldc.i4.1 + IL_009b: conv.i + IL_009c: sizeof [runtime]System.Double + IL_00a2: mul + IL_00a3: add + IL_00a4: ldobj [runtime]System.Double + IL_00a9: add + IL_00aa: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: ldc.i4.0 + IL_0074: conv.i + IL_0075: sizeof [runtime]System.Double + IL_007b: mul + IL_007c: add + IL_007d: ldobj [runtime]System.Double + IL_0082: ldloc.1 + IL_0083: ldc.i4.1 + IL_0084: conv.i + IL_0085: sizeof [runtime]System.Double + IL_008b: mul + IL_008c: add + IL_008d: ldobj [runtime]System.Double + IL_0092: add + IL_0093: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (native int V_0, + string pinned V_1) + IL_0000: nop + IL_0001: ldstr "Hello World" + IL_0006: stloc.1 + IL_0007: ldstr "Hello World" + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: stloc.0 + IL_0014: ldloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i + IL_0017: sizeof [runtime]System.Char + IL_001d: mul + IL_001e: add + IL_001f: ldobj [runtime]System.Char + IL_0024: ldloc.0 + IL_0025: ldc.i4.1 + IL_0026: conv.i + IL_0027: sizeof [runtime]System.Char + IL_002d: mul + IL_002e: add + IL_002f: ldobj [runtime]System.Char + IL_0034: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0039: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.release.bsl new file mode 100644 index 00000000000..9b4153c5532 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.release.bsl @@ -0,0 +1,821 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/Point + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/Point::x@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/Point::x@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/Point + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0007: stloc.0 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: nop + IL_0068: ldloc.0 + IL_0069: brfalse.s IL_0085 + + IL_006b: ldloc.0 + IL_006c: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0071: brfalse.s IL_0080 + + IL_0073: ldloc.0 + IL_0074: ldc.i4.0 + IL_0075: ldelema [runtime]System.Double + IL_007a: stloc.2 + IL_007b: ldloc.2 + IL_007c: conv.i + IL_007d: nop + IL_007e: br.s IL_0088 + + IL_0080: ldc.i4.0 + IL_0081: conv.i + IL_0082: nop + IL_0083: br.s IL_0088 + + IL_0085: ldc.i4.0 + IL_0086: conv.i + IL_0087: nop + IL_0088: stloc.1 + IL_0089: ldloc.1 + IL_008a: ldc.i4.0 + IL_008b: conv.i + IL_008c: sizeof [runtime]System.Double + IL_0092: mul + IL_0093: add + IL_0094: ldobj [runtime]System.Double + IL_0099: ldloc.1 + IL_009a: ldc.i4.1 + IL_009b: conv.i + IL_009c: sizeof [runtime]System.Double + IL_00a2: mul + IL_00a3: add + IL_00a4: ldobj [runtime]System.Double + IL_00a9: add + IL_00aa: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: ldc.i4.0 + IL_0074: conv.i + IL_0075: sizeof [runtime]System.Double + IL_007b: mul + IL_007c: add + IL_007d: ldobj [runtime]System.Double + IL_0082: ldloc.1 + IL_0083: ldc.i4.1 + IL_0084: conv.i + IL_0085: sizeof [runtime]System.Double + IL_008b: mul + IL_008c: add + IL_008d: ldobj [runtime]System.Double + IL_0092: add + IL_0093: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (native int V_0, + string pinned V_1) + IL_0000: nop + IL_0001: ldstr "Hello World" + IL_0006: stloc.1 + IL_0007: ldstr "Hello World" + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: stloc.0 + IL_0014: ldloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i + IL_0017: sizeof [runtime]System.Char + IL_001d: mul + IL_001e: add + IL_001f: ldobj [runtime]System.Char + IL_0024: ldloc.0 + IL_0025: ldc.i4.1 + IL_0026: conv.i + IL_0027: sizeof [runtime]System.Char + IL_002d: mul + IL_002e: add + IL_002f: ldobj [runtime]System.Char + IL_0034: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0039: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.debug.bsl new file mode 100644 index 00000000000..f4025c40141 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.debug.bsl @@ -0,0 +1,731 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/Point + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/Point::x@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/Point::x@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/Point + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + 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 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: nop + IL_0068: ldloc.0 + IL_0069: brfalse.s IL_0085 + + IL_006b: ldloc.0 + IL_006c: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0071: brfalse.s IL_0080 + + IL_0073: ldloc.0 + IL_0074: ldc.i4.0 + IL_0075: ldelema [runtime]System.Double + IL_007a: stloc.2 + IL_007b: ldloc.2 + IL_007c: conv.i + IL_007d: nop + IL_007e: br.s IL_0088 + + IL_0080: ldc.i4.0 + IL_0081: conv.i + IL_0082: nop + IL_0083: br.s IL_0088 + + IL_0085: ldc.i4.0 + IL_0086: conv.i + IL_0087: nop + IL_0088: stloc.1 + IL_0089: ldloc.1 + IL_008a: ldc.i4.0 + IL_008b: conv.i + IL_008c: sizeof [runtime]System.Double + IL_0092: mul + IL_0093: add + IL_0094: ldobj [runtime]System.Double + IL_0099: ldloc.1 + IL_009a: ldc.i4.1 + IL_009b: conv.i + IL_009c: sizeof [runtime]System.Double + IL_00a2: mul + IL_00a3: add + IL_00a4: ldobj [runtime]System.Double + IL_00a9: add + IL_00aa: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: ldc.i4.0 + IL_0074: conv.i + IL_0075: sizeof [runtime]System.Double + IL_007b: mul + IL_007c: add + IL_007d: ldobj [runtime]System.Double + IL_0082: ldloc.1 + IL_0083: ldc.i4.1 + IL_0084: conv.i + IL_0085: sizeof [runtime]System.Double + IL_008b: mul + IL_008c: add + IL_008d: ldobj [runtime]System.Double + IL_0092: add + IL_0093: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (native int V_0, + string pinned V_1) + IL_0000: nop + IL_0001: ldstr "Hello World" + IL_0006: stloc.1 + IL_0007: ldstr "Hello World" + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: stloc.0 + IL_0014: ldloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i + IL_0017: sizeof [runtime]System.Char + IL_001d: mul + IL_001e: add + IL_001f: ldobj [runtime]System.Char + IL_0024: ldloc.0 + IL_0025: ldc.i4.1 + IL_0026: conv.i + IL_0027: sizeof [runtime]System.Char + IL_002d: mul + IL_002e: add + IL_002f: ldobj [runtime]System.Char + IL_0034: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0039: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.release.bsl new file mode 100644 index 00000000000..e618d937c7c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.release.bsl @@ -0,0 +1,731 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/Point + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/Point::x@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/Point::x@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/Point + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0007: stloc.0 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: nop + IL_0068: ldloc.0 + IL_0069: brfalse.s IL_0085 + + IL_006b: ldloc.0 + IL_006c: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0071: brfalse.s IL_0080 + + IL_0073: ldloc.0 + IL_0074: ldc.i4.0 + IL_0075: ldelema [runtime]System.Double + IL_007a: stloc.2 + IL_007b: ldloc.2 + IL_007c: conv.i + IL_007d: nop + IL_007e: br.s IL_0088 + + IL_0080: ldc.i4.0 + IL_0081: conv.i + IL_0082: nop + IL_0083: br.s IL_0088 + + IL_0085: ldc.i4.0 + IL_0086: conv.i + IL_0087: nop + IL_0088: stloc.1 + IL_0089: ldloc.1 + IL_008a: ldc.i4.0 + IL_008b: conv.i + IL_008c: sizeof [runtime]System.Double + IL_0092: mul + IL_0093: add + IL_0094: ldobj [runtime]System.Double + IL_0099: ldloc.1 + IL_009a: ldc.i4.1 + IL_009b: conv.i + IL_009c: sizeof [runtime]System.Double + IL_00a2: mul + IL_00a3: add + IL_00a4: ldobj [runtime]System.Double + IL_00a9: add + IL_00aa: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: ldc.i4.0 + IL_0074: conv.i + IL_0075: sizeof [runtime]System.Double + IL_007b: mul + IL_007c: add + IL_007d: ldobj [runtime]System.Double + IL_0082: ldloc.1 + IL_0083: ldc.i4.1 + IL_0084: conv.i + IL_0085: sizeof [runtime]System.Double + IL_008b: mul + IL_008c: add + IL_008d: ldobj [runtime]System.Double + IL_0092: add + IL_0093: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (native int V_0, + string pinned V_1) + IL_0000: nop + IL_0001: ldstr "Hello World" + IL_0006: stloc.1 + IL_0007: ldstr "Hello World" + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: stloc.0 + IL_0014: ldloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i + IL_0017: sizeof [runtime]System.Char + IL_001d: mul + IL_001e: add + IL_001f: ldobj [runtime]System.Char + IL_0024: ldloc.0 + IL_0025: ldc.i4.1 + IL_0026: conv.i + IL_0027: sizeof [runtime]System.Char + IL_002d: mul + IL_002e: add + IL_002f: ldobj [runtime]System.Char + IL_0034: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0039: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.debug.bsl new file mode 100644 index 00000000000..7852e2509a4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.debug.bsl @@ -0,0 +1,1025 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6, + class [runtime]System.Collections.IComparer V_7, + int32 V_8, + int32 V_9, + class [runtime]System.Collections.IComparer V_10, + int32 V_11, + int32 V_12) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0070 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_006e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: stloc.s V_4 + IL_001d: ldloc.2 + IL_001e: stloc.s V_5 + IL_0020: ldloc.3 + IL_0021: stloc.s V_6 + IL_0023: ldloc.s V_5 + IL_0025: ldloc.s V_6 + IL_0027: cgt + IL_0029: ldloc.s V_5 + IL_002b: ldloc.s V_6 + IL_002d: clt + IL_002f: sub + IL_0030: stloc.0 + IL_0031: ldloc.0 + IL_0032: ldc.i4.0 + IL_0033: bge.s IL_0037 + + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldloc.0 + IL_0038: ldc.i4.0 + IL_0039: ble.s IL_003d + + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0042: stloc.s V_7 + IL_0044: ldarg.0 + IL_0045: ldfld int32 assembly/Point::y@ + IL_004a: stloc.s V_8 + IL_004c: ldarg.1 + IL_004d: ldfld int32 assembly/Point::y@ + IL_0052: stloc.s V_9 + IL_0054: ldloc.s V_7 + IL_0056: stloc.s V_10 + IL_0058: ldloc.s V_8 + IL_005a: stloc.s V_11 + IL_005c: ldloc.s V_9 + IL_005e: stloc.s V_12 + IL_0060: ldloc.s V_11 + IL_0062: ldloc.s V_12 + IL_0064: cgt + IL_0066: ldloc.s V_11 + IL_0068: ldloc.s V_12 + IL_006a: clt + IL_006c: sub + IL_006d: ret + + IL_006e: ldc.i4.1 + IL_006f: ret + + IL_0070: ldarg.1 + IL_0071: brfalse.s IL_0075 + + IL_0073: ldc.i4.m1 + IL_0074: ret + + IL_0075: ldc.i4.0 + IL_0076: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + class assembly/Point V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5, + class [runtime]System.Collections.IComparer V_6, + int32 V_7, + int32 V_8, + class [runtime]System.Collections.IComparer V_9, + int32 V_10, + int32 V_11, + class [runtime]System.Collections.IComparer V_12, + int32 V_13, + int32 V_14) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_007a + + IL_000c: ldarg.1 + IL_000d: unbox.any assembly/Point + IL_0012: brfalse.s IL_0078 + + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/Point::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 assembly/Point::x@ + IL_0024: stloc.s V_5 + IL_0026: ldloc.3 + IL_0027: stloc.s V_6 + IL_0029: ldloc.s V_4 + IL_002b: stloc.s V_7 + IL_002d: ldloc.s V_5 + IL_002f: stloc.s V_8 + IL_0031: ldloc.s V_7 + IL_0033: ldloc.s V_8 + IL_0035: cgt + IL_0037: ldloc.s V_7 + IL_0039: ldloc.s V_8 + IL_003b: clt + IL_003d: sub + IL_003e: stloc.2 + IL_003f: ldloc.2 + IL_0040: ldc.i4.0 + IL_0041: bge.s IL_0045 + + IL_0043: ldloc.2 + IL_0044: ret + + IL_0045: ldloc.2 + IL_0046: ldc.i4.0 + IL_0047: ble.s IL_004b + + IL_0049: ldloc.2 + IL_004a: ret + + IL_004b: ldarg.2 + IL_004c: stloc.s V_9 + IL_004e: ldarg.0 + IL_004f: ldfld int32 assembly/Point::y@ + IL_0054: stloc.s V_10 + IL_0056: ldloc.1 + IL_0057: ldfld int32 assembly/Point::y@ + IL_005c: stloc.s V_11 + IL_005e: ldloc.s V_9 + IL_0060: stloc.s V_12 + IL_0062: ldloc.s V_10 + IL_0064: stloc.s V_13 + IL_0066: ldloc.s V_11 + IL_0068: stloc.s V_14 + IL_006a: ldloc.s V_13 + IL_006c: ldloc.s V_14 + IL_006e: cgt + IL_0070: ldloc.s V_13 + IL_0072: ldloc.s V_14 + IL_0074: clt + IL_0076: sub + IL_0077: ret + + IL_0078: ldc.i4.1 + IL_0079: ret + + IL_007a: ldarg.1 + IL_007b: unbox.any assembly/Point + IL_0080: brfalse.s IL_0084 + + IL_0082: ldc.i4.m1 + IL_0083: ret + + IL_0084: ldc.i4.0 + IL_0085: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + int32 V_2, + class [runtime]System.Collections.IEqualityComparer V_3, + class [runtime]System.Collections.IEqualityComparer V_4, + int32 V_5, + class [runtime]System.Collections.IEqualityComparer V_6) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0042 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: stloc.s V_4 + IL_0028: ldarg.0 + IL_0029: ldfld int32 assembly/Point::x@ + IL_002e: stloc.s V_5 + IL_0030: ldloc.s V_4 + IL_0032: stloc.s V_6 + IL_0034: ldloc.s V_5 + IL_0036: ldloc.0 + IL_0037: ldc.i4.6 + IL_0038: shl + IL_0039: ldloc.0 + IL_003a: ldc.i4.2 + IL_003b: shr + IL_003c: add + IL_003d: add + IL_003e: add + IL_003f: stloc.0 + IL_0040: ldloc.0 + IL_0041: ret + + IL_0042: ldc.i4.0 + IL_0043: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IEqualityComparer V_4, + class [runtime]System.Collections.IEqualityComparer V_5, + int32 V_6, + int32 V_7, + class [runtime]System.Collections.IEqualityComparer V_8) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0043 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0041 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: stloc.1 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::x@ + IL_0010: stloc.2 + IL_0011: ldloc.0 + IL_0012: ldfld int32 assembly/Point::x@ + IL_0017: stloc.3 + IL_0018: ldloc.1 + IL_0019: stloc.s V_4 + IL_001b: ldloc.2 + IL_001c: ldloc.3 + IL_001d: ceq + IL_001f: brfalse.s IL_003f + + IL_0021: ldarg.2 + IL_0022: stloc.s V_5 + IL_0024: ldarg.0 + IL_0025: ldfld int32 assembly/Point::y@ + IL_002a: stloc.s V_6 + IL_002c: ldloc.0 + IL_002d: ldfld int32 assembly/Point::y@ + IL_0032: stloc.s V_7 + IL_0034: ldloc.s V_5 + IL_0036: stloc.s V_8 + IL_0038: ldloc.s V_6 + IL_003a: ldloc.s V_7 + IL_003c: ceq + IL_003e: ret + + IL_003f: ldc.i4.0 + IL_0040: ret + + IL_0041: ldc.i4.0 + IL_0042: ret + + IL_0043: ldarg.1 + IL_0044: ldnull + IL_0045: cgt.un + IL_0047: ldc.i4.0 + IL_0048: ceq + IL_004a: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6, + native int V_7, + int32 V_8, + native int V_9, + int32 V_10) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + 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: stloc.s V_5 + IL_001a: ldloc.s V_4 + IL_001c: stloc.s V_6 + IL_001e: ldloc.s V_5 + IL_0020: ldloc.s V_6 + IL_0022: conv.i + IL_0023: sizeof [runtime]System.Int32 + IL_0029: mul + IL_002a: add + IL_002b: ldobj [runtime]System.Int32 + IL_0030: ldloc.1 + IL_0031: stloc.s V_7 + IL_0033: ldc.i4.1 + IL_0034: stloc.s V_8 + IL_0036: ldloc.s V_7 + IL_0038: stloc.s V_9 + IL_003a: ldloc.s V_8 + IL_003c: stloc.s V_10 + IL_003e: ldloc.s V_9 + IL_0040: ldloc.s V_10 + IL_0042: conv.i + IL_0043: sizeof [runtime]System.Int32 + IL_0049: mul + IL_004a: add + IL_004b: ldobj [runtime]System.Int32 + IL_0050: add + IL_0051: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + 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 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64[] V_2, + float64& pinned V_3, + native int V_4, + int32 V_5, + native int V_6, + int32 V_7, + native int V_8, + int32 V_9, + native int V_10, + int32 V_11) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: stloc.2 + IL_0069: ldloc.2 + IL_006a: brfalse.s IL_0086 + + IL_006c: ldloc.2 + IL_006d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0072: brfalse.s IL_0081 + + IL_0074: ldloc.2 + IL_0075: ldc.i4.0 + IL_0076: ldelema [runtime]System.Double + IL_007b: stloc.3 + IL_007c: ldloc.3 + IL_007d: conv.i + IL_007e: nop + IL_007f: br.s IL_0089 + + IL_0081: ldc.i4.0 + IL_0082: conv.i + IL_0083: nop + IL_0084: br.s IL_0089 + + IL_0086: ldc.i4.0 + IL_0087: conv.i + IL_0088: nop + IL_0089: stloc.1 + 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: stloc.s V_6 + IL_0094: ldloc.s V_5 + IL_0096: stloc.s V_7 + IL_0098: ldloc.s V_6 + IL_009a: ldloc.s V_7 + IL_009c: conv.i + IL_009d: sizeof [runtime]System.Double + IL_00a3: mul + IL_00a4: add + IL_00a5: ldobj [runtime]System.Double + IL_00aa: ldloc.1 + IL_00ab: stloc.s V_8 + IL_00ad: ldc.i4.1 + IL_00ae: stloc.s V_9 + IL_00b0: ldloc.s V_8 + IL_00b2: stloc.s V_10 + IL_00b4: ldloc.s V_9 + IL_00b6: stloc.s V_11 + IL_00b8: ldloc.s V_10 + IL_00ba: ldloc.s V_11 + IL_00bc: conv.i + IL_00bd: sizeof [runtime]System.Double + IL_00c3: mul + IL_00c4: add + IL_00c5: ldobj [runtime]System.Double + IL_00ca: add + IL_00cb: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6, + native int V_7, + int32 V_8, + native int V_9, + int32 V_10) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + 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: stloc.s V_5 + IL_007a: ldloc.s V_4 + IL_007c: stloc.s V_6 + IL_007e: ldloc.s V_5 + IL_0080: ldloc.s V_6 + IL_0082: conv.i + IL_0083: sizeof [runtime]System.Double + IL_0089: mul + IL_008a: add + IL_008b: ldobj [runtime]System.Double + IL_0090: ldloc.1 + IL_0091: stloc.s V_7 + IL_0093: ldc.i4.1 + IL_0094: stloc.s V_8 + IL_0096: ldloc.s V_7 + IL_0098: stloc.s V_9 + IL_009a: ldloc.s V_8 + IL_009c: stloc.s V_10 + IL_009e: ldloc.s V_9 + IL_00a0: ldloc.s V_10 + IL_00a2: conv.i + IL_00a3: sizeof [runtime]System.Double + IL_00a9: mul + IL_00aa: add + IL_00ab: ldobj [runtime]System.Double + IL_00b0: add + IL_00b1: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (string V_0, + native int V_1, + string pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6, + native int V_7, + int32 V_8, + native int V_9, + int32 V_10) + IL_0000: ldstr "Hello World" + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.2 + IL_0008: ldloc.2 + IL_0009: brfalse.s IL_0016 + + IL_000b: ldloc.2 + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: nop + IL_0014: br.s IL_0018 + + IL_0016: ldloc.2 + IL_0017: nop + IL_0018: stloc.1 + 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: stloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: stloc.s V_6 + IL_0025: ldloc.s V_5 + IL_0027: ldloc.s V_6 + IL_0029: conv.i + IL_002a: sizeof [runtime]System.Char + IL_0030: mul + IL_0031: add + IL_0032: ldobj [runtime]System.Char + IL_0037: ldloc.1 + IL_0038: stloc.s V_7 + IL_003a: ldc.i4.1 + IL_003b: stloc.s V_8 + IL_003d: ldloc.s V_7 + IL_003f: stloc.s V_9 + IL_0041: ldloc.s V_8 + IL_0043: stloc.s V_10 + IL_0045: ldloc.s V_9 + IL_0047: ldloc.s V_10 + IL_0049: conv.i + IL_004a: sizeof [runtime]System.Char + IL_0050: mul + IL_0051: add + IL_0052: ldobj [runtime]System.Char + IL_0057: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_005c: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.release.bsl new file mode 100644 index 00000000000..ab7bca6340a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.release.bsl @@ -0,0 +1,911 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0057 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0055 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.s V_4 + IL_0037: ldarg.0 + IL_0038: ldfld int32 assembly/Point::y@ + IL_003d: stloc.s V_5 + IL_003f: ldarg.1 + IL_0040: ldfld int32 assembly/Point::y@ + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_5 + IL_0049: ldloc.s V_6 + IL_004b: cgt + IL_004d: ldloc.s V_5 + IL_004f: ldloc.s V_6 + IL_0051: clt + IL_0053: sub + IL_0054: ret + + IL_0055: ldc.i4.1 + IL_0056: ret + + IL_0057: ldarg.1 + IL_0058: brfalse.s IL_005c + + IL_005a: ldc.i4.m1 + IL_005b: ret + + IL_005c: ldc.i4.0 + IL_005d: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + class assembly/Point V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5, + class [runtime]System.Collections.IComparer V_6, + int32 V_7, + int32 V_8) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0063 + + IL_000c: ldarg.1 + IL_000d: unbox.any assembly/Point + IL_0012: brfalse.s IL_0061 + + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/Point::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 assembly/Point::x@ + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.s V_5 + IL_002a: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: clt + IL_0032: sub + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a + + IL_0038: ldloc.2 + IL_0039: ret + + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 + + IL_003e: ldloc.2 + IL_003f: ret + + IL_0040: ldarg.2 + IL_0041: stloc.s V_6 + IL_0043: ldarg.0 + IL_0044: ldfld int32 assembly/Point::y@ + IL_0049: stloc.s V_7 + IL_004b: ldloc.1 + IL_004c: ldfld int32 assembly/Point::y@ + IL_0051: stloc.s V_8 + IL_0053: ldloc.s V_7 + IL_0055: ldloc.s V_8 + IL_0057: cgt + IL_0059: ldloc.s V_7 + IL_005b: ldloc.s V_8 + IL_005d: clt + IL_005f: sub + IL_0060: ret + + IL_0061: ldc.i4.1 + IL_0062: ret + + IL_0063: ldarg.1 + IL_0064: unbox.any assembly/Point + IL_0069: brfalse.s IL_006d + + IL_006b: ldc.i4.m1 + IL_006c: ret + + IL_006d: ldc.i4.0 + IL_006e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/Point::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002f + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002d + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: stloc.1 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::x@ + IL_0010: ldloc.0 + IL_0011: ldfld int32 assembly/Point::x@ + IL_0016: ceq + IL_0018: brfalse.s IL_002b + + IL_001a: ldarg.2 + IL_001b: stloc.2 + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/Point::y@ + IL_0022: ldloc.0 + IL_0023: ldfld int32 assembly/Point::y@ + IL_0028: ceq + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldarg.1 + IL_0030: ldnull + IL_0031: cgt.un + IL_0033: ldc.i4.0 + IL_0034: ceq + IL_0036: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + 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 [runtime]System.Int32 + IL_0021: mul + IL_0022: add + IL_0023: ldobj [runtime]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 [runtime]System.Int32 + IL_0039: mul + IL_003a: add + IL_003b: ldobj [runtime]System.Int32 + IL_0040: add + IL_0041: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + 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 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64[] V_2, + float64& pinned V_3, + native int V_4, + int32 V_5, + native int V_6, + int32 V_7) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: stloc.2 + IL_0069: ldloc.2 + IL_006a: brfalse.s IL_0086 + + IL_006c: ldloc.2 + IL_006d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0072: brfalse.s IL_0081 + + IL_0074: ldloc.2 + IL_0075: ldc.i4.0 + IL_0076: ldelema [runtime]System.Double + IL_007b: stloc.3 + IL_007c: ldloc.3 + IL_007d: conv.i + IL_007e: nop + IL_007f: br.s IL_0089 + + IL_0081: ldc.i4.0 + IL_0082: conv.i + IL_0083: nop + IL_0084: br.s IL_0089 + + IL_0086: ldc.i4.0 + IL_0087: conv.i + IL_0088: nop + IL_0089: stloc.1 + 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 [runtime]System.Double + IL_009b: mul + IL_009c: add + IL_009d: ldobj [runtime]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 [runtime]System.Double + IL_00b3: mul + IL_00b4: add + IL_00b5: ldobj [runtime]System.Double + IL_00ba: add + IL_00bb: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + 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 [runtime]System.Double + IL_0081: mul + IL_0082: add + IL_0083: ldobj [runtime]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 [runtime]System.Double + IL_0099: mul + IL_009a: add + IL_009b: ldobj [runtime]System.Double + IL_00a0: add + IL_00a1: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (string V_0, + native int V_1, + string pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldstr "Hello World" + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.2 + IL_0008: ldloc.2 + IL_0009: brfalse.s IL_0016 + + IL_000b: ldloc.2 + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: nop + IL_0014: br.s IL_0018 + + IL_0016: ldloc.2 + IL_0017: nop + IL_0018: stloc.1 + 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 [runtime]System.Char + IL_0028: mul + IL_0029: add + IL_002a: ldobj [runtime]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 [runtime]System.Char + IL_0040: mul + IL_0041: add + IL_0042: ldobj [runtime]System.Char + IL_0047: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_004c: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.debug.bsl new file mode 100644 index 00000000000..bda000c5fe3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.debug.bsl @@ -0,0 +1,935 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6, + class [runtime]System.Collections.IComparer V_7, + int32 V_8, + int32 V_9, + class [runtime]System.Collections.IComparer V_10, + int32 V_11, + int32 V_12) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0070 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_006e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: stloc.s V_4 + IL_001d: ldloc.2 + IL_001e: stloc.s V_5 + IL_0020: ldloc.3 + IL_0021: stloc.s V_6 + IL_0023: ldloc.s V_5 + IL_0025: ldloc.s V_6 + IL_0027: cgt + IL_0029: ldloc.s V_5 + IL_002b: ldloc.s V_6 + IL_002d: clt + IL_002f: sub + IL_0030: stloc.0 + IL_0031: ldloc.0 + IL_0032: ldc.i4.0 + IL_0033: bge.s IL_0037 + + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldloc.0 + IL_0038: ldc.i4.0 + IL_0039: ble.s IL_003d + + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0042: stloc.s V_7 + IL_0044: ldarg.0 + IL_0045: ldfld int32 assembly/Point::y@ + IL_004a: stloc.s V_8 + IL_004c: ldarg.1 + IL_004d: ldfld int32 assembly/Point::y@ + IL_0052: stloc.s V_9 + IL_0054: ldloc.s V_7 + IL_0056: stloc.s V_10 + IL_0058: ldloc.s V_8 + IL_005a: stloc.s V_11 + IL_005c: ldloc.s V_9 + IL_005e: stloc.s V_12 + IL_0060: ldloc.s V_11 + IL_0062: ldloc.s V_12 + IL_0064: cgt + IL_0066: ldloc.s V_11 + IL_0068: ldloc.s V_12 + IL_006a: clt + IL_006c: sub + IL_006d: ret + + IL_006e: ldc.i4.1 + IL_006f: ret + + IL_0070: ldarg.1 + IL_0071: brfalse.s IL_0075 + + IL_0073: ldc.i4.m1 + IL_0074: ret + + IL_0075: ldc.i4.0 + IL_0076: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + class assembly/Point V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5, + class [runtime]System.Collections.IComparer V_6, + int32 V_7, + int32 V_8, + class [runtime]System.Collections.IComparer V_9, + int32 V_10, + int32 V_11, + class [runtime]System.Collections.IComparer V_12, + int32 V_13, + int32 V_14) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_007a + + IL_000c: ldarg.1 + IL_000d: unbox.any assembly/Point + IL_0012: brfalse.s IL_0078 + + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/Point::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 assembly/Point::x@ + IL_0024: stloc.s V_5 + IL_0026: ldloc.3 + IL_0027: stloc.s V_6 + IL_0029: ldloc.s V_4 + IL_002b: stloc.s V_7 + IL_002d: ldloc.s V_5 + IL_002f: stloc.s V_8 + IL_0031: ldloc.s V_7 + IL_0033: ldloc.s V_8 + IL_0035: cgt + IL_0037: ldloc.s V_7 + IL_0039: ldloc.s V_8 + IL_003b: clt + IL_003d: sub + IL_003e: stloc.2 + IL_003f: ldloc.2 + IL_0040: ldc.i4.0 + IL_0041: bge.s IL_0045 + + IL_0043: ldloc.2 + IL_0044: ret + + IL_0045: ldloc.2 + IL_0046: ldc.i4.0 + IL_0047: ble.s IL_004b + + IL_0049: ldloc.2 + IL_004a: ret + + IL_004b: ldarg.2 + IL_004c: stloc.s V_9 + IL_004e: ldarg.0 + IL_004f: ldfld int32 assembly/Point::y@ + IL_0054: stloc.s V_10 + IL_0056: ldloc.1 + IL_0057: ldfld int32 assembly/Point::y@ + IL_005c: stloc.s V_11 + IL_005e: ldloc.s V_9 + IL_0060: stloc.s V_12 + IL_0062: ldloc.s V_10 + IL_0064: stloc.s V_13 + IL_0066: ldloc.s V_11 + IL_0068: stloc.s V_14 + IL_006a: ldloc.s V_13 + IL_006c: ldloc.s V_14 + IL_006e: cgt + IL_0070: ldloc.s V_13 + IL_0072: ldloc.s V_14 + IL_0074: clt + IL_0076: sub + IL_0077: ret + + IL_0078: ldc.i4.1 + IL_0079: ret + + IL_007a: ldarg.1 + IL_007b: unbox.any assembly/Point + IL_0080: brfalse.s IL_0084 + + IL_0082: ldc.i4.m1 + IL_0083: ret + + IL_0084: ldc.i4.0 + IL_0085: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + int32 V_2, + class [runtime]System.Collections.IEqualityComparer V_3, + class [runtime]System.Collections.IEqualityComparer V_4, + int32 V_5, + class [runtime]System.Collections.IEqualityComparer V_6) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0042 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: stloc.s V_4 + IL_0028: ldarg.0 + IL_0029: ldfld int32 assembly/Point::x@ + IL_002e: stloc.s V_5 + IL_0030: ldloc.s V_4 + IL_0032: stloc.s V_6 + IL_0034: ldloc.s V_5 + IL_0036: ldloc.0 + IL_0037: ldc.i4.6 + IL_0038: shl + IL_0039: ldloc.0 + IL_003a: ldc.i4.2 + IL_003b: shr + IL_003c: add + IL_003d: add + IL_003e: add + IL_003f: stloc.0 + IL_0040: ldloc.0 + IL_0041: ret + + IL_0042: ldc.i4.0 + IL_0043: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IEqualityComparer V_4, + class [runtime]System.Collections.IEqualityComparer V_5, + int32 V_6, + int32 V_7, + class [runtime]System.Collections.IEqualityComparer V_8) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0043 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0041 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: stloc.1 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::x@ + IL_0010: stloc.2 + IL_0011: ldloc.0 + IL_0012: ldfld int32 assembly/Point::x@ + IL_0017: stloc.3 + IL_0018: ldloc.1 + IL_0019: stloc.s V_4 + IL_001b: ldloc.2 + IL_001c: ldloc.3 + IL_001d: ceq + IL_001f: brfalse.s IL_003f + + IL_0021: ldarg.2 + IL_0022: stloc.s V_5 + IL_0024: ldarg.0 + IL_0025: ldfld int32 assembly/Point::y@ + IL_002a: stloc.s V_6 + IL_002c: ldloc.0 + IL_002d: ldfld int32 assembly/Point::y@ + IL_0032: stloc.s V_7 + IL_0034: ldloc.s V_5 + IL_0036: stloc.s V_8 + IL_0038: ldloc.s V_6 + IL_003a: ldloc.s V_7 + IL_003c: ceq + IL_003e: ret + + IL_003f: ldc.i4.0 + IL_0040: ret + + IL_0041: ldc.i4.0 + IL_0042: ret + + IL_0043: ldarg.1 + IL_0044: ldnull + IL_0045: cgt.un + IL_0047: ldc.i4.0 + IL_0048: ceq + IL_004a: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6, + native int V_7, + int32 V_8, + native int V_9, + int32 V_10) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + 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: stloc.s V_5 + IL_001a: ldloc.s V_4 + IL_001c: stloc.s V_6 + IL_001e: ldloc.s V_5 + IL_0020: ldloc.s V_6 + IL_0022: conv.i + IL_0023: sizeof [runtime]System.Int32 + IL_0029: mul + IL_002a: add + IL_002b: ldobj [runtime]System.Int32 + IL_0030: ldloc.1 + IL_0031: stloc.s V_7 + IL_0033: ldc.i4.1 + IL_0034: stloc.s V_8 + IL_0036: ldloc.s V_7 + IL_0038: stloc.s V_9 + IL_003a: ldloc.s V_8 + IL_003c: stloc.s V_10 + IL_003e: ldloc.s V_9 + IL_0040: ldloc.s V_10 + IL_0042: conv.i + IL_0043: sizeof [runtime]System.Int32 + IL_0049: mul + IL_004a: add + IL_004b: ldobj [runtime]System.Int32 + IL_0050: add + IL_0051: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + 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 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64[] V_2, + float64& pinned V_3, + native int V_4, + int32 V_5, + native int V_6, + int32 V_7, + native int V_8, + int32 V_9, + native int V_10, + int32 V_11) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: stloc.2 + IL_0069: ldloc.2 + IL_006a: brfalse.s IL_0086 + + IL_006c: ldloc.2 + IL_006d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0072: brfalse.s IL_0081 + + IL_0074: ldloc.2 + IL_0075: ldc.i4.0 + IL_0076: ldelema [runtime]System.Double + IL_007b: stloc.3 + IL_007c: ldloc.3 + IL_007d: conv.i + IL_007e: nop + IL_007f: br.s IL_0089 + + IL_0081: ldc.i4.0 + IL_0082: conv.i + IL_0083: nop + IL_0084: br.s IL_0089 + + IL_0086: ldc.i4.0 + IL_0087: conv.i + IL_0088: nop + IL_0089: stloc.1 + 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: stloc.s V_6 + IL_0094: ldloc.s V_5 + IL_0096: stloc.s V_7 + IL_0098: ldloc.s V_6 + IL_009a: ldloc.s V_7 + IL_009c: conv.i + IL_009d: sizeof [runtime]System.Double + IL_00a3: mul + IL_00a4: add + IL_00a5: ldobj [runtime]System.Double + IL_00aa: ldloc.1 + IL_00ab: stloc.s V_8 + IL_00ad: ldc.i4.1 + IL_00ae: stloc.s V_9 + IL_00b0: ldloc.s V_8 + IL_00b2: stloc.s V_10 + IL_00b4: ldloc.s V_9 + IL_00b6: stloc.s V_11 + IL_00b8: ldloc.s V_10 + IL_00ba: ldloc.s V_11 + IL_00bc: conv.i + IL_00bd: sizeof [runtime]System.Double + IL_00c3: mul + IL_00c4: add + IL_00c5: ldobj [runtime]System.Double + IL_00ca: add + IL_00cb: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6, + native int V_7, + int32 V_8, + native int V_9, + int32 V_10) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + 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: stloc.s V_5 + IL_007a: ldloc.s V_4 + IL_007c: stloc.s V_6 + IL_007e: ldloc.s V_5 + IL_0080: ldloc.s V_6 + IL_0082: conv.i + IL_0083: sizeof [runtime]System.Double + IL_0089: mul + IL_008a: add + IL_008b: ldobj [runtime]System.Double + IL_0090: ldloc.1 + IL_0091: stloc.s V_7 + IL_0093: ldc.i4.1 + IL_0094: stloc.s V_8 + IL_0096: ldloc.s V_7 + IL_0098: stloc.s V_9 + IL_009a: ldloc.s V_8 + IL_009c: stloc.s V_10 + IL_009e: ldloc.s V_9 + IL_00a0: ldloc.s V_10 + IL_00a2: conv.i + IL_00a3: sizeof [runtime]System.Double + IL_00a9: mul + IL_00aa: add + IL_00ab: ldobj [runtime]System.Double + IL_00b0: add + IL_00b1: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (string V_0, + native int V_1, + string pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6, + native int V_7, + int32 V_8, + native int V_9, + int32 V_10) + IL_0000: ldstr "Hello World" + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.2 + IL_0008: ldloc.2 + IL_0009: brfalse.s IL_0016 + + IL_000b: ldloc.2 + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: nop + IL_0014: br.s IL_0018 + + IL_0016: ldloc.2 + IL_0017: nop + IL_0018: stloc.1 + 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: stloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: stloc.s V_6 + IL_0025: ldloc.s V_5 + IL_0027: ldloc.s V_6 + IL_0029: conv.i + IL_002a: sizeof [runtime]System.Char + IL_0030: mul + IL_0031: add + IL_0032: ldobj [runtime]System.Char + IL_0037: ldloc.1 + IL_0038: stloc.s V_7 + IL_003a: ldc.i4.1 + IL_003b: stloc.s V_8 + IL_003d: ldloc.s V_7 + IL_003f: stloc.s V_9 + IL_0041: ldloc.s V_8 + IL_0043: stloc.s V_10 + IL_0045: ldloc.s V_9 + IL_0047: ldloc.s V_10 + IL_0049: conv.i + IL_004a: sizeof [runtime]System.Char + IL_0050: mul + IL_0051: add + IL_0052: ldobj [runtime]System.Char + IL_0057: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_005c: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.release.bsl new file mode 100644 index 00000000000..d0244dfedf7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.release.bsl @@ -0,0 +1,821 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0057 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0055 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.s V_4 + IL_0037: ldarg.0 + IL_0038: ldfld int32 assembly/Point::y@ + IL_003d: stloc.s V_5 + IL_003f: ldarg.1 + IL_0040: ldfld int32 assembly/Point::y@ + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_5 + IL_0049: ldloc.s V_6 + IL_004b: cgt + IL_004d: ldloc.s V_5 + IL_004f: ldloc.s V_6 + IL_0051: clt + IL_0053: sub + IL_0054: ret + + IL_0055: ldc.i4.1 + IL_0056: ret + + IL_0057: ldarg.1 + IL_0058: brfalse.s IL_005c + + IL_005a: ldc.i4.m1 + IL_005b: ret + + IL_005c: ldc.i4.0 + IL_005d: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + class assembly/Point V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5, + class [runtime]System.Collections.IComparer V_6, + int32 V_7, + int32 V_8) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0063 + + IL_000c: ldarg.1 + IL_000d: unbox.any assembly/Point + IL_0012: brfalse.s IL_0061 + + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/Point::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 assembly/Point::x@ + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.s V_5 + IL_002a: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: clt + IL_0032: sub + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a + + IL_0038: ldloc.2 + IL_0039: ret + + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 + + IL_003e: ldloc.2 + IL_003f: ret + + IL_0040: ldarg.2 + IL_0041: stloc.s V_6 + IL_0043: ldarg.0 + IL_0044: ldfld int32 assembly/Point::y@ + IL_0049: stloc.s V_7 + IL_004b: ldloc.1 + IL_004c: ldfld int32 assembly/Point::y@ + IL_0051: stloc.s V_8 + IL_0053: ldloc.s V_7 + IL_0055: ldloc.s V_8 + IL_0057: cgt + IL_0059: ldloc.s V_7 + IL_005b: ldloc.s V_8 + IL_005d: clt + IL_005f: sub + IL_0060: ret + + IL_0061: ldc.i4.1 + IL_0062: ret + + IL_0063: ldarg.1 + IL_0064: unbox.any assembly/Point + IL_0069: brfalse.s IL_006d + + IL_006b: ldc.i4.m1 + IL_006c: ret + + IL_006d: ldc.i4.0 + IL_006e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/Point::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002f + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002d + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: stloc.1 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::x@ + IL_0010: ldloc.0 + IL_0011: ldfld int32 assembly/Point::x@ + IL_0016: ceq + IL_0018: brfalse.s IL_002b + + IL_001a: ldarg.2 + IL_001b: stloc.2 + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/Point::y@ + IL_0022: ldloc.0 + IL_0023: ldfld int32 assembly/Point::y@ + IL_0028: ceq + IL_002a: ret + + IL_002b: ldc.i4.0 + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldarg.1 + IL_0030: ldnull + IL_0031: cgt.un + IL_0033: ldc.i4.0 + IL_0034: ceq + IL_0036: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + 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 [runtime]System.Int32 + IL_0021: mul + IL_0022: add + IL_0023: ldobj [runtime]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 [runtime]System.Int32 + IL_0039: mul + IL_003a: add + IL_003b: ldobj [runtime]System.Int32 + IL_0040: add + IL_0041: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + 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 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64[] V_2, + float64& pinned V_3, + native int V_4, + int32 V_5, + native int V_6, + int32 V_7) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: stloc.2 + IL_0069: ldloc.2 + IL_006a: brfalse.s IL_0086 + + IL_006c: ldloc.2 + IL_006d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0072: brfalse.s IL_0081 + + IL_0074: ldloc.2 + IL_0075: ldc.i4.0 + IL_0076: ldelema [runtime]System.Double + IL_007b: stloc.3 + IL_007c: ldloc.3 + IL_007d: conv.i + IL_007e: nop + IL_007f: br.s IL_0089 + + IL_0081: ldc.i4.0 + IL_0082: conv.i + IL_0083: nop + IL_0084: br.s IL_0089 + + IL_0086: ldc.i4.0 + IL_0087: conv.i + IL_0088: nop + IL_0089: stloc.1 + 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 [runtime]System.Double + IL_009b: mul + IL_009c: add + IL_009d: ldobj [runtime]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 [runtime]System.Double + IL_00b3: mul + IL_00b4: add + IL_00b5: ldobj [runtime]System.Double + IL_00ba: add + IL_00bb: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + 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 [runtime]System.Double + IL_0081: mul + IL_0082: add + IL_0083: ldobj [runtime]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 [runtime]System.Double + IL_0099: mul + IL_009a: add + IL_009b: ldobj [runtime]System.Double + IL_00a0: add + IL_00a1: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (string V_0, + native int V_1, + string pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldstr "Hello World" + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.2 + IL_0008: ldloc.2 + IL_0009: brfalse.s IL_0016 + + IL_000b: ldloc.2 + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: nop + IL_0014: br.s IL_0018 + + IL_0016: ldloc.2 + IL_0017: nop + IL_0018: stloc.1 + 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 [runtime]System.Char + IL_0028: mul + IL_0029: add + IL_002a: ldobj [runtime]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 [runtime]System.Char + IL_0040: mul + IL_0041: add + IL_0042: ldobj [runtime]System.Char + IL_0047: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_004c: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.debug.bsl new file mode 100644 index 00000000000..5ce65a01960 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.debug.bsl @@ -0,0 +1,821 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/Point + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/Point::x@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/Point::x@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/Point + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + 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 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: nop + IL_0068: ldloc.0 + IL_0069: brfalse.s IL_0085 + + IL_006b: ldloc.0 + IL_006c: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0071: brfalse.s IL_0080 + + IL_0073: ldloc.0 + IL_0074: ldc.i4.0 + IL_0075: ldelema [runtime]System.Double + IL_007a: stloc.2 + IL_007b: ldloc.2 + IL_007c: conv.i + IL_007d: nop + IL_007e: br.s IL_0088 + + IL_0080: ldc.i4.0 + IL_0081: conv.i + IL_0082: nop + IL_0083: br.s IL_0088 + + IL_0085: ldc.i4.0 + IL_0086: conv.i + IL_0087: nop + IL_0088: stloc.1 + IL_0089: ldloc.1 + IL_008a: ldc.i4.0 + IL_008b: conv.i + IL_008c: sizeof [runtime]System.Double + IL_0092: mul + IL_0093: add + IL_0094: ldobj [runtime]System.Double + IL_0099: ldloc.1 + IL_009a: ldc.i4.1 + IL_009b: conv.i + IL_009c: sizeof [runtime]System.Double + IL_00a2: mul + IL_00a3: add + IL_00a4: ldobj [runtime]System.Double + IL_00a9: add + IL_00aa: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: ldc.i4.0 + IL_0074: conv.i + IL_0075: sizeof [runtime]System.Double + IL_007b: mul + IL_007c: add + IL_007d: ldobj [runtime]System.Double + IL_0082: ldloc.1 + IL_0083: ldc.i4.1 + IL_0084: conv.i + IL_0085: sizeof [runtime]System.Double + IL_008b: mul + IL_008c: add + IL_008d: ldobj [runtime]System.Double + IL_0092: add + IL_0093: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (native int V_0, + string pinned V_1) + IL_0000: nop + IL_0001: ldstr "Hello World" + IL_0006: stloc.1 + IL_0007: ldstr "Hello World" + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: stloc.0 + IL_0014: ldloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i + IL_0017: sizeof [runtime]System.Char + IL_001d: mul + IL_001e: add + IL_001f: ldobj [runtime]System.Char + IL_0024: ldloc.0 + IL_0025: ldc.i4.1 + IL_0026: conv.i + IL_0027: sizeof [runtime]System.Char + IL_002d: mul + IL_002e: add + IL_002f: ldobj [runtime]System.Char + IL_0034: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0039: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.release.bsl new file mode 100644 index 00000000000..9b4153c5532 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.release.bsl @@ -0,0 +1,821 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/Point + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/Point::x@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/Point::x@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/Point + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0007: stloc.0 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: nop + IL_0068: ldloc.0 + IL_0069: brfalse.s IL_0085 + + IL_006b: ldloc.0 + IL_006c: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0071: brfalse.s IL_0080 + + IL_0073: ldloc.0 + IL_0074: ldc.i4.0 + IL_0075: ldelema [runtime]System.Double + IL_007a: stloc.2 + IL_007b: ldloc.2 + IL_007c: conv.i + IL_007d: nop + IL_007e: br.s IL_0088 + + IL_0080: ldc.i4.0 + IL_0081: conv.i + IL_0082: nop + IL_0083: br.s IL_0088 + + IL_0085: ldc.i4.0 + IL_0086: conv.i + IL_0087: nop + IL_0088: stloc.1 + IL_0089: ldloc.1 + IL_008a: ldc.i4.0 + IL_008b: conv.i + IL_008c: sizeof [runtime]System.Double + IL_0092: mul + IL_0093: add + IL_0094: ldobj [runtime]System.Double + IL_0099: ldloc.1 + IL_009a: ldc.i4.1 + IL_009b: conv.i + IL_009c: sizeof [runtime]System.Double + IL_00a2: mul + IL_00a3: add + IL_00a4: ldobj [runtime]System.Double + IL_00a9: add + IL_00aa: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: ldc.i4.0 + IL_0074: conv.i + IL_0075: sizeof [runtime]System.Double + IL_007b: mul + IL_007c: add + IL_007d: ldobj [runtime]System.Double + IL_0082: ldloc.1 + IL_0083: ldc.i4.1 + IL_0084: conv.i + IL_0085: sizeof [runtime]System.Double + IL_008b: mul + IL_008c: add + IL_008d: ldobj [runtime]System.Double + IL_0092: add + IL_0093: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (native int V_0, + string pinned V_1) + IL_0000: nop + IL_0001: ldstr "Hello World" + IL_0006: stloc.1 + IL_0007: ldstr "Hello World" + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: stloc.0 + IL_0014: ldloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i + IL_0017: sizeof [runtime]System.Char + IL_001d: mul + IL_001e: add + IL_001f: ldobj [runtime]System.Char + IL_0024: ldloc.0 + IL_0025: ldc.i4.1 + IL_0026: conv.i + IL_0027: sizeof [runtime]System.Char + IL_002d: mul + IL_002e: add + IL_002f: ldobj [runtime]System.Char + IL_0034: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0039: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + extends [runtime]System.Enum +{ + .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 ) + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) + .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +} + +.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute + extends [runtime]System.Attribute +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ + .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 ) + .field private class [runtime]System.Type Type@ + .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0014: ret + } + + .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0006: ret + } + + .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0006: ret + } + + .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes + MemberType() + { + .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 ) + .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + } + .property instance class [runtime]System.Type + Type() + { + .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 ) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.debug.bsl new file mode 100644 index 00000000000..f4025c40141 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.debug.bsl @@ -0,0 +1,731 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/Point + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/Point::x@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/Point::x@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/Point + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + 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 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: nop + IL_0068: ldloc.0 + IL_0069: brfalse.s IL_0085 + + IL_006b: ldloc.0 + IL_006c: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0071: brfalse.s IL_0080 + + IL_0073: ldloc.0 + IL_0074: ldc.i4.0 + IL_0075: ldelema [runtime]System.Double + IL_007a: stloc.2 + IL_007b: ldloc.2 + IL_007c: conv.i + IL_007d: nop + IL_007e: br.s IL_0088 + + IL_0080: ldc.i4.0 + IL_0081: conv.i + IL_0082: nop + IL_0083: br.s IL_0088 + + IL_0085: ldc.i4.0 + IL_0086: conv.i + IL_0087: nop + IL_0088: stloc.1 + IL_0089: ldloc.1 + IL_008a: ldc.i4.0 + IL_008b: conv.i + IL_008c: sizeof [runtime]System.Double + IL_0092: mul + IL_0093: add + IL_0094: ldobj [runtime]System.Double + IL_0099: ldloc.1 + IL_009a: ldc.i4.1 + IL_009b: conv.i + IL_009c: sizeof [runtime]System.Double + IL_00a2: mul + IL_00a3: add + IL_00a4: ldobj [runtime]System.Double + IL_00a9: add + IL_00aa: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: ldc.i4.0 + IL_0074: conv.i + IL_0075: sizeof [runtime]System.Double + IL_007b: mul + IL_007c: add + IL_007d: ldobj [runtime]System.Double + IL_0082: ldloc.1 + IL_0083: ldc.i4.1 + IL_0084: conv.i + IL_0085: sizeof [runtime]System.Double + IL_008b: mul + IL_008c: add + IL_008d: ldobj [runtime]System.Double + IL_0092: add + IL_0093: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (native int V_0, + string pinned V_1) + IL_0000: nop + IL_0001: ldstr "Hello World" + IL_0006: stloc.1 + IL_0007: ldstr "Hello World" + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: stloc.0 + IL_0014: ldloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i + IL_0017: sizeof [runtime]System.Char + IL_001d: mul + IL_001e: add + IL_001f: ldobj [runtime]System.Char + IL_0024: ldloc.0 + IL_0025: ldc.i4.1 + IL_0026: conv.i + IL_0027: sizeof [runtime]System.Char + IL_002d: mul + IL_002e: add + IL_002f: ldobj [runtime]System.Char + IL_0034: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0039: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.release.bsl new file mode 100644 index 00000000000..e618d937c7c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.release.bsl @@ -0,0 +1,731 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested public Point + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]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 [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname instance int32 get_x() 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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_y() 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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .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 assembly/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 + } + + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + class [runtime]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/Point + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/Point::x@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/Point::x@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/Point::y@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/Point::y@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/Point + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 assembly/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Point::Equals(class assembly/Point, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Point obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class assembly/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .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 assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_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 assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0007: stloc.0 + 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 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: nop + IL_0068: ldloc.0 + IL_0069: brfalse.s IL_0085 + + IL_006b: ldloc.0 + IL_006c: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0071: brfalse.s IL_0080 + + IL_0073: ldloc.0 + IL_0074: ldc.i4.0 + IL_0075: ldelema [runtime]System.Double + IL_007a: stloc.2 + IL_007b: ldloc.2 + IL_007c: conv.i + IL_007d: nop + IL_007e: br.s IL_0088 + + IL_0080: ldc.i4.0 + IL_0081: conv.i + IL_0082: nop + IL_0083: br.s IL_0088 + + IL_0085: ldc.i4.0 + IL_0086: conv.i + IL_0087: nop + IL_0088: stloc.1 + IL_0089: ldloc.1 + IL_008a: ldc.i4.0 + IL_008b: conv.i + IL_008c: sizeof [runtime]System.Double + IL_0092: mul + IL_0093: add + IL_0094: ldobj [runtime]System.Double + IL_0099: ldloc.1 + IL_009a: ldc.i4.1 + IL_009b: conv.i + IL_009c: sizeof [runtime]System.Double + IL_00a2: mul + IL_00a3: add + IL_00a4: ldobj [runtime]System.Double + IL_00a9: add + IL_00aa: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: ldc.i4.0 + IL_0074: conv.i + IL_0075: sizeof [runtime]System.Double + IL_007b: mul + IL_007c: add + IL_007d: ldobj [runtime]System.Double + IL_0082: ldloc.1 + IL_0083: ldc.i4.1 + IL_0084: conv.i + IL_0085: sizeof [runtime]System.Double + IL_008b: mul + IL_008c: add + IL_008d: ldobj [runtime]System.Double + IL_0092: add + IL_0093: ret + } + + .method public static class [runtime]System.Tuple`2 pinString() cil managed + { + + .maxstack 6 + .locals init (native int V_0, + string pinned V_1) + IL_0000: nop + IL_0001: ldstr "Hello World" + IL_0006: stloc.1 + IL_0007: ldstr "Hello World" + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: stloc.0 + IL_0014: ldloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i + IL_0017: sizeof [runtime]System.Char + IL_001d: mul + IL_001e: add + IL_001f: ldobj [runtime]System.Char + IL_0024: ldloc.0 + IL_0025: ldc.i4.1 + IL_0026: conv.i + IL_0027: sizeof [runtime]System.Char + IL_002d: mul + IL_002e: add + IL_002f: ldobj [runtime]System.Char + IL_0034: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0039: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs index 3f17c4d1db2..4390225b850 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs @@ -11,7 +11,6 @@ module TestFunctions = compilation |> withOptions [ "--test:EmitFeeFeeAs100001"; "--nowarn:988"; "--nowarn:3370"] |> asExe - |> withNoOptimize |> withEmbeddedPdb |> withEmbedAllSource |> ignoreWarnings @@ -19,6 +18,7 @@ module TestFunctions = let verifyCompileAndRun compilation = compilation |> verifyCore + |> verifyILBaseline |> compileAndRun let verifyCompilation compilation = @@ -27,252 +27,252 @@ module TestFunctions = |> verifyILBaseline //SOURCE=TestFunction01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction01.exe" # TestFunction01.fs - [] + [] let ``TestFunction01_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction02.exe" # TestFunction02.fs - [] + [] let ``TestFunction02_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction03.exe" # TestFunction03.fs - - [] + [] let ``TestFunction03_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction03b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction03b.exe" # TestFunction03b.fs - - [] + [] let ``TestFunction03b_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction03c.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction03c.exe" # TestFunction03c.fs - - [] + [] let ``TestFunction03c_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction04.exe" # TestFunction04.fs - [] + [] let ``TestFunction04_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction05.exe" # TestFunction05.fs - [] + [] let ``TestFunction05_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction06.exe" # TestFunction06.fs - [] + [] let ``TestFunction06_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction07.exe" # TestFunction07.fs - [] + [] let ``TestFunction07_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction08.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction08.exe" # TestFunction08.fs - [] + [] let ``TestFunction08_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction09.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09.exe" # TestFunction09.fs - [] + [] let ``TestFunction09_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b.exe" # TestFunction09b.fs - [] + [] let ``TestFunction09b_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b1.exe" # TestFunction09b1.fs - [] + [] let ``TestFunction09b1_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b2.exe" # TestFunction09b2.fs - [] + [] let ``TestFunction09b2_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b3.exe" # TestFunction09b3.fs - [] + [] let ``TestFunction09b3_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b4.exe" # TestFunction09b4.fs - [] + [] let ``TestFunction09b4_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction10.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction10.exe" # TestFunction10.fs - - [] + [] let ``TestFunction10_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction11.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction11.exe" # TestFunction11.fs - [] + [] let ``TestFunction11_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction12.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction12.exe" # TestFunction12.fs - [] + [] let ``TestFunction12_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction13.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction13.exe" # TestFunction13.fs - - [] + [] let ``TestFunction13_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction14.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction14.exe" # TestFunction14.fs - - [] + [] let ``TestFunction14_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction15.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction15.exe" # TestFunction15.fs - [] + [] let ``TestFunction15_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction16.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction16.exe" # TestFunction16.fs - - [] + [] let ``TestFunction16_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction17.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction17.exe" # TestFunction17.fs - - [] + [] let ``TestFunction17_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction18.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction18.exe" # TestFunction18.fs - [] + [] let ``TestFunction18_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction19.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction19.exe" # TestFunction19.fs - - [] + [] let ``TestFunction19_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction20.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction20.exe" # TestFunction20.fs - - [] + [] let ``TestFunction20_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction21.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction21.exe" # TestFunction21.fs - - [] + [] let ``TestFunction21_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction22.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22.exe" # TestFunction22.fs - [] + [] let ``TestFunction22_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction22b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22b.exe" # TestFunction22b.fs - [] + [] let ``TestFunction22b_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction22c.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22c.exe" # TestFunction22c.fs - [] + [] let ``TestFunction22c_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction22d.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22d.exe" # TestFunction22d.fs - [] + [] let ``TestFunction22d_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction22e.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22e.exe" # TestFunction22e.fs - [] + [] let ``TestFunction22e_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction22f.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22f.exe" # TestFunction22f.fs - [] + [] let ``TestFunction22f_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction22g.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22g.exe" # TestFunction22g.fs - [] + [] let ``TestFunction22g_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction22h.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22h.exe" # TestFunction22h.fs - - [] + [] let ``TestFunction22h_fs`` compilation = compilation |> getCompilation @@ -281,19 +281,19 @@ module TestFunctions = //SOURCE=TestFunction22h.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22h.exe" # TestFunction22h.fs - //SOURCE=TestFunction23.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction23.exe" # TestFunction23.fs - - [] + [] let ``TestFunction23_fs`` compilation = compilation |> getCompilation |> verifyCompilation //SOURCE=TestFunction24.fs SCFLAGS="-g --optimize-" PEVER=/Exp_Fail COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction24.exe" # TestFunction24.fs - - [] + [] let ``TestFunction24_fs`` compilation = compilation |> getCompilation |> withLangVersion70 - |> verifyCompilation + |> verifyCompileAndRun // Verify Execution 13043 run it built not optimized with debug [] @@ -303,12 +303,3 @@ module TestFunctions = |> withDebug |> withRealInternalSignatureOff |> verifyCompileAndRun - - // Verify Execution 13043 run it built not optimized with debug - [] - let ``Verify13043_Baselines`` compilation = - compilation - |> getCompilation - |> withDebug - |> withRealInternalSignatureOff - |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl similarity index 57% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl index 3198f042779..58a96db5e27 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.debug.bsl @@ -33,136 +33,6 @@ 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 f@8 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s l - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s _arg1 - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { @@ -183,8 +53,9 @@ .maxstack 8 IL_0000: ldarg.1 - IL_0001: call bool assembly::condition(int32) - IL_0006: ret + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret } .method private specialname rtspecialname static void .cctor() cil managed @@ -218,8 +89,9 @@ .maxstack 8 IL_0000: ldarg.1 - IL_0001: call bool assembly::condition(int32) - IL_0006: ret + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret } .method private specialname rtspecialname static void .cctor() cil managed @@ -251,20 +123,106 @@ IL_0004: ret } + .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2) + IL_0000: nop + 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: brfalse.s IL_000b + + IL_0009: br.s IL_0011 + + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0010: ret + + IL_0011: ldarg.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 + IL_001a: ldloc.0 + IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0020: stloc.2 + IL_0021: nop + IL_0022: ldarg.0 + IL_0023: ldloc.2 + IL_0024: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0029: brfalse.s IL_0033 + + IL_002b: ldarg.0 + IL_002c: ldloc.1 + IL_002d: starg.s l + IL_002f: starg.s condition + IL_0031: br.s IL_0000 + + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003a: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldarg.1 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0009: ret + } + + .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0006: brfalse.s IL_000a + + IL_0008: br.s IL_0010 + + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000f: ret + + IL_0010: ldarg.1 + IL_0011: stloc.0 + IL_0012: ldloc.0 + IL_0013: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_001f: stloc.2 + IL_0020: nop + IL_0021: ldarg.0 + IL_0022: ldloc.2 + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: brfalse.s IL_0032 + + IL_002a: ldarg.0 + IL_002b: ldloc.1 + IL_002c: starg.s _arg1 + IL_002e: starg.s condition + IL_0030: br.s IL_0000 + + IL_0032: ldloc.2 + IL_0033: ldloc.1 + IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0039: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -272,15 +230,14 @@ .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 ) .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldarg.1 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0009: ret } .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed @@ -337,9 +294,6 @@ .entrypoint .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 @@ -350,36 +304,30 @@ 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 ''.$assembly::list@3 - IL_001d: stloc.0 - IL_001e: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance - IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() - IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_0017: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_001c: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0021: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_002d: dup - IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 - IL_0033: stloc.1 - IL_0034: ldstr "Match: %A" - IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() - IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_004d: pop - IL_004e: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance - IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() - IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_002b: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0030: ldstr "Match: %A" + IL_0035: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_003f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0044: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0049: pop + IL_004a: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_004f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0054: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_005d: dup - IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 - IL_0063: stloc.2 - IL_0064: ldstr "Function: %A" - IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() - IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_007d: pop - IL_007e: ret + IL_0059: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_005e: ldstr "Function: %A" + IL_0063: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_0068: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_006d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0072: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0077: pop + IL_0078: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..dc747ca00e0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.release.bsl @@ -0,0 +1,384 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public static bool condition(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2) + IL_0000: nop + 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: brfalse.s IL_000b + + IL_0009: br.s IL_0011 + + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0010: ret + + IL_0011: ldarg.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 + IL_001a: ldloc.0 + IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0020: stloc.2 + IL_0021: nop + IL_0022: ldarg.0 + IL_0023: ldloc.2 + IL_0024: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0029: brfalse.s IL_0033 + + IL_002b: ldarg.0 + IL_002c: ldloc.1 + IL_002d: starg.s l + IL_002f: starg.s condition + IL_0031: br.s IL_0000 + + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003a: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldarg.1 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0009: ret + } + + .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0006: brfalse.s IL_000a + + IL_0008: br.s IL_0010 + + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000f: ret + + IL_0010: ldarg.1 + IL_0011: stloc.0 + IL_0012: ldloc.0 + IL_0013: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_001f: stloc.2 + IL_0020: nop + IL_0021: ldarg.0 + IL_0022: ldloc.2 + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: brfalse.s IL_0032 + + IL_002a: ldarg.0 + IL_002b: ldloc.1 + IL_002c: starg.s _arg1 + IL_002e: starg.s condition + IL_0030: br.s IL_0000 + + IL_0032: ldloc.2 + IL_0033: ldloc.1 + IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0039: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldarg.1 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0009: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0005: ret + } + + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> get_format@1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::format@1 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0005: ret + } + + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> 'get_format@1-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::'format@1-1' + IL_0005: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + list() + { + .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 assembly::get_list() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + matchResult() + { + .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 assembly::get_matchResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> + format@1() + { + .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.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> assembly::get_format@1() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + functionResult() + { + .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 assembly::get_functionResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> + 'format@1-1'() + { + .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.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> assembly::'get_format@1-1'() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> format@1 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> 'format@1-1' + .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 public static void main@() cil managed + { + .entrypoint + + .maxstack 6 + 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: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_001c: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0021: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_002b: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0030: ldstr "Match: %A" + IL_0035: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003a: stsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::format@1 + IL_003f: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0044: call class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> assembly::get_format@1() + IL_0049: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_004e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0053: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0058: pop + IL_0059: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_005e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0063: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0068: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_006d: ldstr "Function: %A" + IL_0072: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_0077: stsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::'format@1-1' + IL_007c: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0081: call class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> assembly::'get_format@1-1'() + IL_0086: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_008b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0090: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0095: pop + IL_0096: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.debug.bsl deleted file mode 100644 index f6fd1e69d10..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.debug.bsl +++ /dev/null @@ -1,405 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed Verify13043 - 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 f@8 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/f@8::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/f@8::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s l - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/'f@27-1'::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/'f@27-1'::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s _arg1 - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class Verify13043/matchResult@38 @_instance - .method assembly specialname rtspecialname instance void .ctor() 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: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool Verify13043::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Verify13043/matchResult@38::.ctor() - IL_0005: stsfld class Verify13043/matchResult@38 Verify13043/matchResult@38::@_instance - IL_000a: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class Verify13043/functionResult@43 @_instance - .method assembly specialname rtspecialname instance void .ctor() 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: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool Verify13043::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Verify13043/functionResult@43::.ctor() - IL_0005: stsfld class Verify13043/functionResult@43 Verify13043/functionResult@43::@_instance - IL_000a: ret - } - - } - - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Verify13043::list@3 - IL_0005: ret - } - - .method public static bool condition(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.3 - IL_0002: clt - IL_0004: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, - 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 ) - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) - IL_0000: ldarg.0 - IL_0001: newobj instance void Verify13043/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, - 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 ) - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) - IL_0000: ldarg.0 - IL_0001: newobj instance void Verify13043/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret - } - - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Verify13043::matchResult@38 - IL_0005: ret - } - - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Verify13043::functionResult@43 - IL_0005: ret - } - - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - list() - { - .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 Verify13043::get_list() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - matchResult() - { - .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 Verify13043::get_matchResult() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - functionResult() - { - .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 Verify13043::get_functionResult() - } -} - -.class private abstract auto ansi sealed ''.$Verify13043 - extends [runtime]System.Object -{ - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 - .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 public static void main@() cil managed - { - .entrypoint - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) - 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 ''.$Verify13043::list@3 - IL_001d: stloc.0 - IL_001e: ldsfld class Verify13043/matchResult@38 Verify13043/matchResult@38::@_instance - IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_list() - IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_002d: dup - IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Verify13043::matchResult@38 - IL_0033: stloc.1 - IL_0034: ldstr "Match: %A" - IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_matchResult() - IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_004d: pop - IL_004e: ldsfld class Verify13043/functionResult@43 Verify13043/functionResult@43::@_instance - IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_list() - IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_005d: dup - IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Verify13043::functionResult@43 - IL_0063: stloc.2 - IL_0064: ldstr "Function: %A" - IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_functionResult() - IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_007d: pop - IL_007e: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.release.bsl deleted file mode 100644 index f6fd1e69d10..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.release.bsl +++ /dev/null @@ -1,405 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed Verify13043 - 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 f@8 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/f@8::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/f@8::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s l - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/'f@27-1'::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/'f@27-1'::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s _arg1 - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class Verify13043/matchResult@38 @_instance - .method assembly specialname rtspecialname instance void .ctor() 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: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool Verify13043::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Verify13043/matchResult@38::.ctor() - IL_0005: stsfld class Verify13043/matchResult@38 Verify13043/matchResult@38::@_instance - IL_000a: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class Verify13043/functionResult@43 @_instance - .method assembly specialname rtspecialname instance void .ctor() 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: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool Verify13043::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Verify13043/functionResult@43::.ctor() - IL_0005: stsfld class Verify13043/functionResult@43 Verify13043/functionResult@43::@_instance - IL_000a: ret - } - - } - - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Verify13043::list@3 - IL_0005: ret - } - - .method public static bool condition(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.3 - IL_0002: clt - IL_0004: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, - 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 ) - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) - IL_0000: ldarg.0 - IL_0001: newobj instance void Verify13043/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, - 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 ) - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) - IL_0000: ldarg.0 - IL_0001: newobj instance void Verify13043/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret - } - - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Verify13043::matchResult@38 - IL_0005: ret - } - - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Verify13043::functionResult@43 - IL_0005: ret - } - - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - list() - { - .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 Verify13043::get_list() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - matchResult() - { - .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 Verify13043::get_matchResult() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - functionResult() - { - .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 Verify13043::get_functionResult() - } -} - -.class private abstract auto ansi sealed ''.$Verify13043 - extends [runtime]System.Object -{ - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 - .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 public static void main@() cil managed - { - .entrypoint - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) - 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 ''.$Verify13043::list@3 - IL_001d: stloc.0 - IL_001e: ldsfld class Verify13043/matchResult@38 Verify13043/matchResult@38::@_instance - IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_list() - IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_002d: dup - IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Verify13043::matchResult@38 - IL_0033: stloc.1 - IL_0034: ldstr "Match: %A" - IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_matchResult() - IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_004d: pop - IL_004e: ldsfld class Verify13043/functionResult@43 Verify13043/functionResult@43::@_instance - IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_list() - IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_005d: dup - IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Verify13043::functionResult@43 - IL_0063: stloc.2 - IL_0064: ldstr "Function: %A" - IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_functionResult() - IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_007d: pop - IL_007e: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl similarity index 57% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl index 3198f042779..58a96db5e27 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.debug.bsl @@ -33,136 +33,6 @@ 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 f@8 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s l - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s _arg1 - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { @@ -183,8 +53,9 @@ .maxstack 8 IL_0000: ldarg.1 - IL_0001: call bool assembly::condition(int32) - IL_0006: ret + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret } .method private specialname rtspecialname static void .cctor() cil managed @@ -218,8 +89,9 @@ .maxstack 8 IL_0000: ldarg.1 - IL_0001: call bool assembly::condition(int32) - IL_0006: ret + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret } .method private specialname rtspecialname static void .cctor() cil managed @@ -251,20 +123,106 @@ IL_0004: ret } + .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2) + IL_0000: nop + 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: brfalse.s IL_000b + + IL_0009: br.s IL_0011 + + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0010: ret + + IL_0011: ldarg.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 + IL_001a: ldloc.0 + IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0020: stloc.2 + IL_0021: nop + IL_0022: ldarg.0 + IL_0023: ldloc.2 + IL_0024: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0029: brfalse.s IL_0033 + + IL_002b: ldarg.0 + IL_002c: ldloc.1 + IL_002d: starg.s l + IL_002f: starg.s condition + IL_0031: br.s IL_0000 + + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003a: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldarg.1 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0009: ret + } + + .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0006: brfalse.s IL_000a + + IL_0008: br.s IL_0010 + + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000f: ret + + IL_0010: ldarg.1 + IL_0011: stloc.0 + IL_0012: ldloc.0 + IL_0013: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_001f: stloc.2 + IL_0020: nop + IL_0021: ldarg.0 + IL_0022: ldloc.2 + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: brfalse.s IL_0032 + + IL_002a: ldarg.0 + IL_002b: ldloc.1 + IL_002c: starg.s _arg1 + IL_002e: starg.s condition + IL_0030: br.s IL_0000 + + IL_0032: ldloc.2 + IL_0033: ldloc.1 + IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0039: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -272,15 +230,14 @@ .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 ) .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldarg.1 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0009: ret } .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed @@ -337,9 +294,6 @@ .entrypoint .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 @@ -350,36 +304,30 @@ 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 ''.$assembly::list@3 - IL_001d: stloc.0 - IL_001e: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance - IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() - IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_0017: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_001c: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0021: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_002d: dup - IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 - IL_0033: stloc.1 - IL_0034: ldstr "Match: %A" - IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() - IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_004d: pop - IL_004e: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance - IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() - IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_002b: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0030: ldstr "Match: %A" + IL_0035: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_003f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0044: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0049: pop + IL_004a: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_004f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0054: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_005d: dup - IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 - IL_0063: stloc.2 - IL_0064: ldstr "Function: %A" - IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() - IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_007d: pop - IL_007e: ret + IL_0059: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_005e: ldstr "Function: %A" + IL_0063: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_0068: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_006d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0072: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0077: pop + IL_0078: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl new file mode 100644 index 00000000000..dc747ca00e0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.release.bsl @@ -0,0 +1,384 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1: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 +} +.module assembly.exe + +.imagebase {value} +.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 auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() 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: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public static bool condition(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2) + IL_0000: nop + 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: brfalse.s IL_000b + + IL_0009: br.s IL_0011 + + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0010: ret + + IL_0011: ldarg.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 + IL_001a: ldloc.0 + IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0020: stloc.2 + IL_0021: nop + IL_0022: ldarg.0 + IL_0023: ldloc.2 + IL_0024: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0029: brfalse.s IL_0033 + + IL_002b: ldarg.0 + IL_002c: ldloc.1 + IL_002d: starg.s l + IL_002f: starg.s condition + IL_0031: br.s IL_0000 + + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003a: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldarg.1 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0009: ret + } + + .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0006: brfalse.s IL_000a + + IL_0008: br.s IL_0010 + + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000f: ret + + IL_0010: ldarg.1 + IL_0011: stloc.0 + IL_0012: ldloc.0 + IL_0013: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_001f: stloc.2 + IL_0020: nop + IL_0021: ldarg.0 + IL_0022: ldloc.2 + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: brfalse.s IL_0032 + + IL_002a: ldarg.0 + IL_002b: ldloc.1 + IL_002c: starg.s _arg1 + IL_002e: starg.s condition + IL_0030: br.s IL_0000 + + IL_0032: ldloc.2 + IL_0033: ldloc.1 + IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0039: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, 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 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldarg.1 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0009: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0005: ret + } + + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> get_format@1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::format@1 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0005: ret + } + + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> 'get_format@1-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::'format@1-1' + IL_0005: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + list() + { + .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 assembly::get_list() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + matchResult() + { + .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 assembly::get_matchResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> + format@1() + { + .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.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> assembly::get_format@1() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + functionResult() + { + .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 assembly::get_functionResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> + 'format@1-1'() + { + .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.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> assembly::'get_format@1-1'() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> format@1 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> 'format@1-1' + .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 public static void main@() cil managed + { + .entrypoint + + .maxstack 6 + 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: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_001c: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0021: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_002b: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0030: ldstr "Match: %A" + IL_0035: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003a: stsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::format@1 + IL_003f: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0044: call class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> assembly::get_format@1() + IL_0049: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_004e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0053: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0058: pop + IL_0059: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_005e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0063: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0068: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_006d: ldstr "Function: %A" + IL_0072: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_0077: stsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::'format@1-1' + IL_007c: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0081: call class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> assembly::'get_format@1-1'() + IL_0086: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_008b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0090: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0095: pop + IL_0096: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.debug.bsl deleted file mode 100644 index ffb2898dcf8..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.debug.bsl +++ /dev/null @@ -1,415 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed Verify13043 - 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 f@8 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/f@8::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/f@8::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s l - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/'f@27-1'::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/'f@27-1'::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s _arg1 - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class Verify13043/matchResult@38 @_instance - .method assembly specialname rtspecialname instance void .ctor() 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: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool Verify13043::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Verify13043/matchResult@38::.ctor() - IL_0005: stsfld class Verify13043/matchResult@38 Verify13043/matchResult@38::@_instance - IL_000a: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class Verify13043/functionResult@43 @_instance - .method assembly specialname rtspecialname instance void .ctor() 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: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool Verify13043::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Verify13043/functionResult@43::.ctor() - IL_0005: stsfld class Verify13043/functionResult@43 Verify13043/functionResult@43::@_instance - IL_000a: ret - } - - } - - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::list@3 - IL_0005: ret - } - - .method public static bool condition(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.3 - IL_0002: clt - IL_0004: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, - 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 ) - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) - IL_0000: ldarg.0 - IL_0001: newobj instance void Verify13043/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, - 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 ) - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) - IL_0000: ldarg.0 - IL_0001: newobj instance void Verify13043/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret - } - - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::matchResult@38 - IL_0005: ret - } - - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::functionResult@43 - IL_0005: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$Verify13043::init@ - IL_0006: ldsfld int32 ''.$Verify13043::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 6 - 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: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::list@3 - IL_001c: ldsfld class Verify13043/matchResult@38 Verify13043/matchResult@38::@_instance - IL_0021: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_list() - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_002b: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::matchResult@38 - IL_0030: ldstr "Match: %A" - IL_0035: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_003f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_matchResult() - IL_0044: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_0049: pop - IL_004a: ldsfld class Verify13043/functionResult@43 Verify13043/functionResult@43::@_instance - IL_004f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_list() - IL_0054: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0059: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::functionResult@43 - IL_005e: ldstr "Function: %A" - IL_0063: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_0068: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_006d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_functionResult() - IL_0072: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_0077: pop - IL_0078: ret - } - - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - list() - { - .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 Verify13043::get_list() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - matchResult() - { - .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 Verify13043::get_matchResult() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - functionResult() - { - .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 Verify13043::get_functionResult() - } -} - -.class private abstract auto ansi sealed ''.$Verify13043 - 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 public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void Verify13043::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.release.bsl deleted file mode 100644 index ffb2898dcf8..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.release.bsl +++ /dev/null @@ -1,415 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.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 FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed Verify13043 - 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 f@8 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/f@8::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/f@8::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s l - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) 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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/'f@27-1'::condition - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) - IL_0000: ldarg.1 - 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: brfalse.s IL_000c - - IL_000a: br.s IL_0012 - - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0011: ret - - IL_0012: ldloc.0 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0021: stloc.3 - IL_0022: nop - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Verify13043/'f@27-1'::condition - IL_0029: ldloc.3 - IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002f: brfalse.s IL_0036 - - IL_0031: ldloc.2 - IL_0032: starg.s _arg1 - IL_0034: br.s IL_0000 - - IL_0036: ldloc.3 - IL_0037: ldloc.2 - 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: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class Verify13043/matchResult@38 @_instance - .method assembly specialname rtspecialname instance void .ctor() 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: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool Verify13043::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Verify13043/matchResult@38::.ctor() - IL_0005: stsfld class Verify13043/matchResult@38 Verify13043/matchResult@38::@_instance - IL_000a: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class Verify13043/functionResult@43 @_instance - .method assembly specialname rtspecialname instance void .ctor() 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: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool Verify13043::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Verify13043/functionResult@43::.ctor() - IL_0005: stsfld class Verify13043/functionResult@43 Verify13043/functionResult@43::@_instance - IL_000a: ret - } - - } - - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::list@3 - IL_0005: ret - } - - .method public static bool condition(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.3 - IL_0002: clt - IL_0004: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, - 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 ) - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) - IL_0000: ldarg.0 - IL_0001: newobj instance void Verify13043/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, - 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 ) - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) - IL_0000: ldarg.0 - IL_0001: newobj instance void Verify13043/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldarg.1 - IL_0009: tail. - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) - IL_0010: ret - } - - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::matchResult@38 - IL_0005: ret - } - - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::functionResult@43 - IL_0005: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$Verify13043::init@ - IL_0006: ldsfld int32 ''.$Verify13043::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 6 - 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: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::list@3 - IL_001c: ldsfld class Verify13043/matchResult@38 Verify13043/matchResult@38::@_instance - IL_0021: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_list() - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_002b: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::matchResult@38 - IL_0030: ldstr "Match: %A" - IL_0035: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_003a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_003f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_matchResult() - IL_0044: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_0049: pop - IL_004a: ldsfld class Verify13043/functionResult@43 Verify13043/functionResult@43::@_instance - IL_004f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_list() - IL_0054: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0059: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::functionResult@43 - IL_005e: ldstr "Function: %A" - IL_0063: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]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_0068: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_006d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Verify13043::get_functionResult() - IL_0072: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_0077: pop - IL_0078: ret - } - - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - list() - { - .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 Verify13043::get_list() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - matchResult() - { - .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 Verify13043::get_matchResult() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - functionResult() - { - .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 Verify13043::get_functionResult() - } -} - -.class private abstract auto ansi sealed ''.$Verify13043 - 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 public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void Verify13043::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/Signatures/SigGenerationRoundTripTests.fs b/tests/FSharp.Compiler.ComponentTests/Signatures/SigGenerationRoundTripTests.fs index 469f9fda0e7..d70fb546637 100644 --- a/tests/FSharp.Compiler.ComponentTests/Signatures/SigGenerationRoundTripTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Signatures/SigGenerationRoundTripTests.fs @@ -6,24 +6,24 @@ open FSharp.Test.Compiler open System.IO let testCasesDir = Path.Combine(__SOURCE_DIRECTORY__,"TestCasesForGenerationRoundTrip") -let allTestCases = - Directory.EnumerateFiles(testCasesDir) - |> Seq.toArray +let allTestCases = + Directory.EnumerateFiles(testCasesDir) + |> Seq.toArray |> Array.map Path.GetFileName |> Array.map (fun f -> [|f :> obj|]) [] [] -let ``Generate and compile`` implFileName = +let ``Generate and compile`` implFileName = let implContents = File.ReadAllText (Path.Combine(testCasesDir,implFileName)) - let generatedSignature = - Fs implContents + let generatedSignature = + Fs implContents |> withLangVersion80 |> withDefines ["TESTS_AS_APP";"COMPILED"] - |> printSignatures + |> printSignatures - Fsi generatedSignature + Fsi generatedSignature |> withAdditionalSourceFile (FsSource implContents) |> withLangVersion80 |> withDefines ["TESTS_AS_APP";"COMPILED"] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalAnalysis/SymbolicOperators/E_LessThanDotOpenParen001.fs b/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalAnalysis/SymbolicOperators/E_LessThanDotOpenParen001.fs deleted file mode 100644 index a8cf50ea24b..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/LexicalAnalysis/SymbolicOperators/E_LessThanDotOpenParen001.fs +++ /dev/null @@ -1,31 +0,0 @@ -// #Regression #Conformance #LexicalAnalysis #Operators -// Regression test for FSHARP1.0:4805 -// We are not really after the actual error messages here (some of them have been omitted), rather we -// want to verify we do not crash! -//This construct causes code to be less generic than indicated by the type annotations\. The type variable 'S has been constrained to be type 'int' -//This code is not sufficiently generic\. The type variable \^T when \^T : \(static member \( \+ \) : \^T \* \^T -> \^a\) could not be generalized because it would escape its scope - -type public TestType<'T,'S>() = - - member public s.Value with get() = Unchecked.defaultof<'T> - static member public (+++) (a : TestType<'T,'S>, b : TestType<'T,'S>) = a.Value - static member public (+++) (a : TestType<'T,'S>, b : 'T) = b - static member public (+++) (a : 'T, b : TestType<'T,'S>) = a - static member public (+++) (a : TestType<'T,'S>, b : 'T -> 'S) = a.Value - static member public (+++) (a : 'S -> 'T, b : TestType<'T,'S>) = (a 17) + b.Value - -let inline (+++) (a : ^a) (b : ^b) = ((^a or ^b): (static member (+++): ^a * ^b -> ^c) (a,b) ) - -let tt0 = TestType() -let tt1 = TestType() - -let f (x : string) = 18 - -let a0 = tt0 +++ tt1 -let a1 = tt0 +++ 11 -let a2 = 12 +++ tt1 -let a3 = tt0 +++ (fun x -> "18") -let a4 = f +++ tt0 - -let a5 = TestType.(+++)(f, tt0) -let a6 = TestType.(+++)((fun (x : string) -> 18), tt0) diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index cee7c81b0d7..7de76521d83 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -228,42 +228,43 @@ module rec Compiler = | true -> Some (File.ReadAllText path) | _ -> None - let createCompilationUnit baselineSuffix directoryPath filename = + let createCompilationUnit sourceBaselineSuffix ilBaselineSuffixes directoryPath filename = let outputDirectoryPath = createTemporaryDirectory().FullName let sourceFilePath = normalizePathSeparator (directoryPath ++ filename) - let fsBslFilePath = sourceFilePath + baselineSuffix + ".err.bsl" + let fsBslFilePath = sourceFilePath + sourceBaselineSuffix + ".err.bsl" let ilBslFilePath = let ilBslPaths = [| + for baselineSuffix in ilBaselineSuffixes do #if DEBUG #if NETCOREAPP - yield sourceFilePath + baselineSuffix + ".il.netcore.debug.bsl" - yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" + yield sourceFilePath + baselineSuffix + ".il.netcore.debug.bsl" + yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" #else - yield sourceFilePath + baselineSuffix + ".il.net472.debug.bsl" - yield sourceFilePath + baselineSuffix + ".il.net472.bsl" + yield sourceFilePath + baselineSuffix + ".il.net472.debug.bsl" + yield sourceFilePath + baselineSuffix + ".il.net472.bsl" #endif - yield sourceFilePath + baselineSuffix + ".il.debug.bsl" - yield sourceFilePath + baselineSuffix + ".il.bsl" + yield sourceFilePath + baselineSuffix + ".il.debug.bsl" + yield sourceFilePath + baselineSuffix + ".il.bsl" #else #if NETCOREAPP - yield sourceFilePath + baselineSuffix + ".il.netcore.release.bsl" - yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" + yield sourceFilePath + baselineSuffix + ".il.netcore.release.bsl" + yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" #else - yield sourceFilePath + baselineSuffix + ".il.net472.release.bsl" - yield sourceFilePath + baselineSuffix + ".il.net472.bsl" + yield sourceFilePath + baselineSuffix + ".il.net472.release.bsl" + yield sourceFilePath + baselineSuffix + ".il.net472.bsl" #endif - yield sourceFilePath + baselineSuffix + ".il.release.bsl" - yield sourceFilePath + baselineSuffix + ".il.bsl" + yield sourceFilePath + baselineSuffix + ".il.release.bsl" + yield sourceFilePath + baselineSuffix + ".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 + baselineSuffix + ".il.bsl" + | None -> sourceFilePath + sourceBaselineSuffix + ".il.bsl" let fsOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".err")) let ilOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".il")) @@ -314,7 +315,7 @@ module rec Compiler = let results = fsFiles - |> Array.map (fun fs -> (createCompilationUnit baselineSuffix directoryPath fs) :> obj) + |> Array.map (fun fs -> (createCompilationUnit baselineSuffix [baselineSuffix] directoryPath fs) :> obj) |> Seq.map (fun c -> [| c |]) results diff --git a/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs b/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs index f38a12ebd5a..f0262560cf9 100644 --- a/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs +++ b/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs @@ -130,11 +130,27 @@ and [] else "" - let realsigBsl = (getBaseline realsig ".RealInternalSignature") - let optimizeBsl = (getBaseline optimize ".Optimize") - let baselineSuffix = Option.defaultValue "" (combineBaselines realsigBsl optimizeBsl) - let compilation = createCompilationUnit baselineSuffix directoryPath fileName - + let rsLabel = ".RealInternalSignature" + let optLabel = ".Optimize" + let realsigBsl = (getBaseline realsig rsLabel) + let optimizeBsl = (getBaseline optimize optLabel) + let sourceBaselineSuffix = Option.defaultValue "" (combineBaselines realsigBsl optimizeBsl) + + let baselineSuffixes = [ + yield Option.defaultValue "" (combineBaselines realsigBsl optimizeBsl) // .RealInternalSignatureOff.OptimizeOff + yield Option.defaultValue "" (combineBaselines realsigBsl (Some (optLabel))) // .RealInternalSignatureOff.Optimize + yield Option.defaultValue "" (combineBaselines (Some rsLabel) optimizeBsl) // .RealInternalSignature.OptimizeOff + yield Option.defaultValue "" (combineBaselines (Some rsLabel) (Some optLabel)) // .RealInternalSignature.Optimize + yield Option.defaultValue "" (combineBaselines realsigBsl None) // .RealInternalSignatureOff + yield Option.defaultValue "" (combineBaselines (Some rsLabel) None) // .RealInternalSignature + yield Option.defaultValue "" (combineBaselines None optimizeBsl) // .OptimizeOff + yield Option.defaultValue "" (combineBaselines None (Some optLabel)) // .Optimize + yield Option.defaultValue "" (combineBaselines None optimizeBsl) // .OptimizeOff + yield Option.defaultValue "" (combineBaselines None (Some optLabel)) // .Optimize + yield "" // + ] + + let compilation = createCompilationUnit sourceBaselineSuffix baselineSuffixes directoryPath fileName compilation |> setRealInternalSignature |> setOptimization override _.ToString(): string = diff --git a/tests/FSharp.Test.Utilities/XunitHelpers.fs b/tests/FSharp.Test.Utilities/XunitHelpers.fs index 3a0049df5a8..981c150b34d 100644 --- a/tests/FSharp.Test.Utilities/XunitHelpers.fs +++ b/tests/FSharp.Test.Utilities/XunitHelpers.fs @@ -34,8 +34,10 @@ type FSharpXunitFramework(sink: IMessageSink) = interface IDisposable with member _.Dispose() = - cleanUpTemporaryDirectoryOfThisTestRun () - base.Dispose() + match Environment.GetEnvironmentVariable("FSHARP_RETAIN_TESTBUILDS") with + | null -> cleanUpTemporaryDirectoryOfThisTestRun () + | _ -> () + base.Dispose() #else diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl index 965a760fe81..11d7d18be88 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl @@ -43,8 +43,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1865::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000059C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x000005A5][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1850-1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1850'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1859-1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1859'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000040][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000A8][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 38b37691559..63cdf028b2e 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -61,8 +61,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerImports+TcConfig-TryResolveLibWithDirectories@558-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000003B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000059C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x000005A5][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1850-1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1850'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1859-1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1859'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000040][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths@2092-3::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000B3][found Char] Unexpected type on the stack. diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs index 7fe5a0db4b4..d4f5c692e05 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs @@ -1104,7 +1104,7 @@ type Generic1InGeneric1<'T>() = extends [runtime]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 ) - .class auto autochar sealed nested assembly beforefieldinit specialname clo@7 + .class auto autochar sealed nested assembly beforefieldinit specialname clo@7 extends [runtime]System.ValueType implements [runtime]System.Runtime.CompilerServices.IAsyncStateMachine, class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.IResumableStateMachine`1> @@ -1132,7 +1132,7 @@ type Generic1InGeneric1<'T>() = class [runtime]System.Exception V_9, class [runtime]System.Exception V_10) IL_0000: ldarg.0 - IL_0001: ldfld int32 valuetype Test/Generic1InGeneric1`1/clo@7::ResumptionPoint + IL_0001: ldfld int32 valuetype Test/Generic1InGeneric1`1/clo@7::ResumptionPoint IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldc.i4.1 @@ -1161,16 +1161,16 @@ type Generic1InGeneric1<'T>() = IL_002c: nop IL_002d: ldarg.0 - IL_002e: ldfld class [runtime]System.Threading.Tasks.Task`1 valuetype Test/Generic1InGeneric1`1/clo@7::computation + IL_002e: ldfld class [runtime]System.Threading.Tasks.Task`1 valuetype Test/Generic1InGeneric1`1/clo@7::computation IL_0033: stloc.3 IL_0034: ldarg.0 IL_0035: ldloc.3 IL_0036: callvirt instance valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1 class [netstandard]System.Threading.Tasks.Task`1::GetAwaiter() - IL_003b: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter + IL_003b: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter IL_0040: ldc.i4.1 IL_0041: stloc.s V_4 IL_0043: ldarg.0 - IL_0044: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter + IL_0044: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter IL_0049: call instance bool valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() IL_004e: brfalse.s IL_0052 @@ -1185,7 +1185,7 @@ type Generic1InGeneric1<'T>() = IL_0059: ldarg.0 IL_005a: ldc.i4.1 - IL_005b: stfld int32 valuetype Test/Generic1InGeneric1`1/clo@7::ResumptionPoint + IL_005b: stfld int32 valuetype Test/Generic1InGeneric1`1/clo@7::ResumptionPoint IL_0060: ldc.i4.0 IL_0061: nop IL_0062: stloc.s V_5 @@ -1199,13 +1199,13 @@ type Generic1InGeneric1<'T>() = IL_006e: brfalse.s IL_0092 IL_0070: ldarg.0 - IL_0071: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter + IL_0071: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter IL_0076: call instance !0 valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() IL_007b: stloc.s V_6 IL_007d: ldloc.s V_6 IL_007f: stloc.s V_7 IL_0081: ldarg.0 - IL_0082: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_0082: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_0087: ldloc.s V_7 IL_0089: stfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result IL_008e: ldc.i4.1 @@ -1213,13 +1213,13 @@ type Generic1InGeneric1<'T>() = IL_0090: br.s IL_00ab IL_0092: ldarg.0 - IL_0093: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_0093: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_0098: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder IL_009d: ldarg.0 - IL_009e: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter + IL_009e: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter IL_00a3: ldarg.0 - IL_00a4: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::AwaitUnsafeOnCompleted,valuetype Test/Generic1InGeneric1`1/clo@7>(!!0&, - !!1&) + IL_00a4: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::AwaitUnsafeOnCompleted,valuetype Test/Generic1InGeneric1`1/clo@7>(!!0&, + !!1&) IL_00a9: ldc.i4.0 IL_00aa: nop IL_00ab: brfalse.s IL_00c1 @@ -1228,7 +1228,7 @@ type Generic1InGeneric1<'T>() = IL_00ae: ldloca.s V_8 IL_00b0: initobj valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 IL_00b6: ldloc.s V_8 - IL_00b8: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter + IL_00b8: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter IL_00bd: ldc.i4.1 IL_00be: nop IL_00bf: br.s IL_00c3 @@ -1240,10 +1240,10 @@ type Generic1InGeneric1<'T>() = IL_00c5: brfalse.s IL_00e4 IL_00c7: ldarg.0 - IL_00c8: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_00c8: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_00cd: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder IL_00d2: ldarg.0 - IL_00d3: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_00d3: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_00d8: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result IL_00dd: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) IL_00e2: leave.s IL_00f2 @@ -1268,7 +1268,7 @@ type Generic1InGeneric1<'T>() = IL_00f9: ret IL_00fa: ldarg.0 - IL_00fb: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_00fb: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_0100: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder IL_0105: ldloc.s V_10 IL_0107: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) @@ -1281,7 +1281,7 @@ type Generic1InGeneric1<'T>() = .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_0001: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_0006: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder IL_000b: ldarg.1 IL_000c: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetStateMachine(class [netstandard]System.Runtime.CompilerServices.IAsyncStateMachine) @@ -1294,7 +1294,7 @@ type Generic1InGeneric1<'T>() = .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 valuetype Test/Generic1InGeneric1`1/clo@7::ResumptionPoint + IL_0001: ldfld int32 valuetype Test/Generic1InGeneric1`1/clo@7::ResumptionPoint IL_0006: ret } @@ -1304,7 +1304,7 @@ type Generic1InGeneric1<'T>() = .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_0001: ldfld valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_0006: ret } @@ -1315,7 +1315,7 @@ type Generic1InGeneric1<'T>() = .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_0002: stfld valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_0007: ret } @@ -1348,26 +1348,26 @@ type Generic1InGeneric1<'T>() = .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 4 - .locals init (valuetype Test/Generic1InGeneric1`1/clo@7 V_0, - valuetype Test/Generic1InGeneric1`1/clo@7& V_1) + .locals init (valuetype Test/Generic1InGeneric1`1/clo@7 V_0, + valuetype Test/Generic1InGeneric1`1/clo@7& V_1) IL_0000: ldloca.s V_0 - IL_0002: initobj valuetype Test/Generic1InGeneric1`1/clo@7 + IL_0002: initobj valuetype Test/Generic1InGeneric1`1/clo@7 IL_0008: ldloca.s V_0 IL_000a: stloc.1 IL_000b: ldloc.1 IL_000c: ldarg.1 - IL_000d: stfld class [runtime]System.Threading.Tasks.Task`1 valuetype Test/Generic1InGeneric1`1/clo@7::computation + IL_000d: stfld class [runtime]System.Threading.Tasks.Task`1 valuetype Test/Generic1InGeneric1`1/clo@7::computation IL_0012: ldloc.1 - IL_0013: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_0013: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_0018: call valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Create() IL_001d: stfld valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder IL_0022: ldloc.1 - IL_0023: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_0023: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_0028: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder IL_002d: ldloc.1 - IL_002e: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Start>(!!0&) + IL_002e: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Start>(!!0&) IL_0033: ldloc.1 - IL_0034: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_0034: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data IL_0039: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder IL_003e: call instance class [netstandard]System.Threading.Tasks.Task`1 valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::get_Task() IL_0043: ret From b2f2065a99c50f8336e34ce51d276b67579bb352 Mon Sep 17 00:00:00 2001 From: progressive-galib <125106402+progressive-galib@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:01:10 +0600 Subject: [PATCH 16/21] "#if" directive around nullness removed fromsrc/Compiler/DependencyManager/DependencyProvider.fs and refactored. (#18207) * /Compiler/TypedTree/TypedTreePickle.fs refactored. "#if" directive around nullness removed from src Related: #18061 (partially addresses) - [x] Release notes entry updated: in `docs/release-notes/.FSharp.Compiler.Service/9.0.200.md`, * try 2 * refactoring * . * . * lets hope this works * . * fantomas tried with a bit of tricks DependencyProvider.fs * fantomas ignore * unformat --------- Co-authored-by: Petr --- .fantomasignore | 3 +++ .../.FSharp.Compiler.Service/9.0.200.md | 4 ++-- src/Compiler/DependencyManager/DependencyProvider.fs | 12 ++++++------ .../DependencyManager/DependencyProvider.fsi | 6 +++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.fantomasignore b/.fantomasignore index b901c74bd99..d1bea49f566 100644 --- a/.fantomasignore +++ b/.fantomasignore @@ -40,6 +40,9 @@ src/Compiler/Checking/SignatureConformance.fs src/Compiler/Checking/TypeHierarchy.fs src/Compiler/Checking/TypeRelations.fs +# nullness-related problems +src/Compiler/DependencyManager/DependencyProvider.fs + # Incorrectly formatted: https://github.com/dotnet/fsharp/pull/14645/commits/49443a67ea8a17670c8a7c80c8bdf91f82231e91 or https://github.com/fsprojects/fantomas/issues/2733 # This CompilerImports.fs behavior is not fixed yet, following up in https://github.com/fsprojects/fantomas/issues/2733 src/Compiler/Driver/CompilerImports.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md index 3908fc98dd5..0a05f20bf45 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.200.md @@ -55,8 +55,8 @@ * Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag ([PR #17871](https://github.com/dotnet/fsharp/pull/17871)) * CheckAndThrow can be invoked only from within Cancellable context ([PR #18037](https://github.com/dotnet/fsharp/pull/18037)) * Make ILTypeDef base type calculation lazy. ([PR #18005](https://github.com/dotnet/fsharp/pull/18005)) -* "#if" directive around nullness removed from src/Compiler/TypedTree/TypedTreePickle.fs and refactored. ([PR #18203](https://github.com/dotnet/fsharp/pull/18203)) +* Removed redundant hash directives around nullness syntax ([Issue #18601](https://github.com/dotnet/fsharp/issues/18061), [PR #18203](https://github.com/dotnet/fsharp/pull/18203), [PR #18207](https://github.com/dotnet/fsharp/pull/18207)) ### Breaking Changes -* Aliasing `StructAttribute` will now produce a warning (part of [Language suggestion #1136](https://github.com/fsharp/fslang-suggestions/issues/1136), [PR #18098](https://github.com/dotnet/fsharp/pull/18098)) \ No newline at end of file +* Aliasing `StructAttribute` will now produce a warning (part of [Language suggestion #1136](https://github.com/fsharp/fslang-suggestions/issues/1136), [PR #18098](https://github.com/dotnet/fsharp/pull/18098)) diff --git a/src/Compiler/DependencyManager/DependencyProvider.fs b/src/Compiler/DependencyManager/DependencyProvider.fs index cc1b47de2ea..1bf72a76e5b 100644 --- a/src/Compiler/DependencyManager/DependencyProvider.fs +++ b/src/Compiler/DependencyManager/DependencyProvider.fs @@ -15,7 +15,7 @@ open System.Collections.Concurrent module Option = /// Convert string into Option string where null and String.Empty result in None - let ofString (s: string MaybeNull) = + let ofString (s: string | null) = match s with | null -> None | "" -> None @@ -607,7 +607,7 @@ type DependencyProvider outputDir: string, reportError: ResolvingErrorReport, path: string - ) : string MaybeNull * IDependencyManagerProvider MaybeNull = + ) : string | null * IDependencyManagerProvider | null = try if path.Contains ":" && not (Path.IsPathRooted path) then let managers = @@ -637,7 +637,7 @@ type DependencyProvider outputDir: string, reportError: ResolvingErrorReport, key: string - ) : IDependencyManagerProvider MaybeNull = + ) : IDependencyManagerProvider | null = try RegisteredDependencyManagers compilerTools (Option.ofString outputDir) reportError |> Map.tryFind key @@ -657,7 +657,7 @@ type DependencyProvider packageManagerTextLines: (string * string) seq, reportError: ResolvingErrorReport, executionTfm: string, - [] executionRid: string MaybeNull, + [] executionRid: string | null, [] implicitIncludeDir: string, [] mainScriptName: string, [] fileName: string, @@ -681,8 +681,8 @@ type DependencyProvider try let executionRid = match executionRid with - | Null -> RidHelpers.platformRid - | NonNull executionRid -> executionRid + | null -> RidHelpers.platformRid + | executionRid -> executionRid Ok( packageManager.ResolveDependencies( diff --git a/src/Compiler/DependencyManager/DependencyProvider.fsi b/src/Compiler/DependencyManager/DependencyProvider.fsi index 4c97224fc90..fffaa9a2026 100644 --- a/src/Compiler/DependencyManager/DependencyProvider.fsi +++ b/src/Compiler/DependencyManager/DependencyProvider.fsi @@ -123,7 +123,7 @@ type DependencyProvider = packageManagerTextLines: (string * string) seq * reportError: ResolvingErrorReport * executionTfm: string * - [] executionRid: string * + [] executionRid: string * [] implicitIncludeDir: string * [] mainScriptName: string * [] fileName: string * @@ -133,9 +133,9 @@ type DependencyProvider = /// Fetch a dependencymanager that supports a specific key member TryFindDependencyManagerByKey: compilerTools: string seq * outputDir: string * reportError: ResolvingErrorReport * key: string -> - IDependencyManagerProvider MaybeNull + IDependencyManagerProvider | null /// TryFindDependencyManagerInPath - given a #r "key:sometext" go and find a DependencyManager that satisfies the key member TryFindDependencyManagerInPath: compilerTools: string seq * outputDir: string * reportError: ResolvingErrorReport * path: string -> - string MaybeNull * IDependencyManagerProvider MaybeNull + string | null * IDependencyManagerProvider | null \ No newline at end of file From 9b345442ddbaa44929a27d63c859bcb70d9aeac2 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Wed, 15 Jan 2025 08:24:19 +0100 Subject: [PATCH 17/21] Enable OpenTelemetry for Desktop target in xUnit tests (#18233) --- tests/FSharp.Test.Utilities/CompilerAssert.fs | 2 -- .../FSharp.Test.Utilities.fsproj | 2 +- tests/FSharp.Test.Utilities/XunitHelpers.fs | 12 +++++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/FSharp.Test.Utilities/CompilerAssert.fs b/tests/FSharp.Test.Utilities/CompilerAssert.fs index 0f7baf597fb..cc5fb4c3e9b 100644 --- a/tests/FSharp.Test.Utilities/CompilerAssert.fs +++ b/tests/FSharp.Test.Utilities/CompilerAssert.fs @@ -59,8 +59,6 @@ module AssemblyResolver = match found() with | None -> Unchecked.defaultof | Some name -> Assembly.Load(name) ) - - do addResolver() #endif type ExecutionOutcome = diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index 5b8f66bac7d..4a255384e07 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -33,7 +33,6 @@ - @@ -46,6 +45,7 @@ + diff --git a/tests/FSharp.Test.Utilities/XunitHelpers.fs b/tests/FSharp.Test.Utilities/XunitHelpers.fs index 981c150b34d..2747bdc5a63 100644 --- a/tests/FSharp.Test.Utilities/XunitHelpers.fs +++ b/tests/FSharp.Test.Utilities/XunitHelpers.fs @@ -31,6 +31,9 @@ type FSharpXunitFramework(sink: IMessageSink) = // This gets executed once per test assembly. MessageSink.sinkWriter |> ignore TestConsole.install() +#if !NETCOREAPP + AssemblyResolver.addResolver () +#endif interface IDisposable with member _.Dispose() = @@ -148,8 +151,10 @@ type FSharpXunitFramework(sink: IMessageSink) = log "FSharpXunitFramework with XUNIT_EXTRAS installing TestConsole redirection" TestConsole.install() -// TODO: Currently does not work with Desktop .NET Framework. Upcoming OpenTelemetry 1.11.0 may change it. -#if NETCOREAPP +#if !NETCOREAPP + AssemblyResolver.addResolver () +#endif + let traceProvider = Sdk.CreateTracerProviderBuilder() .AddSource(ActivityNames.FscSourceName) @@ -157,15 +162,12 @@ type FSharpXunitFramework(sink: IMessageSink) = ResourceBuilder.CreateDefault().AddService(serviceName="F#", serviceVersion = "1.0.0")) .AddOtlpExporter() .Build() -#endif interface IDisposable with member _.Dispose() = cleanUpTemporaryDirectoryOfThisTestRun () -#if NETCOREAPP traceProvider.ForceFlush() |> ignore traceProvider.Dispose() -#endif base.Dispose() override this.CreateDiscoverer (assemblyInfo) = From c73b2160c6b4362fb9419264d6e58604f6eef15a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:01:13 +0100 Subject: [PATCH 18/21] Update dependencies from https://github.com/dotnet/arcade build 20250115.2 (#18240) Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.25058.5 -> To Version 9.0.0-beta.25065.2 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/common/template-guidance.md | 2 +- global.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d005e04efcc..6071737c331 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,14 +42,14 @@ - + https://github.com/dotnet/arcade - 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 + c4bbc67763bf0c5a868862df874079380e647d61 - + https://github.com/dotnet/arcade - 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 + c4bbc67763bf0c5a868862df874079380e647d61 diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md index 5ef6c30ba92..98bbc1ded0b 100644 --- a/eng/common/template-guidance.md +++ b/eng/common/template-guidance.md @@ -57,7 +57,7 @@ extends: Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`). -# Development notes +## Development notes **Folder / file structure** diff --git a/global.json b/global.json index 57489571a22..8fe04b02ff8 100644 --- a/global.json +++ b/global.json @@ -1,10 +1,10 @@ { "sdk": { - "version": "9.0.100", + "version": "9.0.102", "allowPrerelease": true }, "tools": { - "dotnet": "9.0.100", + "dotnet": "9.0.102", "vs": { "version": "17.8", "components": [ @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25058.5", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25065.2", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 8473ce651941f94ed0c93e4c0cc9a3c51d3a8db2 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:15:55 +0100 Subject: [PATCH 19/21] Set Cancellable.token from async computation (#18238) --- docs/release-notes/.FSharp.Compiler.Service/9.0.300.md | 1 + src/Compiler/Driver/CompilerImports.fs | 1 + src/Compiler/Service/BackgroundCompiler.fs | 5 +++-- src/Compiler/Service/TransparentCompiler.fs | 5 +++-- src/Compiler/Utilities/Cancellable.fs | 6 ++++++ src/Compiler/Utilities/Cancellable.fsi | 2 ++ .../ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl | 2 +- ...lverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl | 2 +- .../ilverify_FSharp.Compiler.Service_Release_net9.0.bsl | 2 +- ...erify_FSharp.Compiler.Service_Release_netstandard2.0.bsl | 2 +- 10 files changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index 375263a2a0e..66888c7cebe 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -1,6 +1,7 @@ ### Fixed * Fix Realsig+ generates nested closures with incorrect Generic ([Issue #17797](https://github.com/dotnet/fsharp/issues/17797), [PR #17877](https://github.com/dotnet/fsharp/pull/17877)) +* Set `Cancellable.token` from async computation ([Issue #18235](https://github.com/dotnet/fsharp/issues/18235), [PR #18238](https://github.com/dotnet/fsharp/pull/18238)) ### Added diff --git a/src/Compiler/Driver/CompilerImports.fs b/src/Compiler/Driver/CompilerImports.fs index c54ccc41c58..8478429a452 100644 --- a/src/Compiler/Driver/CompilerImports.fs +++ b/src/Compiler/Driver/CompilerImports.fs @@ -2255,6 +2255,7 @@ and [] TcImports r: AssemblyResolution ) : Async<(_ * (unit -> AvailableImportedAssembly list)) option> = async { + do! Cancellable.UseToken() CheckDisposed() let m = r.originalReference.Range let fileName = r.resolvedPath diff --git a/src/Compiler/Service/BackgroundCompiler.fs b/src/Compiler/Service/BackgroundCompiler.fs index 1089f5774e8..63d147d005b 100644 --- a/src/Compiler/Service/BackgroundCompiler.fs +++ b/src/Compiler/Service/BackgroundCompiler.fs @@ -328,8 +328,8 @@ type internal BackgroundCompiler | FSharpReferencedProject.PEReference(getStamp, delayedReader) -> { new IProjectReference with member x.EvaluateRawContents() = - async { - let! ilReaderOpt = delayedReader.TryGetILModuleReader() |> Cancellable.toAsync + cancellable { + let! ilReaderOpt = delayedReader.TryGetILModuleReader() match ilReaderOpt with | Some ilReader -> @@ -341,6 +341,7 @@ type internal BackgroundCompiler // continue to try to use an on-disk DLL return ProjectAssemblyDataResult.Unavailable false } + |> Cancellable.toAsync member x.TryGetLogicalTimeStamp _ = getStamp () |> Some member x.FileName = delayedReader.OutputFile diff --git a/src/Compiler/Service/TransparentCompiler.fs b/src/Compiler/Service/TransparentCompiler.fs index bc15b6c3b67..f25b75fe99d 100644 --- a/src/Compiler/Service/TransparentCompiler.fs +++ b/src/Compiler/Service/TransparentCompiler.fs @@ -766,8 +766,8 @@ type internal TransparentCompiler | FSharpReferencedProjectSnapshot.PEReference(getStamp, delayedReader) -> { new IProjectReference with member x.EvaluateRawContents() = - async { - let! ilReaderOpt = delayedReader.TryGetILModuleReader() |> Cancellable.toAsync + cancellable { + let! ilReaderOpt = delayedReader.TryGetILModuleReader() match ilReaderOpt with | Some ilReader -> @@ -779,6 +779,7 @@ type internal TransparentCompiler // continue to try to use an on-disk DLL return ProjectAssemblyDataResult.Unavailable false } + |> Cancellable.toAsync member x.TryGetLogicalTimeStamp _ = getStamp () |> Some member x.FileName = delayedReader.OutputFile diff --git a/src/Compiler/Utilities/Cancellable.fs b/src/Compiler/Utilities/Cancellable.fs index 8f14b5ddbfe..9ec81438ca4 100644 --- a/src/Compiler/Utilities/Cancellable.fs +++ b/src/Compiler/Utilities/Cancellable.fs @@ -18,6 +18,12 @@ type Cancellable = static member Token = ensureToken "Token not available outside of Cancellable computation." + static member UseToken() = + async { + let! ct = Async.CancellationToken + tokenHolder.Value <- ValueSome ct + } + static member UsingToken(ct) = let oldCt = tokenHolder.Value tokenHolder.Value <- ValueSome ct diff --git a/src/Compiler/Utilities/Cancellable.fsi b/src/Compiler/Utilities/Cancellable.fsi index c5a8d9627ea..aba96859491 100644 --- a/src/Compiler/Utilities/Cancellable.fsi +++ b/src/Compiler/Utilities/Cancellable.fsi @@ -5,6 +5,8 @@ open System.Threading [] type Cancellable = + static member internal UseToken: unit -> Async + /// For use in testing only. Cancellable.token should be set only by the cancellable computation. static member internal UsingToken: CancellationToken -> IDisposable diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl index d54bcb9419a..d301673c927 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl @@ -21,7 +21,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-796::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-786::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@110::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-508::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 4bbe31fc0d6..1a5e3d85c4a 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -28,7 +28,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-796::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-786::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@110::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl index 11d7d18be88..8c2b6a97465 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl @@ -21,7 +21,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-836::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-830::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-529::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 63cdf028b2e..77ba0d7133e 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -28,7 +28,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-836::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3510-830::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. From 7c598f43e574cd64b4ccdcdc57c5ec071d106d42 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Thu, 16 Jan 2025 09:08:27 -0800 Subject: [PATCH 20/21] Simplify Dependencies a tad (#18236) * simplify tests dependencies * OverallHintExperienceTests --- eng/Versions.props | 1 - .../FSharp.Compiler.Service.Tests/FsiTests.fs | 17 ++++----- .../ManglingNameOfProvidedTypes.fs | 4 +- .../SuggestionBuffer.fs | 2 +- tests/FSharp.Test.Utilities/Assert.fs | 37 +++++++++---------- .../FSharp.Test.Utilities.fsproj | 15 +++----- tests/README.md | 3 +- 7 files changed, 36 insertions(+), 43 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 00bbbc51afb..59f0f6e7cb9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -193,7 +193,6 @@ 2.9.0 2.8.2 3.1.17 - 5.10.3 2.2.0 diff --git a/tests/FSharp.Compiler.Service.Tests/FsiTests.fs b/tests/FSharp.Compiler.Service.Tests/FsiTests.fs index bb3e8407d6f..208f7a465a6 100644 --- a/tests/FSharp.Compiler.Service.Tests/FsiTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/FsiTests.fs @@ -2,7 +2,6 @@ open System open System.IO -open FluentAssertions open FSharp.Compiler.Interactive.Shell open FSharp.Test open Xunit @@ -575,7 +574,7 @@ module FsiTests = fsiSession.AddBoundValue("boundMdArray", arr) let boundValue = fsiSession.GetBoundValues() |> List.exactlyOne Assert.shouldBe typeof boundValue.Value.ReflectionType - boundValue.Value.ReflectionValue.Should().Be(arr, "") |> ignore + Assert.shouldBe arr boundValue.Value.ReflectionValue [] let ``Creation of a bound value succeeds if the value is an array of a built-in reference type``() = @@ -584,7 +583,7 @@ module FsiTests = fsiSession.AddBoundValue("boundMdArray", arr) let boundValue = fsiSession.GetBoundValues() |> List.exactlyOne Assert.shouldBe typeof boundValue.Value.ReflectionType - boundValue.Value.ReflectionValue.Should().Be(arr, "") |> ignore + Assert.shouldBe arr boundValue.Value.ReflectionValue [] let ``Creation of a bound value succeeds if the value is an array of a custom value type``() = @@ -593,7 +592,7 @@ module FsiTests = fsiSession.AddBoundValue("boundMdArray", arr) let boundValue = fsiSession.GetBoundValues() |> List.exactlyOne Assert.shouldBe typeof boundValue.Value.ReflectionType - boundValue.Value.ReflectionValue.Should().Be(arr, "") |> ignore + Assert.shouldBe arr boundValue.Value.ReflectionValue [] let ``Creation of a bound value succeeds if the value is an array of a custom reference type``() = @@ -602,7 +601,7 @@ module FsiTests = fsiSession.AddBoundValue("boundMdArray", arr) let boundValue = fsiSession.GetBoundValues() |> List.exactlyOne Assert.shouldBe typeof boundValue.Value.ReflectionType - boundValue.Value.ReflectionValue.Should().Be(arr, "") |> ignore + Assert.shouldBe arr boundValue.Value.ReflectionValue [] let ``Creation of a bound value succeeds if the value is a multidimensional array of a built-in value type``() = @@ -611,7 +610,7 @@ module FsiTests = fsiSession.AddBoundValue("boundMdArray", mdArr) let boundValue = fsiSession.GetBoundValues() |> List.exactlyOne Assert.shouldBe typeof boundValue.Value.ReflectionType - boundValue.Value.ReflectionValue.Should().Be(mdArr, "") |> ignore + Assert.shouldBe mdArr boundValue.Value.ReflectionValue [] let ``Creation of a bound value succeeds if the value is a multidimensional array of a built-in reference type``() = @@ -620,7 +619,7 @@ module FsiTests = fsiSession.AddBoundValue("boundMdArray", mdArr) let boundValue = fsiSession.GetBoundValues() |> List.exactlyOne Assert.shouldBe typeof boundValue.Value.ReflectionType - boundValue.Value.ReflectionValue.Should().Be(mdArr, "") |> ignore + Assert.shouldBe mdArr boundValue.Value.ReflectionValue [] let ``Creation of a bound value succeeds if the value is a multidimensional array of a custom value type``() = @@ -629,7 +628,7 @@ module FsiTests = fsiSession.AddBoundValue("boundMdArray", mdArr) let boundValue = fsiSession.GetBoundValues() |> List.exactlyOne Assert.shouldBe typeof boundValue.Value.ReflectionType - boundValue.Value.ReflectionValue.Should().Be(mdArr, "") |> ignore + Assert.shouldBe mdArr boundValue.Value.ReflectionValue [] let ``Creation of a bound value succeeds if the value is a multidimensional array of a custom reference type``() = @@ -638,7 +637,7 @@ module FsiTests = fsiSession.AddBoundValue("boundMdArray", mdArr) let boundValue = fsiSession.GetBoundValues() |> List.exactlyOne Assert.shouldBe typeof boundValue.Value.ReflectionType - boundValue.Value.ReflectionValue.Should().Be(mdArr, "") |> ignore + Assert.shouldBe mdArr boundValue.Value.ReflectionValue [] [] diff --git a/tests/FSharp.Compiler.Service.Tests/ManglingNameOfProvidedTypes.fs b/tests/FSharp.Compiler.Service.Tests/ManglingNameOfProvidedTypes.fs index 5f8fd967342..cd728482876 100644 --- a/tests/FSharp.Compiler.Service.Tests/ManglingNameOfProvidedTypes.fs +++ b/tests/FSharp.Compiler.Service.Tests/ManglingNameOfProvidedTypes.fs @@ -32,13 +32,13 @@ type ManglingNamesOfProvidedTypesWithSingleParameter() = member this.DemangleDefaultValue() = let name, parameters = PrettyNaming.DemangleProvidedTypeName "MyNamespace.Test," Assert.shouldBe "MyNamespace.Test" name - Assert.shouldBeEquivalentTo [||] parameters + Assert.shouldBeEmpty parameters [] member this.DemangleNewDefaultValue() = let name, parameters = PrettyNaming.DemangleProvidedTypeName "MyNamespace.Test" Assert.shouldBe "MyNamespace.Test" name - Assert.shouldBeEquivalentTo [||] parameters + Assert.shouldBeEmpty parameters type ManglingNamesOfProvidedTypesWithMultipleParameter() = diff --git a/tests/FSharp.Compiler.Service.Tests/SuggestionBuffer.fs b/tests/FSharp.Compiler.Service.Tests/SuggestionBuffer.fs index 04494592586..bc5c82f0b61 100644 --- a/tests/FSharp.Compiler.Service.Tests/SuggestionBuffer.fs +++ b/tests/FSharp.Compiler.Service.Tests/SuggestionBuffer.fs @@ -41,7 +41,7 @@ module SuggestionBuffer = let results = Array.ofSeq buffer Assert.shouldBeTrue buffer.Disabled - Assert.shouldBeEquivalentTo [||] results + Assert.shouldBeEmpty results [] let BufferShouldOnlyTakeTop5Elements() = diff --git a/tests/FSharp.Test.Utilities/Assert.fs b/tests/FSharp.Test.Utilities/Assert.fs index 41287757a0f..dc1df050fed 100644 --- a/tests/FSharp.Test.Utilities/Assert.fs +++ b/tests/FSharp.Test.Utilities/Assert.fs @@ -1,49 +1,48 @@ namespace FSharp.Test module Assert = - open FluentAssertions open System.Collections open Xunit open System.IO + // Equivalent, with message let inline shouldBeEqualWith (expected : ^T) (message: string) (actual: ^U) = - actual.Should().BeEquivalentTo(expected, message) |> ignore + try + Assert.Equivalent(expected, actual) + with e -> + Assert.True(false, message); let inline shouldBeEquivalentTo (expected : ^T) (actual : ^U) = - actual.Should().BeEquivalentTo(expected, "") |> ignore - - let inline shouldStartWith (expected : string) (actual : string) = - actual.Should().StartWith(expected) |> ignore - - let inline shouldContain (needle : string) (haystack : string) = - haystack.Should().Contain(needle) |> ignore + Assert.Equivalent(expected, actual) - // One fine day, all of the 3 things below should be purged and replaced with pure Assert.Equal. - // Xunit checks types by default. These are just artifacts of the testing chaos in the repo back in a day. let inline shouldBe (expected : ^T) (actual : ^U) = - actual.Should().Be(expected, "") |> ignore + Assert.Equal(expected :> obj, actual :> obj) + + let inline shouldStartWith (expected : string) (actual : string) = + Assert.StartsWith(expected, actual) + + let inline shouldContain (needle : string) (haystack : string) = + Assert.Contains(needle, haystack) let inline areEqual (expected: ^T) (actual: ^T) = Assert.Equal<^T>(expected, actual) let inline shouldEqual (x: 'a) (y: 'a) = Assert.Equal<'a>(x, y) - // let inline shouldBeEmpty (actual : ^T when ^T :> IEnumerable) = - actual.Should().BeEmpty("") |> ignore + Assert.Empty(actual) let inline shouldNotBeEmpty (actual : ^T when ^T :> IEnumerable) = - actual.Should().NotBeEmpty("") |> ignore + Assert.NotEmpty(actual) let shouldBeFalse (actual: bool) = - actual.Should().BeFalse("") |> ignore + Assert.False(actual) let shouldBeTrue (actual: bool) = - actual.Should().BeTrue("") |> ignore + Assert.True(actual) - let shouldBeSameMultilineStringSets expectedText actualText = - + let shouldBeSameMultilineStringSets expectedText actualText = let getLines text = use reader = new StringReader(text) Seq.initInfinite (fun _ -> reader.ReadLine()) diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index 4a255384e07..192783edd57 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -73,7 +73,6 @@ - @@ -83,14 +82,12 @@ - - - - - - - - + + + + + + diff --git a/tests/README.md b/tests/README.md index 40c9a35b177..81202f86f4e 100644 --- a/tests/README.md +++ b/tests/README.md @@ -19,12 +19,11 @@ ## Framework for testing -The following test frameworks and libraries will be used for new test projects **[xUnit Test Framework](https://xunit.net/), [FluentAssertions](https://fluentassertions.com/) (+ [FsUnit](https://fsprojects.github.io/FsUnit/) and [FsCheck](https://github.com/fscheck/FsCheck) when needed)**. +The following test frameworks and libraries will be used for new test projects **[xUnit Test Framework](https://xunit.net/) and [FsCheck](https://github.com/fscheck/FsCheck) when needed)**. **Justification:** * **xUnit** is an extensible, TDD adherent, testing framework, which was successfully adopted by many .NET engineering teams, including Roslyn, AspNetCore, EFcore, etc, has a "cleaner" approach for writing test suites (i.e. class constructor for setup, implementing IDisposable for teardown, as oppose to custom attributes). More info [here](https://xunit.net/docs/comparisons). -* **FluentAssertions** makes it easier to write scoped assertions, provides better error messages. **Alternatives:** NUnit, MSBuild, Expecto From 4fcf1a7f419a133802515f28263632d81d511455 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:11:23 +0100 Subject: [PATCH 21/21] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250116.1 (#18242) Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.25060.3 -> To Version 9.0.0-alpha.1.25066.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6071737c331..e0c968cbe09 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,9 +1,9 @@ - + https://github.com/dotnet/source-build-reference-packages - f5fa796273e4e59926e3fab26e1ab9e7d577f5e5 + 93a3395781d30f69201367371c28cfc5005c0264