diff --git a/DEVGUIDE.md b/DEVGUIDE.md index 5110e33109..3b22faf2fd 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -124,7 +124,7 @@ Running any of the above will build the latest changes and run tests against the ## Using your custom compiler to build this repository -By removing all the subfolders called `Proto` under `artifacts` and running the `build` script again, the proto compiler will include your changes. +By removing all the subfolders called `Bootstrap` or `Proto` under `artifacts` and running the `build` script again, the proto compiler will include your changes. Once the "proto" compiler is built, it won't be built again, so you may want to perform those steps again to ensure your changes don't break building the compiler itself. diff --git a/VisualFSharp.sln b/VisualFSharp.sln index 271379acd3..cdd9786b93 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -191,6 +191,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.Editor.IntegrationTe EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Benchmarks.Common", "tests\benchmarks\FSharp.Benchmarks.Common\FSharp.Benchmarks.Common.fsproj", "{6734FC6F-B5F3-45E1-9A72-720378BB49C9}" EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "MicroPerf", "tests\benchmarks\CompiledCodeBenchmarks\MicroPerf\MicroPerf.fsproj", "{601CD5C1-EAFA-4AE3-8FB9-F667B5728213}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MicroPerfCSharp", "tests\benchmarks\CompiledCodeBenchmarks\MicroPerf\CS\MicroPerfCSharp.csproj", "{9F9DD315-37DA-4413-928E-1CFC6924B64F}" Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.LanguageServer", "src\FSharp.Compiler.LanguageServer\FSharp.Compiler.LanguageServer.fsproj", "{D72F6593-DB2D-47AC-8E15-8DCE8527972E}" EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.LanguageServer.Tests", "tests\FSharp.Compiler.LanguageServer.Tests\FSharp.Compiler.LanguageServer.Tests.fsproj", "{1E83A6C8-FA4D-42BD-B4A5-B7F9AAD1B388}" @@ -1011,6 +1014,30 @@ Global {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|Any CPU.Build.0 = Release|Any CPU {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|x86.ActiveCfg = Release|Any CPU {6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|x86.Build.0 = Release|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Debug|Any CPU.Build.0 = Debug|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Debug|x86.ActiveCfg = Debug|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Debug|x86.Build.0 = Debug|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Proto|Any CPU.Build.0 = Debug|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Proto|x86.ActiveCfg = Debug|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Proto|x86.Build.0 = Debug|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Release|Any CPU.ActiveCfg = Release|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Release|Any CPU.Build.0 = Release|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Release|x86.ActiveCfg = Release|Any CPU + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213}.Release|x86.Build.0 = Release|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Debug|x86.ActiveCfg = Debug|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Debug|x86.Build.0 = Debug|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Proto|Any CPU.Build.0 = Debug|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Proto|x86.ActiveCfg = Debug|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Proto|x86.Build.0 = Debug|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Release|Any CPU.Build.0 = Release|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Release|x86.ActiveCfg = Release|Any CPU + {9F9DD315-37DA-4413-928E-1CFC6924B64F}.Release|x86.Build.0 = Release|Any CPU {D72F6593-DB2D-47AC-8E15-8DCE8527972E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D72F6593-DB2D-47AC-8E15-8DCE8527972E}.Debug|Any CPU.Build.0 = Debug|Any CPU {D72F6593-DB2D-47AC-8E15-8DCE8527972E}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -1126,6 +1153,8 @@ Global {CBC96CC7-65AB-46EA-A82E-F6A788DABF80} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2} {E31F9B59-FCF1-4D04-8762-C7BB60285A7B} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2} {6734FC6F-B5F3-45E1-9A72-720378BB49C9} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B} + {601CD5C1-EAFA-4AE3-8FB9-F667B5728213} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B} + {9F9DD315-37DA-4413-928E-1CFC6924B64F} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B} {1E83A6C8-FA4D-42BD-B4A5-B7F9AAD1B388} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 713a654c34..8700092a98 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -55,15 +55,11 @@ variables: value: Release - name: _PublishUsingPipelines value: true - - name: _DotNetArtifactsCategory - value: .NETCore - name: VisualStudioDropName value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber) - name: Codeql.Enabled value: true - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: _DotNetValidationArtifactsCategory - value: .NETCoreValidation - group: DotNet-FSharp-SDLValidation-Params - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: - name: RunningAsPullRequest @@ -126,14 +122,9 @@ stages: /p:SignType=$(_SignType) /p:DotNetSignType=$(_SignType) /p:MicroBuild_SigningEnabled=true - /p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json /p:TeamName=$(_TeamName) /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) - /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - /p:PublishToSymbolServer=true /p:VisualStudioDropName=$(VisualStudioDropName) /p:GenerateSbom=true env: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e6535fbc1a..eceff869ba 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,14 +46,10 @@ variables: value: Real - name: _PublishUsingPipelines value: true - - name: _DotNetArtifactsCategory - value: .NETCore - name: VisualStudioDropName value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber) - name: Codeql.Enabled value: true - - name: _DotNetValidationArtifactsCategory - value: .NETCoreValidation - group: DotNet-FSharp-SDLValidation-Params - template: /eng/common/templates-official/variables/pool-providers.yml@self @@ -137,14 +133,9 @@ extends: /p:SignType=$(_SignType) /p:DotNetSignType=$(_SignType) /p:MicroBuild_SigningEnabled=true - /p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json /p:TeamName=$(_TeamName) /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) - /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - /p:PublishToSymbolServer=true /p:VisualStudioDropName=$(VisualStudioDropName) /p:GenerateSbom=true env: diff --git a/buildtools/AssemblyCheck/AssemblyCheck.fs b/buildtools/AssemblyCheck/AssemblyCheck.fs index 7ac4f51481..61ef6dcdfc 100644 --- a/buildtools/AssemblyCheck/AssemblyCheck.fs +++ b/buildtools/AssemblyCheck/AssemblyCheck.fs @@ -64,6 +64,9 @@ module AssemblyCheck = let verifyAssemblies (binariesPath:string) = + // When building in the VMR, the package cache directory is under artifacts and should not be scanned. + let vmrPackageCacheDirectory = $"{Path.DirectorySeparatorChar}package-cache{Path.DirectorySeparatorChar}" + let excludedAssemblies = [ ] |> Set.ofList @@ -84,7 +87,13 @@ module AssemblyCheck = let fsharpExecutingWithEmbeddedPdbs = fsharpAssemblies - |> List.filter (fun p -> not (p.Contains(@"\Proto\") || p.Contains(@"\Bootstrap\") || p.Contains(@".resources.") || p.Contains(@"\FSharpSdk\") || p.Contains(@"\tmp\") || p.Contains(@"\obj\"))) + |> List.filter (fun p -> not (p.Contains($"{Path.DirectorySeparatorChar}Proto{Path.DirectorySeparatorChar}") || + p.Contains($"{Path.DirectorySeparatorChar}Bootstrap{Path.DirectorySeparatorChar}") || + p.Contains(".resources.") || + p.Contains($"{Path.DirectorySeparatorChar}FSharpSdk{Path.DirectorySeparatorChar}") || + p.Contains($"{Path.DirectorySeparatorChar}tmp{Path.DirectorySeparatorChar}") || + p.Contains($"{Path.DirectorySeparatorChar}obj{Path.DirectorySeparatorChar}") || + p.Contains(vmrPackageCacheDirectory))) // verify that all assemblies have a version number other than 0.0.0.0 or 1.0.0.0 let failedVersionCheck = @@ -99,21 +108,22 @@ module AssemblyCheck = if failedVersionCheck.Length > 0 then printfn "The following assemblies had a version of %A or %A" versionZero versionOne - printfn "%s\r\n" <| String.Join("\r\n", failedVersionCheck) + printfn "%s" <| String.Join(Environment.NewLine, failedVersionCheck) else printfn "All shipping assemblies had an appropriate version number." // verify that all assemblies have a commit hash let failedCommitHash = fsharpAssemblies - |> List.filter (fun p -> not (p.Contains(@"\FSharpSdk\"))) + |> List.filter (fun p -> not (p.Contains($"{Path.DirectorySeparatorChar}FSharpSdk{Path.DirectorySeparatorChar}") || + p.Contains(vmrPackageCacheDirectory))) |> List.filter (fun a -> let fileProductVersion = FileVersionInfo.GetVersionInfo(a).ProductVersion not (commitHashPattern.IsMatch(fileProductVersion) || devVersionPattern.IsMatch(fileProductVersion))) if failedCommitHash.Length > 0 then printfn "The following assemblies don't have a commit hash set" - printfn "%s\r\n" <| String.Join("\r\n", failedCommitHash) + printfn "%s%s" (String.Join(Environment.NewLine, failedCommitHash)) Environment.NewLine else printfn "All shipping assemblies had an appropriate commit hash." @@ -124,7 +134,7 @@ module AssemblyCheck = if failedVerifyEmbeddedPdb.Length > 0 then printfn "The following assemblies don't have an embedded pdb" - printfn "%s\r\n" <| String.Join("\r\n", failedVerifyEmbeddedPdb) + printfn "%s%s" (String.Join(Environment.NewLine, failedVerifyEmbeddedPdb)) Environment.NewLine else printfn "All shipping assemblies had an embedded PDB." diff --git a/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md index d055d7c988..652a7971f2 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md @@ -1,18 +1,20 @@ ### Fixed +* Fix a false positive of the `[]` analysis in combination with `yield!`. ([PR #16933](https://github.com/dotnet/fsharp/pull/16933)) * Don't blow the stack when traversing deeply nested sequential expressions. ([PR #16882](https://github.com/dotnet/fsharp/pull/16882)) * Fix wrong range start of INTERP_STRING_END. ([PR #16774](https://github.com/dotnet/fsharp/pull/16774), [PR #16785](https://github.com/dotnet/fsharp/pull/16785)) * Fix missing warning for recursive calls in list comprehensions. ([PR #16652](https://github.com/dotnet/fsharp/pull/16652)) * Code generated files with > 64K methods and generated symbols crash when loaded. Use infered sequence points for debugging. ([Issue #16399](https://github.com/dotnet/fsharp/issues/16399), [#PR 16514](https://github.com/dotnet/fsharp/pull/16514)) * `nameof Module` expressions and patterns are processed to link files in `--test:GraphBasedChecking`. ([PR #16550](https://github.com/dotnet/fsharp/pull/16550), [PR #16743](https://github.com/dotnet/fsharp/pull/16743)) * Graph Based Checking doesn't throw on invalid parsed input so it can be used for IDE scenarios ([PR #16575](https://github.com/dotnet/fsharp/pull/16575), [PR #16588](https://github.com/dotnet/fsharp/pull/16588), [PR #16643](https://github.com/dotnet/fsharp/pull/16643)) -* Various parenthesization API fixes. ([PR #16578](https://github.com/dotnet/fsharp/pull/16578), [PR #16666](https://github.com/dotnet/fsharp/pull/16666), [PR #16901](https://github.com/dotnet/fsharp/pull/16901)) +* Various parenthesization API fixes. ([PR #16578](https://github.com/dotnet/fsharp/pull/16578), [PR #16666](https://github.com/dotnet/fsharp/pull/16666), [PR #16901](https://github.com/dotnet/fsharp/pull/16901), [PR #16973](https://github.com/dotnet/fsharp/pull/16973)) * Keep parens for problematic exprs (`if`, `match`, etc.) in `$"{(…):N0}"`, `$"{(…),-3}"`, etc. ([PR #16578](https://github.com/dotnet/fsharp/pull/16578)) * Fix crash in DOTNET_SYSTEM_GLOBALIZATION_INVARIANT mode [#PR 16471](https://github.com/dotnet/fsharp/pull/16471)) * Fix16572 - Fixed the preview feature enabling Is properties for union case did not work correctly with let .rec and .fsi files ([PR #16657](https://github.com/dotnet/fsharp/pull/16657)) * `[]` member should not produce property symbol. ([Issue #16640](https://github.com/dotnet/fsharp/issues/16640), [PR #16658](https://github.com/dotnet/fsharp/pull/16658)) * Fix discriminated union initialization. ([#PR 16661](https://github.com/dotnet/fsharp/pull/16661)) * Allow calling method with both Optional and ParamArray. ([#PR 16688](https://github.com/dotnet/fsharp/pull/16688), [suggestions #1120](https://github.com/fsharp/fslang-suggestions/issues/1120)) +* Return diagnostics that got suppressed by errors in previous files. ([PR #16719](https://github.com/dotnet/fsharp/pull/16719)) * Fix release inline optimization, which leads to MethodAccessException if used with `assembly:InternalsVisibleTo`` attribute. ([Issue #16105](https://github.com/dotnet/fsharp/issues/16105), ([PR #16737](https://github.com/dotnet/fsharp/pull/16737)) * Enforce AttributeTargets on let values and functions. ([PR #16692](https://github.com/dotnet/fsharp/pull/16692)) * Enforce AttributeTargets on union case declarations. ([PR #16764](https://github.com/dotnet/fsharp/pull/16764)) @@ -25,6 +27,8 @@ * Enforce AttributeTargets on enums ([PR #16887](https://github.com/dotnet/fsharp/pull/16887)) * Completion: fix for unfinished record field decl ([PR #16893](https://github.com/dotnet/fsharp/pull/16893)) * Enforce AttributeTargets on delegates ([PR #16891](https://github.com/dotnet/fsharp/pull/16891)) +* Obsolete attribute is ignored in constructor property assignment ([PR #16900](https://github.com/dotnet/fsharp/pull/16900)) +* Completion: fix completion in empty dot lambda prefix ([#16829](https://github.com/dotnet/fsharp/pull/16829)) * Fix StackOverflow when checking non-recursive bindings in module or namespace in `fscAnyCpu`/`fsiAnyCpu`. ([PR #16908](https://github.com/dotnet/fsharp/pull/16908)) ### Added @@ -33,11 +37,13 @@ * Parser recovers on complex primary constructor patterns, better tree representation for primary constructor patterns. ([PR #16425](https://github.com/dotnet/fsharp/pull/16425)) * Name resolution: keep type vars in subsequent checks ([PR #16456](https://github.com/dotnet/fsharp/pull/16456)) * Higher-order-function-based API for working with the untyped abstract syntax tree. ([PR #16462](https://github.com/dotnet/fsharp/pull/16462)) +* PrettyNaming: make `DoesIdentifierNeedBackticks` public ([PR #16613](https://github.com/dotnet/fsharp/pull/16613)) * Add switch to generate types and members with IL visibility that accurately represents their F# visibility. ([PR #15484](https://github.com/dotnet/fsharp/pull/15484) * Allow returning bool instead of unit option for partial active patterns. ([Language suggestion #1041](https://github.com/fsharp/fslang-suggestions/issues/1041), [PR #16473](https://github.com/dotnet/fsharp/pull/16473)) * Symbols: Add GenericArguments to FSharpEntity ([PR #16470](https://github.com/dotnet/fsharp/pull/16470)) * Parser: more 'as' pattern recovery ([PR #16837](https://github.com/dotnet/fsharp/pull/16837)) * Add extended data for `DefinitionsInSigAndImplNotCompatibleAbbreviationsDiffer` (FS0318). ([PR #16811](https://github.com/dotnet/fsharp/pull/16811))) +* Checker/patterns: recover on unresolved long identifiers ([PR #16842](https://github.com/dotnet/fsharp/pull/16842)) ### Changed @@ -48,4 +54,4 @@ * Reverted [#16348](https://github.com/dotnet/fsharp/pull/16348) `ThreadStatic` `CancellationToken` changes to improve test stability and prevent potential unwanted cancellations. ([PR #16536](https://github.com/dotnet/fsharp/pull/16536)) * Refactored parenthesization API. ([PR #16461])(https://github.com/dotnet/fsharp/pull/16461)) * Optimize some interpolated strings by lowering to string concatenation. ([PR #16556](https://github.com/dotnet/fsharp/pull/16556)) -* Integral range optimizations. ([PR #16650](https://github.com/dotnet/fsharp/pull/16650), [PR #16832](https://github.com/dotnet/fsharp/pull/16832)) +* Integral range optimizations. ([PR #16650](https://github.com/dotnet/fsharp/pull/16650), [PR #16832](https://github.com/dotnet/fsharp/pull/16832), [PR #16947](https://github.com/dotnet/fsharp/pull/16947)) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index af49e78651..8844828f87 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,9 +1,9 @@ - + https://github.com/dotnet/source-build-reference-packages - 936b4a4b4b8a74b65098983660c5814fb4afee15 + c0b5d69a1a1513528c77fffff708c7502d57c35c @@ -30,9 +30,9 @@ - + https://github.com/dotnet/arcade - f311667e0587f19c3fa9553a909975662107a351 + fc2b7849b25c4a21457feb6da5fc7c9806a80976 diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh index f5c1ec7eaf..2d5660642b 100644 --- a/eng/common/native/init-compiler.sh +++ b/eng/common/native/init-compiler.sh @@ -63,7 +63,7 @@ if [ -z "$CLR_CC" ]; then # Set default versions if [ -z "$majorVersion" ]; then # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. - if [ "$compiler" = "clang" ]; then versions="17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5" + if [ "$compiler" = "clang" ]; then versions="18 17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5" elif [ "$compiler" = "gcc" ]; then versions="13 12 11 10 9 8 7 6 5 4.9"; fi for version in $versions; do diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index a2709d1056..1f035fee73 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -128,7 +128,7 @@ jobs: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - - task: MicroBuildSigningPlugin@3 + - task: MicroBuildSigningPlugin@4 displayName: Install MicroBuild plugin inputs: signType: $(_SignType) @@ -136,6 +136,7 @@ jobs: feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json env: TeamName: $(_TeamName) + MicroBuildOutputFolderOverride: '$(Agent.TempDirectory)' continueOnError: ${{ parameters.continueOnError }} condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) diff --git a/eng/common/templates-official/job/onelocbuild.yml b/eng/common/templates-official/job/onelocbuild.yml index ba9ba49303..52b4d05d3f 100644 --- a/eng/common/templates-official/job/onelocbuild.yml +++ b/eng/common/templates-official/job/onelocbuild.yml @@ -56,7 +56,7 @@ jobs: # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: name: $(DncEngInternalBuildPool) - image: 1es-windows-2022-pt + image: 1es-windows-2022 os: windows steps: diff --git a/eng/common/templates-official/job/publish-build-assets.yml b/eng/common/templates-official/job/publish-build-assets.yml index 53138622fe..589ac80a18 100644 --- a/eng/common/templates-official/job/publish-build-assets.yml +++ b/eng/common/templates-official/job/publish-build-assets.yml @@ -60,8 +60,8 @@ jobs: os: windows # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: $(DncEngInternalBuildPool) - image: 1es-windows-2022-pt + name: NetCore1ESPool-Publishing-Internal + image: windows.vs2019.amd64 os: windows steps: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: diff --git a/eng/common/templates-official/job/source-build.yml b/eng/common/templates-official/job/source-build.yml index 8aba3b44bb..f193dfbe23 100644 --- a/eng/common/templates-official/job/source-build.yml +++ b/eng/common/templates-official/job/source-build.yml @@ -52,7 +52,7 @@ jobs: ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')] - image: 1es-mariner-2-pt + image: 1es-mariner-2 os: linux ${{ if ne(parameters.platform.pool, '') }}: diff --git a/eng/common/templates-official/job/source-index-stage1.yml b/eng/common/templates-official/job/source-index-stage1.yml index 4b63373917..f0513aee5b 100644 --- a/eng/common/templates-official/job/source-index-stage1.yml +++ b/eng/common/templates-official/job/source-index-stage1.yml @@ -33,7 +33,7 @@ jobs: demands: ImageOverride -equals windows.vs2019.amd64.open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) - image: 1es-windows-2022-pt + image: windows.vs2022.amd64 os: windows steps: diff --git a/eng/common/templates-official/post-build/post-build.yml b/eng/common/templates-official/post-build/post-build.yml index 5c98fe1c0f..da1f40958b 100644 --- a/eng/common/templates-official/post-build/post-build.yml +++ b/eng/common/templates-official/post-build/post-build.yml @@ -110,7 +110,7 @@ stages: # If it's not devdiv, it's dnceng ${{ else }}: name: $(DncEngInternalBuildPool) - image: 1es-windows-2022-pt + image: 1es-windows-2022 os: windows steps: @@ -150,7 +150,7 @@ stages: # If it's not devdiv, it's dnceng ${{ else }}: name: $(DncEngInternalBuildPool) - image: 1es-windows-2022-pt + image: 1es-windows-2022 os: windows steps: - template: setup-maestro-vars.yml @@ -208,7 +208,7 @@ stages: # If it's not devdiv, it's dnceng ${{ else }}: name: $(DncEngInternalBuildPool) - image: 1es-windows-2022-pt + image: 1es-windows-2022 os: windows steps: - template: setup-maestro-vars.yml @@ -261,8 +261,8 @@ stages: os: windows # If it's not devdiv, it's dnceng ${{ else }}: - name: $(DncEngInternalBuildPool) - image: 1es-windows-2022-pt + name: NetCore1ESPool-Publishing-Internal + image: windows.vs2019.amd64 os: windows steps: - template: setup-maestro-vars.yml diff --git a/eng/common/templates-official/variables/pool-providers.yml b/eng/common/templates-official/variables/pool-providers.yml index beab7d1bfb..1f308b24ef 100644 --- a/eng/common/templates-official/variables/pool-providers.yml +++ b/eng/common/templates-official/variables/pool-providers.yml @@ -23,7 +23,7 @@ # # pool: # name: $(DncEngInternalBuildPool) -# image: 1es-windows-2022-pt +# image: 1es-windows-2022 variables: # Coalesce the target and source branches so we know when a PR targets a release branch diff --git a/global.json b/global.json index 65c9d9b762..2e23eb6e01 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.0.1" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24165.4", + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24179.4", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } diff --git a/src/Compiler/Checking/CheckExpressions.fs b/src/Compiler/Checking/CheckExpressions.fs index 220e4da4c8..06de913a46 100644 --- a/src/Compiler/Checking/CheckExpressions.fs +++ b/src/Compiler/Checking/CheckExpressions.fs @@ -10086,7 +10086,6 @@ and TcMethodApplication // Handle post-hoc property assignments let setterExprPrebinders, callExpr2b = let expr = callExpr2 - CheckRequiredProperties g env cenv finalCalledMethInfo finalAssignedItemSetters mMethExpr if isCheckingAttributeCall then @@ -10161,6 +10160,8 @@ and TcSetterArgExpr (cenv: cenv) env denv objExpr ad assignedSetter calledFromCo match setter with | AssignedPropSetter (propStaticTyOpt, pinfo, pminfo, pminst) -> + CheckPropInfoAttributes pinfo id.idRange |> CommitOperationResult + if g.langVersion.SupportsFeature(LanguageFeature.RequiredPropertiesSupport) && pinfo.IsSetterInitOnly && not calledFromConstructor then errorR (Error (FSComp.SR.tcInitOnlyPropertyCannotBeSet1 pinfo.PropertyName, m)) diff --git a/src/Compiler/Checking/CheckPatterns.fs b/src/Compiler/Checking/CheckPatterns.fs index 896df82f84..79758a0132 100644 --- a/src/Compiler/Checking/CheckPatterns.fs +++ b/src/Compiler/Checking/CheckPatterns.fs @@ -293,7 +293,11 @@ and TcPat warnOnUpper (cenv: cenv) env valReprInfo vFlags (patEnv: TcPatLinearEn TcPatAnds warnOnUpper cenv env vFlags patEnv ty pats m | SynPat.LongIdent (longDotId=longDotId; typarDecls=tyargs; argPats=args; accessibility=vis; range=m) -> - TcPatLongIdent warnOnUpper cenv env ad valReprInfo vFlags patEnv ty (longDotId, tyargs, args, vis, m) + try + TcPatLongIdent warnOnUpper cenv env ad valReprInfo vFlags patEnv ty (longDotId, tyargs, args, vis, m) + with RecoverableException e -> + errorRecovery e m + (fun _ -> TPat_error m), patEnv | SynPat.QuoteExpr(_, m) -> errorR (Error(FSComp.SR.tcInvalidPattern(), m)) diff --git a/src/Compiler/Checking/TailCallChecks.fs b/src/Compiler/Checking/TailCallChecks.fs index aaeec0e81d..97bdc05680 100644 --- a/src/Compiler/Checking/TailCallChecks.fs +++ b/src/Compiler/Checking/TailCallChecks.fs @@ -222,6 +222,13 @@ and CheckCall cenv args ctxts (tailCall: TailCall) = | Expr.App _ -> Some(TailCall.YesFromExpr cenv.g e) | IsAppInLambdaBody t -> Some t | _ -> None + | Expr.App(args = args) -> + args + |> List.tryPick (fun a -> + match a with + | IsAppInLambdaBody t -> Some t + | _ -> None) + | _ -> None // if we haven't already decided this is no tail call, try to detect CPS-like expressions diff --git a/src/Compiler/Optimize/LowerComputedCollections.fs b/src/Compiler/Optimize/LowerComputedCollections.fs index 18eafb2c6d..a78f70a754 100644 --- a/src/Compiler/Optimize/LowerComputedCollections.fs +++ b/src/Compiler/Optimize/LowerComputedCollections.fs @@ -393,14 +393,7 @@ module Array = mkCompGenLetIn m (nameof count) (tyOfExpr g count) count (fun (_, count) -> let countTy = tyOfExpr g count - // count < 1 - let countLtOne = - if isSignedIntegerTy g countTy then - mkILAsmClt g m count (mkTypedOne g m countTy) - else - mkAsmExpr ([AI_clt_un], [], [count; mkTypedOne g m countTy], [g.bool_ty], m) - - // if count < 1 then + // if count = 0 then // [||] // else // let array = (# "newarr !0" type ('T) count : 'T array #) in @@ -410,7 +403,7 @@ module Array = DebugPointAtBinding.NoneAtInvisible m arrayTy - countLtOne + (mkILAsmCeq g m count (mkTypedZero g m countTy)) (mkArray (overallElemTy, [], m)) (mkArrayInit count mkLoop) ) diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index dda21fffd3..46ea4bce4f 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -2909,11 +2909,6 @@ module internal ParseAndCheckFile = // update the error handler with the modified tcConfig errHandler.DiagnosticOptions <- tcConfig.diagnosticsOptions - // Play background errors and warnings for this file. - do - for err, severity in backgroundDiagnostics do - diagnosticSink (err, severity) - // If additional references were brought in by the preprocessor then we need to process them ApplyLoadClosure(tcConfig, parsedMainInput, mainInputFileName, loadClosure, tcImports, backgroundDiagnostics) @@ -2957,6 +2952,11 @@ module internal ParseAndCheckFile = return ((tcState.TcEnvFromSignatures, EmptyTopAttrs, [], [ mty ]), tcState) } + // Play background errors and warnings for this file. + do + for err, severity in backgroundDiagnostics do + diagnosticSink (err, severity) + let (tcEnvAtEnd, _, implFiles, ccuSigsForFiles), tcState = resOpt let symbolEnv = SymbolEnv(tcGlobals, tcState.Ccu, Some tcState.CcuSig, tcImports) diff --git a/src/Compiler/Service/SynExpr.fs b/src/Compiler/Service/SynExpr.fs index db284ac36f..46bf646a21 100644 --- a/src/Compiler/Service/SynExpr.fs +++ b/src/Compiler/Service/SynExpr.fs @@ -657,7 +657,41 @@ module SynExpr = // return ( // x // ) - | _, SyntaxNode.SynExpr outer :: _ when containsSensitiveIndentation outer.Range.StartColumn expr.Range -> true + | _, SyntaxNode.SynExpr(SynExpr.YieldOrReturn _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.YieldOrReturnFrom _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.Assert _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.Lazy _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.App(argExpr = SynExpr.Paren(expr = Is expr)) as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.LetOrUse _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.LetOrUseBang _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.TryWith _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.TryFinally _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.For _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.ForEach _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.IfThenElse _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.New _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.Set(rhsExpr = SynExpr.Paren(expr = Is expr)) as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.DotIndexedSet(valueExpr = SynExpr.Paren(expr = Is expr)) as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.DotNamedIndexedPropertySet(rhsExpr = SynExpr.Paren(expr = Is expr)) as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.DotSet(rhsExpr = SynExpr.Paren(expr = Is expr)) as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.LibraryOnlyUnionCaseFieldSet(rhsExpr = SynExpr.Paren(expr = Is expr)) as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.LongIdentSet(expr = SynExpr.Paren(expr = Is expr)) as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.NamedIndexedPropertySet(expr2 = SynExpr.Paren(expr = Is expr)) as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.InferredUpcast _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.InferredDowncast _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.Match _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.MatchBang _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.While _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.WhileBang _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.Do _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.DoBang _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.Fixed _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.Record _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.AnonRecd _ as outer) :: _ + | _, SyntaxNode.SynExpr(SynExpr.InterpolatedString _ as outer) :: _ when + containsSensitiveIndentation outer.Range.StartColumn expr.Range + -> + true // Check for nested matches, e.g., // diff --git a/src/Compiler/SyntaxTree/PrettyNaming.fsi b/src/Compiler/SyntaxTree/PrettyNaming.fsi index 05478070e1..511f60b905 100644 --- a/src/Compiler/SyntaxTree/PrettyNaming.fsi +++ b/src/Compiler/SyntaxTree/PrettyNaming.fsi @@ -58,7 +58,7 @@ val IsIdentifierName: name: string -> bool /// TBD: needs unit testing val IsActivePatternName: name: string -> bool -val internal DoesIdentifierNeedBackticks: string -> bool +val DoesIdentifierNeedBackticks: string -> bool /// Adds double backticks if necessary to make a valid identifier, e.g. /// op_Addition --> op_Addition diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs index a02591eb65..f775e47de8 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs @@ -100,6 +100,8 @@ let rec pushUnaryArg expr arg = | SynExpr.TypeApp(innerExpr, mLess, tyargs, mCommas, mGreater, mTypars, m) -> let innerExpr = pushUnaryArg innerExpr arg SynExpr.TypeApp(innerExpr, mLess, tyargs, mCommas, mGreater, mTypars, m) + | SynExpr.ArbitraryAfterError(_, m) when m.Start = m.End -> + SynExpr.DiscardAfterMissingQualificationAfterDot(SynExpr.Ident arg, m.StartRange, unionRanges arg.idRange m) | _ -> errorR (Error(FSComp.SR.tcDotLambdaAtNotSupportedExpression (), expr.Range)) expr diff --git a/src/FSharp.Build/Microsoft.FSharp.NetSdk.props b/src/FSharp.Build/Microsoft.FSharp.NetSdk.props index 8cc3ba76eb..792df8e235 100644 --- a/src/FSharp.Build/Microsoft.FSharp.NetSdk.props +++ b/src/FSharp.Build/Microsoft.FSharp.NetSdk.props @@ -30,7 +30,14 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and - false + false + + false diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/flaterrors.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/flaterrors.fs index 92f2f30b14..592b3ac09e 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/flaterrors.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/flaterrors.fs @@ -59,7 +59,7 @@ module flaterrors = [] //Invalid case [] //Even more invalid case - [] // no + allowed + [] // no + allowed [] // no - allowed [] let ``E_MultiLine04_fs`` (option: string) = diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl index fe63ecb713..2d2e4a99be 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl @@ -541,46 +541,44 @@ IL_0015: ldloc.0 IL_0016: stloc.1 IL_0017: ldloc.1 - IL_0018: ldc.i4.1 - IL_0019: conv.i8 - IL_001a: bge.un.s IL_0022 + IL_0018: brtrue.s IL_0020 - IL_001c: call !!0[] [runtime]System.Array::Empty() - IL_0021: ret + IL_001a: call !!0[] [runtime]System.Array::Empty() + IL_001f: ret - IL_0022: ldloc.1 - IL_0023: conv.ovf.i.un - IL_0024: newarr [runtime]System.Int32 - IL_0029: stloc.2 - IL_002a: ldc.i4.0 - IL_002b: conv.i8 - IL_002c: stloc.3 - IL_002d: ldarg.0 - IL_002e: stloc.s V_4 - IL_0030: br.s IL_0047 - - IL_0032: ldloc.2 - IL_0033: ldloc.3 - IL_0034: conv.i - IL_0035: ldloc.s V_4 - IL_0037: stloc.s V_5 - IL_0039: ldloc.s V_5 - IL_003b: stelem.i4 - IL_003c: ldloc.s V_4 - IL_003e: ldc.i4.1 - IL_003f: add - IL_0040: stloc.s V_4 - IL_0042: ldloc.3 - IL_0043: ldc.i4.1 - IL_0044: conv.i8 - IL_0045: add - IL_0046: stloc.3 - IL_0047: ldloc.3 - IL_0048: ldloc.0 - IL_0049: blt.un.s IL_0032 + IL_0020: ldloc.1 + IL_0021: conv.ovf.i.un + IL_0022: newarr [runtime]System.Int32 + IL_0027: stloc.2 + IL_0028: ldc.i4.0 + IL_0029: conv.i8 + IL_002a: stloc.3 + IL_002b: ldarg.0 + IL_002c: stloc.s V_4 + IL_002e: br.s IL_0045 - IL_004b: ldloc.2 - IL_004c: ret + IL_0030: ldloc.2 + IL_0031: ldloc.3 + IL_0032: conv.i + IL_0033: ldloc.s V_4 + IL_0035: stloc.s V_5 + IL_0037: ldloc.s V_5 + IL_0039: stelem.i4 + IL_003a: ldloc.s V_4 + IL_003c: ldc.i4.1 + IL_003d: add + IL_003e: stloc.s V_4 + IL_0040: ldloc.3 + IL_0041: ldc.i4.1 + IL_0042: conv.i8 + IL_0043: add + IL_0044: stloc.3 + IL_0045: ldloc.3 + IL_0046: ldloc.0 + IL_0047: blt.un.s IL_0030 + + IL_0049: ldloc.2 + IL_004a: ret } .method public static int32[] f10(int32 finish) cil managed @@ -615,46 +613,44 @@ IL_0013: ldloc.0 IL_0014: stloc.1 IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: bge.un.s IL_0020 - - IL_001a: call !!0[] [runtime]System.Array::Empty() - IL_001f: ret - - IL_0020: ldloc.1 - IL_0021: conv.ovf.i.un - IL_0022: newarr [runtime]System.Int32 - IL_0027: stloc.2 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: stloc.3 - IL_002b: ldc.i4.1 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_0045 - - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stloc.s V_5 - IL_0037: ldloc.s V_5 - IL_0039: stelem.i4 - IL_003a: ldloc.s V_4 - IL_003c: ldc.i4.1 - IL_003d: add - IL_003e: stloc.s V_4 - IL_0040: ldloc.3 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.3 - IL_0045: ldloc.3 - IL_0046: ldloc.0 - IL_0047: blt.un.s IL_0030 + IL_0016: brtrue.s IL_001e + + IL_0018: call !!0[] [runtime]System.Array::Empty() + IL_001d: ret + + IL_001e: ldloc.1 + IL_001f: conv.ovf.i.un + IL_0020: newarr [runtime]System.Int32 + IL_0025: stloc.2 + IL_0026: ldc.i4.0 + IL_0027: conv.i8 + IL_0028: stloc.3 + IL_0029: ldc.i4.1 + IL_002a: stloc.s V_4 + IL_002c: br.s IL_0043 - IL_0049: ldloc.2 - IL_004a: ret + IL_002e: ldloc.2 + IL_002f: ldloc.3 + IL_0030: conv.i + IL_0031: ldloc.s V_4 + IL_0033: stloc.s V_5 + IL_0035: ldloc.s V_5 + IL_0037: stelem.i4 + IL_0038: ldloc.s V_4 + IL_003a: ldc.i4.1 + IL_003b: add + IL_003c: stloc.s V_4 + IL_003e: ldloc.3 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: ldloc.0 + IL_0045: blt.un.s IL_002e + + IL_0047: ldloc.2 + IL_0048: ret } .method public static int32[] f11(int32 start, @@ -691,46 +687,44 @@ IL_0013: ldloc.0 IL_0014: stloc.1 IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: bge.un.s IL_0020 - - IL_001a: call !!0[] [runtime]System.Array::Empty() - IL_001f: ret - - IL_0020: ldloc.1 - IL_0021: conv.ovf.i.un - IL_0022: newarr [runtime]System.Int32 - IL_0027: stloc.2 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: stloc.3 - IL_002b: ldarg.0 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_0045 - - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stloc.s V_5 - IL_0037: ldloc.s V_5 - IL_0039: stelem.i4 - IL_003a: ldloc.s V_4 - IL_003c: ldc.i4.1 - IL_003d: add - IL_003e: stloc.s V_4 - IL_0040: ldloc.3 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.3 - IL_0045: ldloc.3 - IL_0046: ldloc.0 - IL_0047: blt.un.s IL_0030 - - IL_0049: ldloc.2 - IL_004a: ret + IL_0016: brtrue.s IL_001e + + IL_0018: call !!0[] [runtime]System.Array::Empty() + IL_001d: ret + + IL_001e: ldloc.1 + IL_001f: conv.ovf.i.un + IL_0020: newarr [runtime]System.Int32 + IL_0025: stloc.2 + IL_0026: ldc.i4.0 + IL_0027: conv.i8 + IL_0028: stloc.3 + IL_0029: ldarg.0 + IL_002a: stloc.s V_4 + IL_002c: br.s IL_0043 + + IL_002e: ldloc.2 + IL_002f: ldloc.3 + IL_0030: conv.i + IL_0031: ldloc.s V_4 + IL_0033: stloc.s V_5 + IL_0035: ldloc.s V_5 + IL_0037: stelem.i4 + IL_0038: ldloc.s V_4 + IL_003a: ldc.i4.1 + IL_003b: add + IL_003c: stloc.s V_4 + IL_003e: ldloc.3 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: ldloc.0 + IL_0045: blt.un.s IL_002e + + IL_0047: ldloc.2 + IL_0048: ret } .method public static int32[] f12(int32 start) cil managed @@ -765,46 +759,44 @@ IL_0015: ldloc.0 IL_0016: stloc.1 IL_0017: ldloc.1 - IL_0018: ldc.i4.1 - IL_0019: conv.i8 - IL_001a: bge.un.s IL_0022 + IL_0018: brtrue.s IL_0020 - IL_001c: call !!0[] [runtime]System.Array::Empty() - IL_0021: ret + IL_001a: call !!0[] [runtime]System.Array::Empty() + IL_001f: ret - IL_0022: ldloc.1 - IL_0023: conv.ovf.i.un - IL_0024: newarr [runtime]System.Int32 - IL_0029: stloc.2 - IL_002a: ldc.i4.0 - IL_002b: conv.i8 - IL_002c: stloc.3 - IL_002d: ldarg.0 - IL_002e: stloc.s V_4 - IL_0030: br.s IL_0047 - - IL_0032: ldloc.2 - IL_0033: ldloc.3 - IL_0034: conv.i - IL_0035: ldloc.s V_4 - IL_0037: stloc.s V_5 - IL_0039: ldloc.s V_5 - IL_003b: stelem.i4 - IL_003c: ldloc.s V_4 - IL_003e: ldc.i4.1 - IL_003f: add - IL_0040: stloc.s V_4 - IL_0042: ldloc.3 - IL_0043: ldc.i4.1 - IL_0044: conv.i8 - IL_0045: add - IL_0046: stloc.3 - IL_0047: ldloc.3 - IL_0048: ldloc.0 - IL_0049: blt.un.s IL_0032 + IL_0020: ldloc.1 + IL_0021: conv.ovf.i.un + IL_0022: newarr [runtime]System.Int32 + IL_0027: stloc.2 + IL_0028: ldc.i4.0 + IL_0029: conv.i8 + IL_002a: stloc.3 + IL_002b: ldarg.0 + IL_002c: stloc.s V_4 + IL_002e: br.s IL_0045 - IL_004b: ldloc.2 - IL_004c: ret + IL_0030: ldloc.2 + IL_0031: ldloc.3 + IL_0032: conv.i + IL_0033: ldloc.s V_4 + IL_0035: stloc.s V_5 + IL_0037: ldloc.s V_5 + IL_0039: stelem.i4 + IL_003a: ldloc.s V_4 + IL_003c: ldc.i4.1 + IL_003d: add + IL_003e: stloc.s V_4 + IL_0040: ldloc.3 + IL_0041: ldc.i4.1 + IL_0042: conv.i8 + IL_0043: add + IL_0044: stloc.3 + IL_0045: ldloc.3 + IL_0046: ldloc.0 + IL_0047: blt.un.s IL_0030 + + IL_0049: ldloc.2 + IL_004a: ret } .method public static int32[] f13(int32 step) cil managed @@ -883,46 +875,44 @@ IL_0046: ldloc.0 IL_0047: stloc.1 IL_0048: ldloc.1 - IL_0049: ldc.i4.1 - IL_004a: conv.i8 - IL_004b: bge.un.s IL_0053 - - IL_004d: call !!0[] [runtime]System.Array::Empty() - IL_0052: ret - - IL_0053: ldloc.1 - IL_0054: conv.ovf.i.un - IL_0055: newarr [runtime]System.Int32 - IL_005a: stloc.2 - IL_005b: ldc.i4.0 - IL_005c: conv.i8 - IL_005d: stloc.3 - IL_005e: ldc.i4.1 - IL_005f: stloc.s V_4 - IL_0061: br.s IL_0078 - - IL_0063: ldloc.2 - IL_0064: ldloc.3 - IL_0065: conv.i - IL_0066: ldloc.s V_4 - IL_0068: stloc.s V_5 - IL_006a: ldloc.s V_5 - IL_006c: stelem.i4 - IL_006d: ldloc.s V_4 - IL_006f: ldarg.0 - IL_0070: add - IL_0071: stloc.s V_4 - IL_0073: ldloc.3 - IL_0074: ldc.i4.1 - IL_0075: conv.i8 - IL_0076: add - IL_0077: stloc.3 - IL_0078: ldloc.3 - IL_0079: ldloc.0 - IL_007a: blt.un.s IL_0063 - - IL_007c: ldloc.2 - IL_007d: ret + IL_0049: brtrue.s IL_0051 + + IL_004b: call !!0[] [runtime]System.Array::Empty() + IL_0050: ret + + IL_0051: ldloc.1 + IL_0052: conv.ovf.i.un + IL_0053: newarr [runtime]System.Int32 + IL_0058: stloc.2 + IL_0059: ldc.i4.0 + IL_005a: conv.i8 + IL_005b: stloc.3 + IL_005c: ldc.i4.1 + IL_005d: stloc.s V_4 + IL_005f: br.s IL_0076 + + IL_0061: ldloc.2 + IL_0062: ldloc.3 + IL_0063: conv.i + IL_0064: ldloc.s V_4 + IL_0066: stloc.s V_5 + IL_0068: ldloc.s V_5 + IL_006a: stelem.i4 + IL_006b: ldloc.s V_4 + IL_006d: ldarg.0 + IL_006e: add + IL_006f: stloc.s V_4 + IL_0071: ldloc.3 + IL_0072: ldc.i4.1 + IL_0073: conv.i8 + IL_0074: add + IL_0075: stloc.3 + IL_0076: ldloc.3 + IL_0077: ldloc.0 + IL_0078: blt.un.s IL_0061 + + IL_007a: ldloc.2 + IL_007b: ret } .method public static int32[] f14(int32 finish) cil managed @@ -957,46 +947,44 @@ IL_0013: ldloc.0 IL_0014: stloc.1 IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: bge.un.s IL_0020 - - IL_001a: call !!0[] [runtime]System.Array::Empty() - IL_001f: ret - - IL_0020: ldloc.1 - IL_0021: conv.ovf.i.un - IL_0022: newarr [runtime]System.Int32 - IL_0027: stloc.2 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: stloc.3 - IL_002b: ldc.i4.1 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_0045 - - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stloc.s V_5 - IL_0037: ldloc.s V_5 - IL_0039: stelem.i4 - IL_003a: ldloc.s V_4 - IL_003c: ldc.i4.1 - IL_003d: add - IL_003e: stloc.s V_4 - IL_0040: ldloc.3 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.3 - IL_0045: ldloc.3 - IL_0046: ldloc.0 - IL_0047: blt.un.s IL_0030 + IL_0016: brtrue.s IL_001e + + IL_0018: call !!0[] [runtime]System.Array::Empty() + IL_001d: ret + + IL_001e: ldloc.1 + IL_001f: conv.ovf.i.un + IL_0020: newarr [runtime]System.Int32 + IL_0025: stloc.2 + IL_0026: ldc.i4.0 + IL_0027: conv.i8 + IL_0028: stloc.3 + IL_0029: ldc.i4.1 + IL_002a: stloc.s V_4 + IL_002c: br.s IL_0043 - IL_0049: ldloc.2 - IL_004a: ret + IL_002e: ldloc.2 + IL_002f: ldloc.3 + IL_0030: conv.i + IL_0031: ldloc.s V_4 + IL_0033: stloc.s V_5 + IL_0035: ldloc.s V_5 + IL_0037: stelem.i4 + IL_0038: ldloc.s V_4 + IL_003a: ldc.i4.1 + IL_003b: add + IL_003c: stloc.s V_4 + IL_003e: ldloc.3 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: ldloc.0 + IL_0045: blt.un.s IL_002e + + IL_0047: ldloc.2 + IL_0048: ret } .method public static int32[] f15(int32 start, @@ -1077,46 +1065,44 @@ IL_0046: ldloc.0 IL_0047: stloc.1 IL_0048: ldloc.1 - IL_0049: ldc.i4.1 - IL_004a: conv.i8 - IL_004b: bge.un.s IL_0053 - - IL_004d: call !!0[] [runtime]System.Array::Empty() - IL_0052: ret - - IL_0053: ldloc.1 - IL_0054: conv.ovf.i.un - IL_0055: newarr [runtime]System.Int32 - IL_005a: stloc.2 - IL_005b: ldc.i4.0 - IL_005c: conv.i8 - IL_005d: stloc.3 - IL_005e: ldarg.0 - IL_005f: stloc.s V_4 - IL_0061: br.s IL_0078 - - IL_0063: ldloc.2 - IL_0064: ldloc.3 - IL_0065: conv.i - IL_0066: ldloc.s V_4 - IL_0068: stloc.s V_5 - IL_006a: ldloc.s V_5 - IL_006c: stelem.i4 - IL_006d: ldloc.s V_4 - IL_006f: ldarg.1 - IL_0070: add - IL_0071: stloc.s V_4 - IL_0073: ldloc.3 - IL_0074: ldc.i4.1 - IL_0075: conv.i8 - IL_0076: add - IL_0077: stloc.3 - IL_0078: ldloc.3 - IL_0079: ldloc.0 - IL_007a: blt.un.s IL_0063 - - IL_007c: ldloc.2 - IL_007d: ret + IL_0049: brtrue.s IL_0051 + + IL_004b: call !!0[] [runtime]System.Array::Empty() + IL_0050: ret + + IL_0051: ldloc.1 + IL_0052: conv.ovf.i.un + IL_0053: newarr [runtime]System.Int32 + IL_0058: stloc.2 + IL_0059: ldc.i4.0 + IL_005a: conv.i8 + IL_005b: stloc.3 + IL_005c: ldarg.0 + IL_005d: stloc.s V_4 + IL_005f: br.s IL_0076 + + IL_0061: ldloc.2 + IL_0062: ldloc.3 + IL_0063: conv.i + IL_0064: ldloc.s V_4 + IL_0066: stloc.s V_5 + IL_0068: ldloc.s V_5 + IL_006a: stelem.i4 + IL_006b: ldloc.s V_4 + IL_006d: ldarg.1 + IL_006e: add + IL_006f: stloc.s V_4 + IL_0071: ldloc.3 + IL_0072: ldc.i4.1 + IL_0073: conv.i8 + IL_0074: add + IL_0075: stloc.3 + IL_0076: ldloc.3 + IL_0077: ldloc.0 + IL_0078: blt.un.s IL_0061 + + IL_007a: ldloc.2 + IL_007b: ret } .method public static int32[] f16(int32 start, @@ -1153,46 +1139,44 @@ IL_0013: ldloc.0 IL_0014: stloc.1 IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: bge.un.s IL_0020 - - IL_001a: call !!0[] [runtime]System.Array::Empty() - IL_001f: ret - - IL_0020: ldloc.1 - IL_0021: conv.ovf.i.un - IL_0022: newarr [runtime]System.Int32 - IL_0027: stloc.2 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: stloc.3 - IL_002b: ldarg.0 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_0045 - - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stloc.s V_5 - IL_0037: ldloc.s V_5 - IL_0039: stelem.i4 - IL_003a: ldloc.s V_4 - IL_003c: ldc.i4.1 - IL_003d: add - IL_003e: stloc.s V_4 - IL_0040: ldloc.3 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.3 - IL_0045: ldloc.3 - IL_0046: ldloc.0 - IL_0047: blt.un.s IL_0030 - - IL_0049: ldloc.2 - IL_004a: ret + IL_0016: brtrue.s IL_001e + + IL_0018: call !!0[] [runtime]System.Array::Empty() + IL_001d: ret + + IL_001e: ldloc.1 + IL_001f: conv.ovf.i.un + IL_0020: newarr [runtime]System.Int32 + IL_0025: stloc.2 + IL_0026: ldc.i4.0 + IL_0027: conv.i8 + IL_0028: stloc.3 + IL_0029: ldarg.0 + IL_002a: stloc.s V_4 + IL_002c: br.s IL_0043 + + IL_002e: ldloc.2 + IL_002f: ldloc.3 + IL_0030: conv.i + IL_0031: ldloc.s V_4 + IL_0033: stloc.s V_5 + IL_0035: ldloc.s V_5 + IL_0037: stelem.i4 + IL_0038: ldloc.s V_4 + IL_003a: ldc.i4.1 + IL_003b: add + IL_003c: stloc.s V_4 + IL_003e: ldloc.3 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: ldloc.0 + IL_0045: blt.un.s IL_002e + + IL_0047: ldloc.2 + IL_0048: ret } .method public static int32[] f17(int32 step, @@ -1273,46 +1257,44 @@ IL_0041: ldloc.0 IL_0042: stloc.1 IL_0043: ldloc.1 - IL_0044: ldc.i4.1 - IL_0045: conv.i8 - IL_0046: bge.un.s IL_004e - - IL_0048: call !!0[] [runtime]System.Array::Empty() - IL_004d: ret - - IL_004e: ldloc.1 - IL_004f: conv.ovf.i.un - IL_0050: newarr [runtime]System.Int32 - IL_0055: stloc.2 - IL_0056: ldc.i4.0 - IL_0057: conv.i8 - IL_0058: stloc.3 - IL_0059: ldc.i4.1 - IL_005a: stloc.s V_4 - IL_005c: br.s IL_0073 - - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stloc.s V_5 - IL_0065: ldloc.s V_5 - IL_0067: stelem.i4 - IL_0068: ldloc.s V_4 - IL_006a: ldarg.0 - IL_006b: add - IL_006c: stloc.s V_4 - IL_006e: ldloc.3 - IL_006f: ldc.i4.1 - IL_0070: conv.i8 - IL_0071: add - IL_0072: stloc.3 - IL_0073: ldloc.3 - IL_0074: ldloc.0 - IL_0075: blt.un.s IL_005e - - IL_0077: ldloc.2 - IL_0078: ret + IL_0044: brtrue.s IL_004c + + IL_0046: call !!0[] [runtime]System.Array::Empty() + IL_004b: ret + + IL_004c: ldloc.1 + IL_004d: conv.ovf.i.un + IL_004e: newarr [runtime]System.Int32 + IL_0053: stloc.2 + IL_0054: ldc.i4.0 + IL_0055: conv.i8 + IL_0056: stloc.3 + IL_0057: ldc.i4.1 + IL_0058: stloc.s V_4 + IL_005a: br.s IL_0071 + + IL_005c: ldloc.2 + IL_005d: ldloc.3 + IL_005e: conv.i + IL_005f: ldloc.s V_4 + IL_0061: stloc.s V_5 + IL_0063: ldloc.s V_5 + IL_0065: stelem.i4 + IL_0066: ldloc.s V_4 + IL_0068: ldarg.0 + IL_0069: add + IL_006a: stloc.s V_4 + IL_006c: ldloc.3 + IL_006d: ldc.i4.1 + IL_006e: conv.i8 + IL_006f: add + IL_0070: stloc.3 + IL_0071: ldloc.3 + IL_0072: ldloc.0 + IL_0073: blt.un.s IL_005c + + IL_0075: ldloc.2 + IL_0076: ret } .method public static int32[] f18(int32 start, @@ -1395,46 +1377,44 @@ IL_0041: ldloc.0 IL_0042: stloc.1 IL_0043: ldloc.1 - IL_0044: ldc.i4.1 - IL_0045: conv.i8 - IL_0046: bge.un.s IL_004e - - IL_0048: call !!0[] [runtime]System.Array::Empty() - IL_004d: ret - - IL_004e: ldloc.1 - IL_004f: conv.ovf.i.un - IL_0050: newarr [runtime]System.Int32 - IL_0055: stloc.2 - IL_0056: ldc.i4.0 - IL_0057: conv.i8 - IL_0058: stloc.3 - IL_0059: ldarg.0 - IL_005a: stloc.s V_4 - IL_005c: br.s IL_0073 - - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stloc.s V_5 - IL_0065: ldloc.s V_5 - IL_0067: stelem.i4 - IL_0068: ldloc.s V_4 - IL_006a: ldarg.1 - IL_006b: add - IL_006c: stloc.s V_4 - IL_006e: ldloc.3 - IL_006f: ldc.i4.1 - IL_0070: conv.i8 - IL_0071: add - IL_0072: stloc.3 - IL_0073: ldloc.3 - IL_0074: ldloc.0 - IL_0075: blt.un.s IL_005e - - IL_0077: ldloc.2 - IL_0078: ret + IL_0044: brtrue.s IL_004c + + IL_0046: call !!0[] [runtime]System.Array::Empty() + IL_004b: ret + + IL_004c: ldloc.1 + IL_004d: conv.ovf.i.un + IL_004e: newarr [runtime]System.Int32 + IL_0053: stloc.2 + IL_0054: ldc.i4.0 + IL_0055: conv.i8 + IL_0056: stloc.3 + IL_0057: ldarg.0 + IL_0058: stloc.s V_4 + IL_005a: br.s IL_0071 + + IL_005c: ldloc.2 + IL_005d: ldloc.3 + IL_005e: conv.i + IL_005f: ldloc.s V_4 + IL_0061: stloc.s V_5 + IL_0063: ldloc.s V_5 + IL_0065: stelem.i4 + IL_0066: ldloc.s V_4 + IL_0068: ldarg.1 + IL_0069: add + IL_006a: stloc.s V_4 + IL_006c: ldloc.3 + IL_006d: ldc.i4.1 + IL_006e: conv.i8 + IL_006f: add + IL_0070: stloc.3 + IL_0071: ldloc.3 + IL_0072: ldloc.0 + IL_0073: blt.un.s IL_005c + + IL_0075: ldloc.2 + IL_0076: ret } .method public static int32[] f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1473,46 +1453,44 @@ IL_001c: ldloc.1 IL_001d: stloc.2 IL_001e: ldloc.2 - IL_001f: ldc.i4.1 - IL_0020: conv.i8 - IL_0021: bge.un.s IL_0029 + IL_001f: brtrue.s IL_0027 - IL_0023: call !!0[] [runtime]System.Array::Empty() - IL_0028: ret + IL_0021: call !!0[] [runtime]System.Array::Empty() + IL_0026: ret - IL_0029: ldloc.2 - IL_002a: conv.ovf.i.un - IL_002b: newarr [runtime]System.Int32 - IL_0030: stloc.3 - IL_0031: ldc.i4.0 - IL_0032: conv.i8 - IL_0033: stloc.s V_4 - IL_0035: ldloc.0 - IL_0036: stloc.s V_5 - IL_0038: br.s IL_0052 - - IL_003a: ldloc.3 - IL_003b: ldloc.s V_4 - IL_003d: conv.i - IL_003e: ldloc.s V_5 - IL_0040: stloc.s V_6 - IL_0042: ldloc.s V_6 - IL_0044: stelem.i4 - IL_0045: ldloc.s V_5 - IL_0047: ldc.i4.1 - IL_0048: add - IL_0049: stloc.s V_5 - IL_004b: ldloc.s V_4 - IL_004d: ldc.i4.1 - IL_004e: conv.i8 - IL_004f: add - IL_0050: stloc.s V_4 - IL_0052: ldloc.s V_4 - IL_0054: ldloc.1 - IL_0055: blt.un.s IL_003a - - IL_0057: ldloc.3 - IL_0058: ret + IL_0027: ldloc.2 + IL_0028: conv.ovf.i.un + IL_0029: newarr [runtime]System.Int32 + IL_002e: stloc.3 + IL_002f: ldc.i4.0 + IL_0030: conv.i8 + IL_0031: stloc.s V_4 + IL_0033: ldloc.0 + IL_0034: stloc.s V_5 + IL_0036: br.s IL_0050 + + IL_0038: ldloc.3 + IL_0039: ldloc.s V_4 + IL_003b: conv.i + IL_003c: ldloc.s V_5 + IL_003e: stloc.s V_6 + IL_0040: ldloc.s V_6 + IL_0042: stelem.i4 + IL_0043: ldloc.s V_5 + IL_0045: ldc.i4.1 + IL_0046: add + IL_0047: stloc.s V_5 + IL_0049: ldloc.s V_4 + IL_004b: ldc.i4.1 + IL_004c: conv.i8 + IL_004d: add + IL_004e: stloc.s V_4 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.1 + IL_0053: blt.un.s IL_0038 + + IL_0055: ldloc.3 + IL_0056: ret } .method public static int32[] f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1551,46 +1529,44 @@ IL_001a: ldloc.1 IL_001b: stloc.2 IL_001c: ldloc.2 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: bge.un.s IL_0027 - - IL_0021: call !!0[] [runtime]System.Array::Empty() - IL_0026: ret - - IL_0027: ldloc.2 - IL_0028: conv.ovf.i.un - IL_0029: newarr [runtime]System.Int32 - IL_002e: stloc.3 - IL_002f: ldc.i4.0 - IL_0030: conv.i8 - IL_0031: stloc.s V_4 - IL_0033: ldc.i4.1 - IL_0034: stloc.s V_5 - IL_0036: br.s IL_0050 + IL_001d: brtrue.s IL_0025 - IL_0038: ldloc.3 - IL_0039: ldloc.s V_4 - IL_003b: conv.i - IL_003c: ldloc.s V_5 - IL_003e: stloc.s V_6 - IL_0040: ldloc.s V_6 - IL_0042: stelem.i4 - IL_0043: ldloc.s V_5 - IL_0045: ldc.i4.1 - IL_0046: add - IL_0047: stloc.s V_5 - IL_0049: ldloc.s V_4 - IL_004b: ldc.i4.1 - IL_004c: conv.i8 - IL_004d: add - IL_004e: stloc.s V_4 - IL_0050: ldloc.s V_4 - IL_0052: ldloc.1 - IL_0053: blt.un.s IL_0038 + IL_001f: call !!0[] [runtime]System.Array::Empty() + IL_0024: ret - IL_0055: ldloc.3 - IL_0056: ret + IL_0025: ldloc.2 + IL_0026: conv.ovf.i.un + IL_0027: newarr [runtime]System.Int32 + IL_002c: stloc.3 + IL_002d: ldc.i4.0 + IL_002e: conv.i8 + IL_002f: stloc.s V_4 + IL_0031: ldc.i4.1 + IL_0032: stloc.s V_5 + IL_0034: br.s IL_004e + + IL_0036: ldloc.3 + IL_0037: ldloc.s V_4 + IL_0039: conv.i + IL_003a: ldloc.s V_5 + IL_003c: stloc.s V_6 + IL_003e: ldloc.s V_6 + IL_0040: stelem.i4 + IL_0041: ldloc.s V_5 + IL_0043: ldc.i4.1 + IL_0044: add + IL_0045: stloc.s V_5 + IL_0047: ldloc.s V_4 + IL_0049: ldc.i4.1 + IL_004a: conv.i8 + IL_004b: add + IL_004c: stloc.s V_4 + IL_004e: ldloc.s V_4 + IL_0050: ldloc.1 + IL_0051: blt.un.s IL_0036 + + IL_0053: ldloc.3 + IL_0054: ret } .method public static int32[] f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1636,46 +1612,44 @@ IL_0022: ldloc.2 IL_0023: stloc.3 IL_0024: ldloc.3 - IL_0025: ldc.i4.1 - IL_0026: conv.i8 - IL_0027: bge.un.s IL_002f - - IL_0029: call !!0[] [runtime]System.Array::Empty() - IL_002e: ret - - IL_002f: ldloc.3 - IL_0030: conv.ovf.i.un - IL_0031: newarr [runtime]System.Int32 - IL_0036: stloc.s V_4 - IL_0038: ldc.i4.0 - IL_0039: conv.i8 - IL_003a: stloc.s V_5 - IL_003c: ldloc.0 - IL_003d: stloc.s V_6 - IL_003f: br.s IL_005a - - IL_0041: ldloc.s V_4 - IL_0043: ldloc.s V_5 - IL_0045: conv.i - IL_0046: ldloc.s V_6 - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: stelem.i4 - IL_004d: ldloc.s V_6 - IL_004f: ldc.i4.1 - IL_0050: add - IL_0051: stloc.s V_6 - IL_0053: ldloc.s V_5 - IL_0055: ldc.i4.1 - IL_0056: conv.i8 - IL_0057: add - IL_0058: stloc.s V_5 - IL_005a: ldloc.s V_5 - IL_005c: ldloc.2 - IL_005d: blt.un.s IL_0041 + IL_0025: brtrue.s IL_002d + + IL_0027: call !!0[] [runtime]System.Array::Empty() + IL_002c: ret + + IL_002d: ldloc.3 + IL_002e: conv.ovf.i.un + IL_002f: newarr [runtime]System.Int32 + IL_0034: stloc.s V_4 + IL_0036: ldc.i4.0 + IL_0037: conv.i8 + IL_0038: stloc.s V_5 + IL_003a: ldloc.0 + IL_003b: stloc.s V_6 + IL_003d: br.s IL_0058 + + IL_003f: ldloc.s V_4 + IL_0041: ldloc.s V_5 + IL_0043: conv.i + IL_0044: ldloc.s V_6 + IL_0046: stloc.s V_7 + IL_0048: ldloc.s V_7 + IL_004a: stelem.i4 + IL_004b: ldloc.s V_6 + IL_004d: ldc.i4.1 + IL_004e: add + IL_004f: stloc.s V_6 + IL_0051: ldloc.s V_5 + IL_0053: ldc.i4.1 + IL_0054: conv.i8 + IL_0055: add + IL_0056: stloc.s V_5 + IL_0058: ldloc.s V_5 + IL_005a: ldloc.2 + IL_005b: blt.un.s IL_003f - IL_005f: ldloc.s V_4 - IL_0061: ret + IL_005d: ldloc.s V_4 + IL_005f: ret } .method public static int32[] f22(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1714,46 +1688,44 @@ IL_001c: ldloc.1 IL_001d: stloc.2 IL_001e: ldloc.2 - IL_001f: ldc.i4.1 - IL_0020: conv.i8 - IL_0021: bge.un.s IL_0029 + IL_001f: brtrue.s IL_0027 - IL_0023: call !!0[] [runtime]System.Array::Empty() - IL_0028: ret + IL_0021: call !!0[] [runtime]System.Array::Empty() + IL_0026: ret - IL_0029: ldloc.2 - IL_002a: conv.ovf.i.un - IL_002b: newarr [runtime]System.Int32 - IL_0030: stloc.3 - IL_0031: ldc.i4.0 - IL_0032: conv.i8 - IL_0033: stloc.s V_4 - IL_0035: ldloc.0 - IL_0036: stloc.s V_5 - IL_0038: br.s IL_0052 - - IL_003a: ldloc.3 - IL_003b: ldloc.s V_4 - IL_003d: conv.i - IL_003e: ldloc.s V_5 - IL_0040: stloc.s V_6 - IL_0042: ldloc.s V_6 - IL_0044: stelem.i4 - IL_0045: ldloc.s V_5 - IL_0047: ldc.i4.1 - IL_0048: add - IL_0049: stloc.s V_5 - IL_004b: ldloc.s V_4 - IL_004d: ldc.i4.1 - IL_004e: conv.i8 - IL_004f: add - IL_0050: stloc.s V_4 - IL_0052: ldloc.s V_4 - IL_0054: ldloc.1 - IL_0055: blt.un.s IL_003a - - IL_0057: ldloc.3 - IL_0058: ret + IL_0027: ldloc.2 + IL_0028: conv.ovf.i.un + IL_0029: newarr [runtime]System.Int32 + IL_002e: stloc.3 + IL_002f: ldc.i4.0 + IL_0030: conv.i8 + IL_0031: stloc.s V_4 + IL_0033: ldloc.0 + IL_0034: stloc.s V_5 + IL_0036: br.s IL_0050 + + IL_0038: ldloc.3 + IL_0039: ldloc.s V_4 + IL_003b: conv.i + IL_003c: ldloc.s V_5 + IL_003e: stloc.s V_6 + IL_0040: ldloc.s V_6 + IL_0042: stelem.i4 + IL_0043: ldloc.s V_5 + IL_0045: ldc.i4.1 + IL_0046: add + IL_0047: stloc.s V_5 + IL_0049: ldloc.s V_4 + IL_004b: ldc.i4.1 + IL_004c: conv.i8 + IL_004d: add + IL_004e: stloc.s V_4 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.1 + IL_0053: blt.un.s IL_0038 + + IL_0055: ldloc.3 + IL_0056: ret } .method public static int32[] f23(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1836,46 +1808,44 @@ IL_004d: ldloc.1 IL_004e: stloc.2 IL_004f: ldloc.2 - IL_0050: ldc.i4.1 - IL_0051: conv.i8 - IL_0052: bge.un.s IL_005a - - IL_0054: call !!0[] [runtime]System.Array::Empty() - IL_0059: ret - - IL_005a: ldloc.2 - IL_005b: conv.ovf.i.un - IL_005c: newarr [runtime]System.Int32 - IL_0061: stloc.3 - IL_0062: ldc.i4.0 - IL_0063: conv.i8 - IL_0064: stloc.s V_4 - IL_0066: ldc.i4.1 - IL_0067: stloc.s V_5 - IL_0069: br.s IL_0083 - - IL_006b: ldloc.3 - IL_006c: ldloc.s V_4 - IL_006e: conv.i - IL_006f: ldloc.s V_5 - IL_0071: stloc.s V_6 - IL_0073: ldloc.s V_6 - IL_0075: stelem.i4 - IL_0076: ldloc.s V_5 - IL_0078: ldloc.0 - IL_0079: add - IL_007a: stloc.s V_5 - IL_007c: ldloc.s V_4 - IL_007e: ldc.i4.1 - IL_007f: conv.i8 - IL_0080: add - IL_0081: stloc.s V_4 - IL_0083: ldloc.s V_4 - IL_0085: ldloc.1 - IL_0086: blt.un.s IL_006b - - IL_0088: ldloc.3 - IL_0089: ret + IL_0050: brtrue.s IL_0058 + + IL_0052: call !!0[] [runtime]System.Array::Empty() + IL_0057: ret + + IL_0058: ldloc.2 + IL_0059: conv.ovf.i.un + IL_005a: newarr [runtime]System.Int32 + IL_005f: stloc.3 + IL_0060: ldc.i4.0 + IL_0061: conv.i8 + IL_0062: stloc.s V_4 + IL_0064: ldc.i4.1 + IL_0065: stloc.s V_5 + IL_0067: br.s IL_0081 + + IL_0069: ldloc.3 + IL_006a: ldloc.s V_4 + IL_006c: conv.i + IL_006d: ldloc.s V_5 + IL_006f: stloc.s V_6 + IL_0071: ldloc.s V_6 + IL_0073: stelem.i4 + IL_0074: ldloc.s V_5 + IL_0076: ldloc.0 + IL_0077: add + IL_0078: stloc.s V_5 + IL_007a: ldloc.s V_4 + IL_007c: ldc.i4.1 + IL_007d: conv.i8 + IL_007e: add + IL_007f: stloc.s V_4 + IL_0081: ldloc.s V_4 + IL_0083: ldloc.1 + IL_0084: blt.un.s IL_0069 + + IL_0086: ldloc.3 + IL_0087: ret } .method public static int32[] f24(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1914,46 +1884,44 @@ IL_001a: ldloc.1 IL_001b: stloc.2 IL_001c: ldloc.2 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: bge.un.s IL_0027 + IL_001d: brtrue.s IL_0025 - IL_0021: call !!0[] [runtime]System.Array::Empty() - IL_0026: ret + IL_001f: call !!0[] [runtime]System.Array::Empty() + IL_0024: ret - IL_0027: ldloc.2 - IL_0028: conv.ovf.i.un - IL_0029: newarr [runtime]System.Int32 - IL_002e: stloc.3 - IL_002f: ldc.i4.0 - IL_0030: conv.i8 - IL_0031: stloc.s V_4 - IL_0033: ldc.i4.1 - IL_0034: stloc.s V_5 - IL_0036: br.s IL_0050 - - IL_0038: ldloc.3 - IL_0039: ldloc.s V_4 - IL_003b: conv.i - IL_003c: ldloc.s V_5 - IL_003e: stloc.s V_6 - IL_0040: ldloc.s V_6 - IL_0042: stelem.i4 - IL_0043: ldloc.s V_5 - IL_0045: ldc.i4.1 - IL_0046: add - IL_0047: stloc.s V_5 - IL_0049: ldloc.s V_4 - IL_004b: ldc.i4.1 - IL_004c: conv.i8 - IL_004d: add - IL_004e: stloc.s V_4 - IL_0050: ldloc.s V_4 - IL_0052: ldloc.1 - IL_0053: blt.un.s IL_0038 - - IL_0055: ldloc.3 - IL_0056: ret + IL_0025: ldloc.2 + IL_0026: conv.ovf.i.un + IL_0027: newarr [runtime]System.Int32 + IL_002c: stloc.3 + IL_002d: ldc.i4.0 + IL_002e: conv.i8 + IL_002f: stloc.s V_4 + IL_0031: ldc.i4.1 + IL_0032: stloc.s V_5 + IL_0034: br.s IL_004e + + IL_0036: ldloc.3 + IL_0037: ldloc.s V_4 + IL_0039: conv.i + IL_003a: ldloc.s V_5 + IL_003c: stloc.s V_6 + IL_003e: ldloc.s V_6 + IL_0040: stelem.i4 + IL_0041: ldloc.s V_5 + IL_0043: ldc.i4.1 + IL_0044: add + IL_0045: stloc.s V_5 + IL_0047: ldloc.s V_4 + IL_0049: ldc.i4.1 + IL_004a: conv.i8 + IL_004b: add + IL_004c: stloc.s V_4 + IL_004e: ldloc.s V_4 + IL_0050: ldloc.1 + IL_0051: blt.un.s IL_0036 + + IL_0053: ldloc.3 + IL_0054: ret } .method public static int32[] f25(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -2050,46 +2018,44 @@ IL_0058: ldloc.3 IL_0059: stloc.s V_4 IL_005b: ldloc.s V_4 - IL_005d: ldc.i4.1 - IL_005e: conv.i8 - IL_005f: bge.un.s IL_0067 - - IL_0061: call !!0[] [runtime]System.Array::Empty() - IL_0066: ret - - IL_0067: ldloc.s V_4 - IL_0069: conv.ovf.i.un - IL_006a: newarr [runtime]System.Int32 - IL_006f: stloc.s V_5 - IL_0071: ldc.i4.0 - IL_0072: conv.i8 - IL_0073: stloc.s V_6 - IL_0075: ldloc.0 - IL_0076: stloc.s V_7 - IL_0078: br.s IL_0093 - - IL_007a: ldloc.s V_5 - IL_007c: ldloc.s V_6 - IL_007e: conv.i - IL_007f: ldloc.s V_7 - IL_0081: stloc.s V_8 - IL_0083: ldloc.s V_8 - IL_0085: stelem.i4 - IL_0086: ldloc.s V_7 - IL_0088: ldloc.1 - IL_0089: add - IL_008a: stloc.s V_7 - IL_008c: ldloc.s V_6 - IL_008e: ldc.i4.1 - IL_008f: conv.i8 - IL_0090: add - IL_0091: stloc.s V_6 - IL_0093: ldloc.s V_6 - IL_0095: ldloc.3 - IL_0096: blt.un.s IL_007a - - IL_0098: ldloc.s V_5 - IL_009a: ret + IL_005d: brtrue.s IL_0065 + + IL_005f: call !!0[] [runtime]System.Array::Empty() + IL_0064: ret + + IL_0065: ldloc.s V_4 + IL_0067: conv.ovf.i.un + IL_0068: newarr [runtime]System.Int32 + IL_006d: stloc.s V_5 + IL_006f: ldc.i4.0 + IL_0070: conv.i8 + IL_0071: stloc.s V_6 + IL_0073: ldloc.0 + IL_0074: stloc.s V_7 + IL_0076: br.s IL_0091 + + IL_0078: ldloc.s V_5 + IL_007a: ldloc.s V_6 + IL_007c: conv.i + IL_007d: ldloc.s V_7 + IL_007f: stloc.s V_8 + IL_0081: ldloc.s V_8 + IL_0083: stelem.i4 + IL_0084: ldloc.s V_7 + IL_0086: ldloc.1 + IL_0087: add + IL_0088: stloc.s V_7 + IL_008a: ldloc.s V_6 + IL_008c: ldc.i4.1 + IL_008d: conv.i8 + IL_008e: add + IL_008f: stloc.s V_6 + IL_0091: ldloc.s V_6 + IL_0093: ldloc.3 + IL_0094: blt.un.s IL_0078 + + IL_0096: ldloc.s V_5 + IL_0098: ret } .method public static class [runtime]System.Tuple`2[] @@ -2173,50 +2139,48 @@ IL_0041: ldloc.0 IL_0042: stloc.1 IL_0043: ldloc.1 - IL_0044: ldc.i4.1 - IL_0045: conv.i8 - IL_0046: bge.un.s IL_004e - - IL_0048: call !!0[] [runtime]System.Array::Empty>() - IL_004d: ret - - IL_004e: ldloc.1 - IL_004f: conv.ovf.i.un - IL_0050: newarr class [runtime]System.Tuple`2 - IL_0055: stloc.2 - IL_0056: ldc.i4.0 - IL_0057: conv.i8 - IL_0058: stloc.3 - IL_0059: ldarg.0 - IL_005a: stloc.s V_4 - IL_005c: br.s IL_007f - - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stloc.s V_5 + IL_0044: brtrue.s IL_004c + + IL_0046: call !!0[] [runtime]System.Array::Empty>() + IL_004b: ret + + IL_004c: ldloc.1 + IL_004d: conv.ovf.i.un + IL_004e: newarr class [runtime]System.Tuple`2 + IL_0053: stloc.2 + IL_0054: ldc.i4.0 + IL_0055: conv.i8 + IL_0056: stloc.3 + IL_0057: ldarg.0 + IL_0058: stloc.s V_4 + IL_005a: br.s IL_007d + + IL_005c: ldloc.2 + IL_005d: ldloc.3 + IL_005e: conv.i + IL_005f: ldloc.s V_4 + IL_0061: stloc.s V_5 + IL_0063: ldloc.s V_5 IL_0065: ldloc.s V_5 - IL_0067: ldloc.s V_5 - IL_0069: conv.r8 - IL_006a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + IL_0067: conv.r8 + IL_0068: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, !1) - IL_006f: stelem class [runtime]System.Tuple`2 - IL_0074: ldloc.s V_4 - IL_0076: ldarg.1 - IL_0077: add - IL_0078: stloc.s V_4 - IL_007a: ldloc.3 - IL_007b: ldc.i4.1 - IL_007c: conv.i8 - IL_007d: add - IL_007e: stloc.3 - IL_007f: ldloc.3 - IL_0080: ldloc.0 - IL_0081: blt.un.s IL_005e - - IL_0083: ldloc.2 - IL_0084: ret + IL_006d: stelem class [runtime]System.Tuple`2 + IL_0072: ldloc.s V_4 + IL_0074: ldarg.1 + IL_0075: add + IL_0076: stloc.s V_4 + IL_0078: ldloc.3 + IL_0079: ldc.i4.1 + IL_007a: conv.i8 + IL_007b: add + IL_007c: stloc.3 + IL_007d: ldloc.3 + IL_007e: ldloc.0 + IL_007f: blt.un.s IL_005c + + IL_0081: ldloc.2 + IL_0082: ret } .method public static valuetype [runtime]System.ValueTuple`2[] @@ -2300,50 +2264,48 @@ IL_0041: ldloc.0 IL_0042: stloc.1 IL_0043: ldloc.1 - IL_0044: ldc.i4.1 - IL_0045: conv.i8 - IL_0046: bge.un.s IL_004e - - IL_0048: call !!0[] [runtime]System.Array::Empty>() - IL_004d: ret - - IL_004e: ldloc.1 - IL_004f: conv.ovf.i.un - IL_0050: newarr valuetype [runtime]System.ValueTuple`2 - IL_0055: stloc.2 - IL_0056: ldc.i4.0 - IL_0057: conv.i8 - IL_0058: stloc.3 - IL_0059: ldarg.0 - IL_005a: stloc.s V_4 - IL_005c: br.s IL_007f - - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stloc.s V_5 + IL_0044: brtrue.s IL_004c + + IL_0046: call !!0[] [runtime]System.Array::Empty>() + IL_004b: ret + + IL_004c: ldloc.1 + IL_004d: conv.ovf.i.un + IL_004e: newarr valuetype [runtime]System.ValueTuple`2 + IL_0053: stloc.2 + IL_0054: ldc.i4.0 + IL_0055: conv.i8 + IL_0056: stloc.3 + IL_0057: ldarg.0 + IL_0058: stloc.s V_4 + IL_005a: br.s IL_007d + + IL_005c: ldloc.2 + IL_005d: ldloc.3 + IL_005e: conv.i + IL_005f: ldloc.s V_4 + IL_0061: stloc.s V_5 + IL_0063: ldloc.s V_5 IL_0065: ldloc.s V_5 - IL_0067: ldloc.s V_5 - IL_0069: conv.r8 - IL_006a: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, + IL_0067: conv.r8 + IL_0068: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, !1) - IL_006f: stelem valuetype [runtime]System.ValueTuple`2 - IL_0074: ldloc.s V_4 - IL_0076: ldarg.1 - IL_0077: add - IL_0078: stloc.s V_4 - IL_007a: ldloc.3 - IL_007b: ldc.i4.1 - IL_007c: conv.i8 - IL_007d: add - IL_007e: stloc.3 - IL_007f: ldloc.3 - IL_0080: ldloc.0 - IL_0081: blt.un.s IL_005e - - IL_0083: ldloc.2 - IL_0084: ret + IL_006d: stelem valuetype [runtime]System.ValueTuple`2 + IL_0072: ldloc.s V_4 + IL_0074: ldarg.1 + IL_0075: add + IL_0076: stloc.s V_4 + IL_0078: ldloc.3 + IL_0079: ldc.i4.1 + IL_007a: conv.i8 + IL_007b: add + IL_007c: stloc.3 + IL_007d: ldloc.3 + IL_007e: ldloc.0 + IL_007f: blt.un.s IL_005c + + IL_0081: ldloc.2 + IL_0082: ret } .method public static int32[] f28(int32 start, @@ -2426,49 +2388,47 @@ IL_0041: ldloc.0 IL_0042: stloc.1 IL_0043: ldloc.1 - IL_0044: ldc.i4.1 - IL_0045: conv.i8 - IL_0046: bge.un.s IL_004e - - IL_0048: call !!0[] [runtime]System.Array::Empty() - IL_004d: ret - - IL_004e: ldloc.1 - IL_004f: conv.ovf.i.un - IL_0050: newarr [runtime]System.Int32 - IL_0055: stloc.2 - IL_0056: ldc.i4.0 - IL_0057: conv.i8 - IL_0058: stloc.3 - IL_0059: ldarg.0 - IL_005a: stloc.s V_4 - IL_005c: br.s IL_0077 - - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stloc.s V_5 - IL_0065: nop - IL_0066: ldloc.s V_5 - IL_0068: ldloc.s V_5 - IL_006a: mul - IL_006b: stelem.i4 - IL_006c: ldloc.s V_4 - IL_006e: ldarg.1 - IL_006f: add - IL_0070: stloc.s V_4 - IL_0072: ldloc.3 - IL_0073: ldc.i4.1 - IL_0074: conv.i8 - IL_0075: add - IL_0076: stloc.3 - IL_0077: ldloc.3 - IL_0078: ldloc.0 - IL_0079: blt.un.s IL_005e + IL_0044: brtrue.s IL_004c + + IL_0046: call !!0[] [runtime]System.Array::Empty() + IL_004b: ret + + IL_004c: ldloc.1 + IL_004d: conv.ovf.i.un + IL_004e: newarr [runtime]System.Int32 + IL_0053: stloc.2 + IL_0054: ldc.i4.0 + IL_0055: conv.i8 + IL_0056: stloc.3 + IL_0057: ldarg.0 + IL_0058: stloc.s V_4 + IL_005a: br.s IL_0075 - IL_007b: ldloc.2 - IL_007c: ret + IL_005c: ldloc.2 + IL_005d: ldloc.3 + IL_005e: conv.i + IL_005f: ldloc.s V_4 + IL_0061: stloc.s V_5 + IL_0063: nop + IL_0064: ldloc.s V_5 + IL_0066: ldloc.s V_5 + IL_0068: mul + IL_0069: stelem.i4 + IL_006a: ldloc.s V_4 + IL_006c: ldarg.1 + IL_006d: add + IL_006e: stloc.s V_4 + IL_0070: ldloc.3 + IL_0071: ldc.i4.1 + IL_0072: conv.i8 + IL_0073: add + IL_0074: stloc.3 + IL_0075: ldloc.3 + IL_0076: ldloc.0 + IL_0077: blt.un.s IL_005c + + IL_0079: ldloc.2 + IL_007a: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl index 36ec223fd7..fde4cd9584 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl @@ -308,44 +308,42 @@ IL_0015: ldloc.0 IL_0016: stloc.1 IL_0017: ldloc.1 - IL_0018: ldc.i4.1 - IL_0019: conv.i8 - IL_001a: bge.un.s IL_0022 - - IL_001c: call !!0[] [runtime]System.Array::Empty() - IL_0021: ret - - IL_0022: ldloc.1 - IL_0023: conv.ovf.i.un - IL_0024: newarr [runtime]System.Int32 - IL_0029: stloc.2 - IL_002a: ldc.i4.0 - IL_002b: conv.i8 - IL_002c: stloc.3 - IL_002d: ldarg.0 - IL_002e: stloc.s V_4 - IL_0030: br.s IL_0043 - - IL_0032: ldloc.2 - IL_0033: ldloc.3 - IL_0034: conv.i - IL_0035: ldloc.s V_4 - IL_0037: stelem.i4 - IL_0038: ldloc.s V_4 - IL_003a: ldc.i4.1 - IL_003b: add - IL_003c: stloc.s V_4 - IL_003e: ldloc.3 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: add - IL_0042: stloc.3 - IL_0043: ldloc.3 - IL_0044: ldloc.0 - IL_0045: blt.un.s IL_0032 - - IL_0047: ldloc.2 - IL_0048: ret + IL_0018: brtrue.s IL_0020 + + IL_001a: call !!0[] [runtime]System.Array::Empty() + IL_001f: ret + + IL_0020: ldloc.1 + IL_0021: conv.ovf.i.un + IL_0022: newarr [runtime]System.Int32 + IL_0027: stloc.2 + IL_0028: ldc.i4.0 + IL_0029: conv.i8 + IL_002a: stloc.3 + IL_002b: ldarg.0 + IL_002c: stloc.s V_4 + IL_002e: br.s IL_0041 + + IL_0030: ldloc.2 + IL_0031: ldloc.3 + IL_0032: conv.i + IL_0033: ldloc.s V_4 + IL_0035: stelem.i4 + IL_0036: ldloc.s V_4 + IL_0038: ldc.i4.1 + IL_0039: add + IL_003a: stloc.s V_4 + IL_003c: ldloc.3 + IL_003d: ldc.i4.1 + IL_003e: conv.i8 + IL_003f: add + IL_0040: stloc.3 + IL_0041: ldloc.3 + IL_0042: ldloc.0 + IL_0043: blt.un.s IL_0030 + + IL_0045: ldloc.2 + IL_0046: ret } .method public static int32[] f10(int32 finish) cil managed @@ -379,44 +377,42 @@ IL_0013: ldloc.0 IL_0014: stloc.1 IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: bge.un.s IL_0020 + IL_0016: brtrue.s IL_001e - IL_001a: call !!0[] [runtime]System.Array::Empty() - IL_001f: ret + IL_0018: call !!0[] [runtime]System.Array::Empty() + IL_001d: ret - IL_0020: ldloc.1 - IL_0021: conv.ovf.i.un - IL_0022: newarr [runtime]System.Int32 - IL_0027: stloc.2 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: stloc.3 - IL_002b: ldc.i4.1 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_0041 + IL_001e: ldloc.1 + IL_001f: conv.ovf.i.un + IL_0020: newarr [runtime]System.Int32 + IL_0025: stloc.2 + IL_0026: ldc.i4.0 + IL_0027: conv.i8 + IL_0028: stloc.3 + IL_0029: ldc.i4.1 + IL_002a: stloc.s V_4 + IL_002c: br.s IL_003f - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stelem.i4 - IL_0036: ldloc.s V_4 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: stloc.s V_4 - IL_003c: ldloc.3 - IL_003d: ldc.i4.1 - IL_003e: conv.i8 - IL_003f: add - IL_0040: stloc.3 - IL_0041: ldloc.3 - IL_0042: ldloc.0 - IL_0043: blt.un.s IL_0030 + IL_002e: ldloc.2 + IL_002f: ldloc.3 + IL_0030: conv.i + IL_0031: ldloc.s V_4 + IL_0033: stelem.i4 + IL_0034: ldloc.s V_4 + IL_0036: ldc.i4.1 + IL_0037: add + IL_0038: stloc.s V_4 + IL_003a: ldloc.3 + IL_003b: ldc.i4.1 + IL_003c: conv.i8 + IL_003d: add + IL_003e: stloc.3 + IL_003f: ldloc.3 + IL_0040: ldloc.0 + IL_0041: blt.un.s IL_002e - IL_0045: ldloc.2 - IL_0046: ret + IL_0043: ldloc.2 + IL_0044: ret } .method public static int32[] f11(int32 start, @@ -452,44 +448,42 @@ IL_0013: ldloc.0 IL_0014: stloc.1 IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: bge.un.s IL_0020 + IL_0016: brtrue.s IL_001e - IL_001a: call !!0[] [runtime]System.Array::Empty() - IL_001f: ret + IL_0018: call !!0[] [runtime]System.Array::Empty() + IL_001d: ret - IL_0020: ldloc.1 - IL_0021: conv.ovf.i.un - IL_0022: newarr [runtime]System.Int32 - IL_0027: stloc.2 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: stloc.3 - IL_002b: ldarg.0 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_0041 - - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stelem.i4 - IL_0036: ldloc.s V_4 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: stloc.s V_4 - IL_003c: ldloc.3 - IL_003d: ldc.i4.1 - IL_003e: conv.i8 - IL_003f: add - IL_0040: stloc.3 - IL_0041: ldloc.3 - IL_0042: ldloc.0 - IL_0043: blt.un.s IL_0030 + IL_001e: ldloc.1 + IL_001f: conv.ovf.i.un + IL_0020: newarr [runtime]System.Int32 + IL_0025: stloc.2 + IL_0026: ldc.i4.0 + IL_0027: conv.i8 + IL_0028: stloc.3 + IL_0029: ldarg.0 + IL_002a: stloc.s V_4 + IL_002c: br.s IL_003f + + IL_002e: ldloc.2 + IL_002f: ldloc.3 + IL_0030: conv.i + IL_0031: ldloc.s V_4 + IL_0033: stelem.i4 + IL_0034: ldloc.s V_4 + IL_0036: ldc.i4.1 + IL_0037: add + IL_0038: stloc.s V_4 + IL_003a: ldloc.3 + IL_003b: ldc.i4.1 + IL_003c: conv.i8 + IL_003d: add + IL_003e: stloc.3 + IL_003f: ldloc.3 + IL_0040: ldloc.0 + IL_0041: blt.un.s IL_002e - IL_0045: ldloc.2 - IL_0046: ret + IL_0043: ldloc.2 + IL_0044: ret } .method public static int32[] f12(int32 start) cil managed @@ -523,44 +517,42 @@ IL_0015: ldloc.0 IL_0016: stloc.1 IL_0017: ldloc.1 - IL_0018: ldc.i4.1 - IL_0019: conv.i8 - IL_001a: bge.un.s IL_0022 - - IL_001c: call !!0[] [runtime]System.Array::Empty() - IL_0021: ret - - IL_0022: ldloc.1 - IL_0023: conv.ovf.i.un - IL_0024: newarr [runtime]System.Int32 - IL_0029: stloc.2 - IL_002a: ldc.i4.0 - IL_002b: conv.i8 - IL_002c: stloc.3 - IL_002d: ldarg.0 - IL_002e: stloc.s V_4 - IL_0030: br.s IL_0043 - - IL_0032: ldloc.2 - IL_0033: ldloc.3 - IL_0034: conv.i - IL_0035: ldloc.s V_4 - IL_0037: stelem.i4 - IL_0038: ldloc.s V_4 - IL_003a: ldc.i4.1 - IL_003b: add - IL_003c: stloc.s V_4 - IL_003e: ldloc.3 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: add - IL_0042: stloc.3 - IL_0043: ldloc.3 - IL_0044: ldloc.0 - IL_0045: blt.un.s IL_0032 - - IL_0047: ldloc.2 - IL_0048: ret + IL_0018: brtrue.s IL_0020 + + IL_001a: call !!0[] [runtime]System.Array::Empty() + IL_001f: ret + + IL_0020: ldloc.1 + IL_0021: conv.ovf.i.un + IL_0022: newarr [runtime]System.Int32 + IL_0027: stloc.2 + IL_0028: ldc.i4.0 + IL_0029: conv.i8 + IL_002a: stloc.3 + IL_002b: ldarg.0 + IL_002c: stloc.s V_4 + IL_002e: br.s IL_0041 + + IL_0030: ldloc.2 + IL_0031: ldloc.3 + IL_0032: conv.i + IL_0033: ldloc.s V_4 + IL_0035: stelem.i4 + IL_0036: ldloc.s V_4 + IL_0038: ldc.i4.1 + IL_0039: add + IL_003a: stloc.s V_4 + IL_003c: ldloc.3 + IL_003d: ldc.i4.1 + IL_003e: conv.i8 + IL_003f: add + IL_0040: stloc.3 + IL_0041: ldloc.3 + IL_0042: ldloc.0 + IL_0043: blt.un.s IL_0030 + + IL_0045: ldloc.2 + IL_0046: ret } .method public static int32[] f13(int32 step) cil managed @@ -638,44 +630,42 @@ IL_0046: ldloc.0 IL_0047: stloc.1 IL_0048: ldloc.1 - IL_0049: ldc.i4.1 - IL_004a: conv.i8 - IL_004b: bge.un.s IL_0053 - - IL_004d: call !!0[] [runtime]System.Array::Empty() - IL_0052: ret - - IL_0053: ldloc.1 - IL_0054: conv.ovf.i.un - IL_0055: newarr [runtime]System.Int32 - IL_005a: stloc.2 - IL_005b: ldc.i4.0 - IL_005c: conv.i8 - IL_005d: stloc.3 - IL_005e: ldc.i4.1 - IL_005f: stloc.s V_4 - IL_0061: br.s IL_0074 - - IL_0063: ldloc.2 - IL_0064: ldloc.3 - IL_0065: conv.i - IL_0066: ldloc.s V_4 - IL_0068: stelem.i4 - IL_0069: ldloc.s V_4 - IL_006b: ldarg.0 - IL_006c: add - IL_006d: stloc.s V_4 - IL_006f: ldloc.3 - IL_0070: ldc.i4.1 - IL_0071: conv.i8 - IL_0072: add - IL_0073: stloc.3 - IL_0074: ldloc.3 - IL_0075: ldloc.0 - IL_0076: blt.un.s IL_0063 - - IL_0078: ldloc.2 - IL_0079: ret + IL_0049: brtrue.s IL_0051 + + IL_004b: call !!0[] [runtime]System.Array::Empty() + IL_0050: ret + + IL_0051: ldloc.1 + IL_0052: conv.ovf.i.un + IL_0053: newarr [runtime]System.Int32 + IL_0058: stloc.2 + IL_0059: ldc.i4.0 + IL_005a: conv.i8 + IL_005b: stloc.3 + IL_005c: ldc.i4.1 + IL_005d: stloc.s V_4 + IL_005f: br.s IL_0072 + + IL_0061: ldloc.2 + IL_0062: ldloc.3 + IL_0063: conv.i + IL_0064: ldloc.s V_4 + IL_0066: stelem.i4 + IL_0067: ldloc.s V_4 + IL_0069: ldarg.0 + IL_006a: add + IL_006b: stloc.s V_4 + IL_006d: ldloc.3 + IL_006e: ldc.i4.1 + IL_006f: conv.i8 + IL_0070: add + IL_0071: stloc.3 + IL_0072: ldloc.3 + IL_0073: ldloc.0 + IL_0074: blt.un.s IL_0061 + + IL_0076: ldloc.2 + IL_0077: ret } .method public static int32[] f14(int32 finish) cil managed @@ -709,44 +699,42 @@ IL_0013: ldloc.0 IL_0014: stloc.1 IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: bge.un.s IL_0020 + IL_0016: brtrue.s IL_001e - IL_001a: call !!0[] [runtime]System.Array::Empty() - IL_001f: ret + IL_0018: call !!0[] [runtime]System.Array::Empty() + IL_001d: ret - IL_0020: ldloc.1 - IL_0021: conv.ovf.i.un - IL_0022: newarr [runtime]System.Int32 - IL_0027: stloc.2 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: stloc.3 - IL_002b: ldc.i4.1 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_0041 + IL_001e: ldloc.1 + IL_001f: conv.ovf.i.un + IL_0020: newarr [runtime]System.Int32 + IL_0025: stloc.2 + IL_0026: ldc.i4.0 + IL_0027: conv.i8 + IL_0028: stloc.3 + IL_0029: ldc.i4.1 + IL_002a: stloc.s V_4 + IL_002c: br.s IL_003f - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stelem.i4 - IL_0036: ldloc.s V_4 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: stloc.s V_4 - IL_003c: ldloc.3 - IL_003d: ldc.i4.1 - IL_003e: conv.i8 - IL_003f: add - IL_0040: stloc.3 - IL_0041: ldloc.3 - IL_0042: ldloc.0 - IL_0043: blt.un.s IL_0030 + IL_002e: ldloc.2 + IL_002f: ldloc.3 + IL_0030: conv.i + IL_0031: ldloc.s V_4 + IL_0033: stelem.i4 + IL_0034: ldloc.s V_4 + IL_0036: ldc.i4.1 + IL_0037: add + IL_0038: stloc.s V_4 + IL_003a: ldloc.3 + IL_003b: ldc.i4.1 + IL_003c: conv.i8 + IL_003d: add + IL_003e: stloc.3 + IL_003f: ldloc.3 + IL_0040: ldloc.0 + IL_0041: blt.un.s IL_002e - IL_0045: ldloc.2 - IL_0046: ret + IL_0043: ldloc.2 + IL_0044: ret } .method public static int32[] f15(int32 start, @@ -826,44 +814,42 @@ IL_0046: ldloc.0 IL_0047: stloc.1 IL_0048: ldloc.1 - IL_0049: ldc.i4.1 - IL_004a: conv.i8 - IL_004b: bge.un.s IL_0053 - - IL_004d: call !!0[] [runtime]System.Array::Empty() - IL_0052: ret - - IL_0053: ldloc.1 - IL_0054: conv.ovf.i.un - IL_0055: newarr [runtime]System.Int32 - IL_005a: stloc.2 - IL_005b: ldc.i4.0 - IL_005c: conv.i8 - IL_005d: stloc.3 - IL_005e: ldarg.0 - IL_005f: stloc.s V_4 - IL_0061: br.s IL_0074 - - IL_0063: ldloc.2 - IL_0064: ldloc.3 - IL_0065: conv.i - IL_0066: ldloc.s V_4 - IL_0068: stelem.i4 - IL_0069: ldloc.s V_4 - IL_006b: ldarg.1 - IL_006c: add - IL_006d: stloc.s V_4 - IL_006f: ldloc.3 - IL_0070: ldc.i4.1 - IL_0071: conv.i8 - IL_0072: add - IL_0073: stloc.3 - IL_0074: ldloc.3 - IL_0075: ldloc.0 - IL_0076: blt.un.s IL_0063 - - IL_0078: ldloc.2 - IL_0079: ret + IL_0049: brtrue.s IL_0051 + + IL_004b: call !!0[] [runtime]System.Array::Empty() + IL_0050: ret + + IL_0051: ldloc.1 + IL_0052: conv.ovf.i.un + IL_0053: newarr [runtime]System.Int32 + IL_0058: stloc.2 + IL_0059: ldc.i4.0 + IL_005a: conv.i8 + IL_005b: stloc.3 + IL_005c: ldarg.0 + IL_005d: stloc.s V_4 + IL_005f: br.s IL_0072 + + IL_0061: ldloc.2 + IL_0062: ldloc.3 + IL_0063: conv.i + IL_0064: ldloc.s V_4 + IL_0066: stelem.i4 + IL_0067: ldloc.s V_4 + IL_0069: ldarg.1 + IL_006a: add + IL_006b: stloc.s V_4 + IL_006d: ldloc.3 + IL_006e: ldc.i4.1 + IL_006f: conv.i8 + IL_0070: add + IL_0071: stloc.3 + IL_0072: ldloc.3 + IL_0073: ldloc.0 + IL_0074: blt.un.s IL_0061 + + IL_0076: ldloc.2 + IL_0077: ret } .method public static int32[] f16(int32 start, @@ -899,44 +885,42 @@ IL_0013: ldloc.0 IL_0014: stloc.1 IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: bge.un.s IL_0020 + IL_0016: brtrue.s IL_001e - IL_001a: call !!0[] [runtime]System.Array::Empty() - IL_001f: ret - - IL_0020: ldloc.1 - IL_0021: conv.ovf.i.un - IL_0022: newarr [runtime]System.Int32 - IL_0027: stloc.2 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: stloc.3 - IL_002b: ldarg.0 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_0041 + IL_0018: call !!0[] [runtime]System.Array::Empty() + IL_001d: ret - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stelem.i4 - IL_0036: ldloc.s V_4 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: stloc.s V_4 - IL_003c: ldloc.3 - IL_003d: ldc.i4.1 - IL_003e: conv.i8 - IL_003f: add - IL_0040: stloc.3 - IL_0041: ldloc.3 - IL_0042: ldloc.0 - IL_0043: blt.un.s IL_0030 + IL_001e: ldloc.1 + IL_001f: conv.ovf.i.un + IL_0020: newarr [runtime]System.Int32 + IL_0025: stloc.2 + IL_0026: ldc.i4.0 + IL_0027: conv.i8 + IL_0028: stloc.3 + IL_0029: ldarg.0 + IL_002a: stloc.s V_4 + IL_002c: br.s IL_003f + + IL_002e: ldloc.2 + IL_002f: ldloc.3 + IL_0030: conv.i + IL_0031: ldloc.s V_4 + IL_0033: stelem.i4 + IL_0034: ldloc.s V_4 + IL_0036: ldc.i4.1 + IL_0037: add + IL_0038: stloc.s V_4 + IL_003a: ldloc.3 + IL_003b: ldc.i4.1 + IL_003c: conv.i8 + IL_003d: add + IL_003e: stloc.3 + IL_003f: ldloc.3 + IL_0040: ldloc.0 + IL_0041: blt.un.s IL_002e - IL_0045: ldloc.2 - IL_0046: ret + IL_0043: ldloc.2 + IL_0044: ret } .method public static int32[] f17(int32 step, @@ -1016,44 +1000,42 @@ IL_0041: ldloc.0 IL_0042: stloc.1 IL_0043: ldloc.1 - IL_0044: ldc.i4.1 - IL_0045: conv.i8 - IL_0046: bge.un.s IL_004e - - IL_0048: call !!0[] [runtime]System.Array::Empty() - IL_004d: ret - - IL_004e: ldloc.1 - IL_004f: conv.ovf.i.un - IL_0050: newarr [runtime]System.Int32 - IL_0055: stloc.2 - IL_0056: ldc.i4.0 - IL_0057: conv.i8 - IL_0058: stloc.3 - IL_0059: ldc.i4.1 - IL_005a: stloc.s V_4 - IL_005c: br.s IL_006f - - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stelem.i4 - IL_0064: ldloc.s V_4 - IL_0066: ldarg.0 - IL_0067: add - IL_0068: stloc.s V_4 - IL_006a: ldloc.3 - IL_006b: ldc.i4.1 - IL_006c: conv.i8 - IL_006d: add - IL_006e: stloc.3 - IL_006f: ldloc.3 - IL_0070: ldloc.0 - IL_0071: blt.un.s IL_005e - - IL_0073: ldloc.2 - IL_0074: ret + IL_0044: brtrue.s IL_004c + + IL_0046: call !!0[] [runtime]System.Array::Empty() + IL_004b: ret + + IL_004c: ldloc.1 + IL_004d: conv.ovf.i.un + IL_004e: newarr [runtime]System.Int32 + IL_0053: stloc.2 + IL_0054: ldc.i4.0 + IL_0055: conv.i8 + IL_0056: stloc.3 + IL_0057: ldc.i4.1 + IL_0058: stloc.s V_4 + IL_005a: br.s IL_006d + + IL_005c: ldloc.2 + IL_005d: ldloc.3 + IL_005e: conv.i + IL_005f: ldloc.s V_4 + IL_0061: stelem.i4 + IL_0062: ldloc.s V_4 + IL_0064: ldarg.0 + IL_0065: add + IL_0066: stloc.s V_4 + IL_0068: ldloc.3 + IL_0069: ldc.i4.1 + IL_006a: conv.i8 + IL_006b: add + IL_006c: stloc.3 + IL_006d: ldloc.3 + IL_006e: ldloc.0 + IL_006f: blt.un.s IL_005c + + IL_0071: ldloc.2 + IL_0072: ret } .method public static int32[] f18(int32 start, @@ -1135,44 +1117,42 @@ IL_0041: ldloc.0 IL_0042: stloc.1 IL_0043: ldloc.1 - IL_0044: ldc.i4.1 - IL_0045: conv.i8 - IL_0046: bge.un.s IL_004e - - IL_0048: call !!0[] [runtime]System.Array::Empty() - IL_004d: ret - - IL_004e: ldloc.1 - IL_004f: conv.ovf.i.un - IL_0050: newarr [runtime]System.Int32 - IL_0055: stloc.2 - IL_0056: ldc.i4.0 - IL_0057: conv.i8 - IL_0058: stloc.3 - IL_0059: ldarg.0 - IL_005a: stloc.s V_4 - IL_005c: br.s IL_006f - - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stelem.i4 - IL_0064: ldloc.s V_4 - IL_0066: ldarg.1 - IL_0067: add - IL_0068: stloc.s V_4 - IL_006a: ldloc.3 - IL_006b: ldc.i4.1 - IL_006c: conv.i8 - IL_006d: add - IL_006e: stloc.3 - IL_006f: ldloc.3 - IL_0070: ldloc.0 - IL_0071: blt.un.s IL_005e - - IL_0073: ldloc.2 - IL_0074: ret + IL_0044: brtrue.s IL_004c + + IL_0046: call !!0[] [runtime]System.Array::Empty() + IL_004b: ret + + IL_004c: ldloc.1 + IL_004d: conv.ovf.i.un + IL_004e: newarr [runtime]System.Int32 + IL_0053: stloc.2 + IL_0054: ldc.i4.0 + IL_0055: conv.i8 + IL_0056: stloc.3 + IL_0057: ldarg.0 + IL_0058: stloc.s V_4 + IL_005a: br.s IL_006d + + IL_005c: ldloc.2 + IL_005d: ldloc.3 + IL_005e: conv.i + IL_005f: ldloc.s V_4 + IL_0061: stelem.i4 + IL_0062: ldloc.s V_4 + IL_0064: ldarg.1 + IL_0065: add + IL_0066: stloc.s V_4 + IL_0068: ldloc.3 + IL_0069: ldc.i4.1 + IL_006a: conv.i8 + IL_006b: add + IL_006c: stloc.3 + IL_006d: ldloc.3 + IL_006e: ldloc.0 + IL_006f: blt.un.s IL_005c + + IL_0071: ldloc.2 + IL_0072: ret } .method public static int32[] f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1210,44 +1190,42 @@ IL_001c: ldloc.1 IL_001d: stloc.2 IL_001e: ldloc.2 - IL_001f: ldc.i4.1 - IL_0020: conv.i8 - IL_0021: bge.un.s IL_0029 - - IL_0023: call !!0[] [runtime]System.Array::Empty() - IL_0028: ret - - IL_0029: ldloc.2 - IL_002a: conv.ovf.i.un - IL_002b: newarr [runtime]System.Int32 - IL_0030: stloc.3 - IL_0031: ldc.i4.0 - IL_0032: conv.i8 - IL_0033: stloc.s V_4 - IL_0035: ldloc.0 - IL_0036: stloc.s V_5 - IL_0038: br.s IL_004e + IL_001f: brtrue.s IL_0027 - IL_003a: ldloc.3 - IL_003b: ldloc.s V_4 - IL_003d: conv.i - IL_003e: ldloc.s V_5 - IL_0040: stelem.i4 - IL_0041: ldloc.s V_5 - IL_0043: ldc.i4.1 - IL_0044: add - IL_0045: stloc.s V_5 - IL_0047: ldloc.s V_4 - IL_0049: ldc.i4.1 - IL_004a: conv.i8 - IL_004b: add - IL_004c: stloc.s V_4 - IL_004e: ldloc.s V_4 - IL_0050: ldloc.1 - IL_0051: blt.un.s IL_003a - - IL_0053: ldloc.3 - IL_0054: ret + IL_0021: call !!0[] [runtime]System.Array::Empty() + IL_0026: ret + + IL_0027: ldloc.2 + IL_0028: conv.ovf.i.un + IL_0029: newarr [runtime]System.Int32 + IL_002e: stloc.3 + IL_002f: ldc.i4.0 + IL_0030: conv.i8 + IL_0031: stloc.s V_4 + IL_0033: ldloc.0 + IL_0034: stloc.s V_5 + IL_0036: br.s IL_004c + + IL_0038: ldloc.3 + IL_0039: ldloc.s V_4 + IL_003b: conv.i + IL_003c: ldloc.s V_5 + IL_003e: stelem.i4 + IL_003f: ldloc.s V_5 + IL_0041: ldc.i4.1 + IL_0042: add + IL_0043: stloc.s V_5 + IL_0045: ldloc.s V_4 + IL_0047: ldc.i4.1 + IL_0048: conv.i8 + IL_0049: add + IL_004a: stloc.s V_4 + IL_004c: ldloc.s V_4 + IL_004e: ldloc.1 + IL_004f: blt.un.s IL_0038 + + IL_0051: ldloc.3 + IL_0052: ret } .method public static int32[] f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1285,44 +1263,42 @@ IL_001a: ldloc.1 IL_001b: stloc.2 IL_001c: ldloc.2 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: bge.un.s IL_0027 - - IL_0021: call !!0[] [runtime]System.Array::Empty() - IL_0026: ret - - IL_0027: ldloc.2 - IL_0028: conv.ovf.i.un - IL_0029: newarr [runtime]System.Int32 - IL_002e: stloc.3 - IL_002f: ldc.i4.0 - IL_0030: conv.i8 - IL_0031: stloc.s V_4 - IL_0033: ldc.i4.1 - IL_0034: stloc.s V_5 - IL_0036: br.s IL_004c + IL_001d: brtrue.s IL_0025 - IL_0038: ldloc.3 - IL_0039: ldloc.s V_4 - IL_003b: conv.i - IL_003c: ldloc.s V_5 - IL_003e: stelem.i4 - IL_003f: ldloc.s V_5 - IL_0041: ldc.i4.1 - IL_0042: add - IL_0043: stloc.s V_5 - IL_0045: ldloc.s V_4 - IL_0047: ldc.i4.1 - IL_0048: conv.i8 - IL_0049: add - IL_004a: stloc.s V_4 - IL_004c: ldloc.s V_4 - IL_004e: ldloc.1 - IL_004f: blt.un.s IL_0038 + IL_001f: call !!0[] [runtime]System.Array::Empty() + IL_0024: ret - IL_0051: ldloc.3 - IL_0052: ret + IL_0025: ldloc.2 + IL_0026: conv.ovf.i.un + IL_0027: newarr [runtime]System.Int32 + IL_002c: stloc.3 + IL_002d: ldc.i4.0 + IL_002e: conv.i8 + IL_002f: stloc.s V_4 + IL_0031: ldc.i4.1 + IL_0032: stloc.s V_5 + IL_0034: br.s IL_004a + + IL_0036: ldloc.3 + IL_0037: ldloc.s V_4 + IL_0039: conv.i + IL_003a: ldloc.s V_5 + IL_003c: stelem.i4 + IL_003d: ldloc.s V_5 + IL_003f: ldc.i4.1 + IL_0040: add + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_4 + IL_0045: ldc.i4.1 + IL_0046: conv.i8 + IL_0047: add + IL_0048: stloc.s V_4 + IL_004a: ldloc.s V_4 + IL_004c: ldloc.1 + IL_004d: blt.un.s IL_0036 + + IL_004f: ldloc.3 + IL_0050: ret } .method public static int32[] f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1367,44 +1343,42 @@ IL_0022: ldloc.2 IL_0023: stloc.3 IL_0024: ldloc.3 - IL_0025: ldc.i4.1 - IL_0026: conv.i8 - IL_0027: bge.un.s IL_002f - - IL_0029: call !!0[] [runtime]System.Array::Empty() - IL_002e: ret - - IL_002f: ldloc.3 - IL_0030: conv.ovf.i.un - IL_0031: newarr [runtime]System.Int32 - IL_0036: stloc.s V_4 - IL_0038: ldc.i4.0 - IL_0039: conv.i8 - IL_003a: stloc.s V_5 - IL_003c: ldloc.0 - IL_003d: stloc.s V_6 - IL_003f: br.s IL_0056 - - IL_0041: ldloc.s V_4 - IL_0043: ldloc.s V_5 - IL_0045: conv.i - IL_0046: ldloc.s V_6 - IL_0048: stelem.i4 - IL_0049: ldloc.s V_6 - IL_004b: ldc.i4.1 - IL_004c: add - IL_004d: stloc.s V_6 - IL_004f: ldloc.s V_5 - IL_0051: ldc.i4.1 - IL_0052: conv.i8 - IL_0053: add - IL_0054: stloc.s V_5 - IL_0056: ldloc.s V_5 - IL_0058: ldloc.2 - IL_0059: blt.un.s IL_0041 - - IL_005b: ldloc.s V_4 - IL_005d: ret + IL_0025: brtrue.s IL_002d + + IL_0027: call !!0[] [runtime]System.Array::Empty() + IL_002c: ret + + IL_002d: ldloc.3 + IL_002e: conv.ovf.i.un + IL_002f: newarr [runtime]System.Int32 + IL_0034: stloc.s V_4 + IL_0036: ldc.i4.0 + IL_0037: conv.i8 + IL_0038: stloc.s V_5 + IL_003a: ldloc.0 + IL_003b: stloc.s V_6 + IL_003d: br.s IL_0054 + + IL_003f: ldloc.s V_4 + IL_0041: ldloc.s V_5 + IL_0043: conv.i + IL_0044: ldloc.s V_6 + IL_0046: stelem.i4 + IL_0047: ldloc.s V_6 + IL_0049: ldc.i4.1 + IL_004a: add + IL_004b: stloc.s V_6 + IL_004d: ldloc.s V_5 + IL_004f: ldc.i4.1 + IL_0050: conv.i8 + IL_0051: add + IL_0052: stloc.s V_5 + IL_0054: ldloc.s V_5 + IL_0056: ldloc.2 + IL_0057: blt.un.s IL_003f + + IL_0059: ldloc.s V_4 + IL_005b: ret } .method public static int32[] f22(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1442,44 +1416,42 @@ IL_001c: ldloc.1 IL_001d: stloc.2 IL_001e: ldloc.2 - IL_001f: ldc.i4.1 - IL_0020: conv.i8 - IL_0021: bge.un.s IL_0029 - - IL_0023: call !!0[] [runtime]System.Array::Empty() - IL_0028: ret - - IL_0029: ldloc.2 - IL_002a: conv.ovf.i.un - IL_002b: newarr [runtime]System.Int32 - IL_0030: stloc.3 - IL_0031: ldc.i4.0 - IL_0032: conv.i8 - IL_0033: stloc.s V_4 - IL_0035: ldloc.0 - IL_0036: stloc.s V_5 - IL_0038: br.s IL_004e + IL_001f: brtrue.s IL_0027 - IL_003a: ldloc.3 - IL_003b: ldloc.s V_4 - IL_003d: conv.i - IL_003e: ldloc.s V_5 - IL_0040: stelem.i4 - IL_0041: ldloc.s V_5 - IL_0043: ldc.i4.1 - IL_0044: add - IL_0045: stloc.s V_5 - IL_0047: ldloc.s V_4 - IL_0049: ldc.i4.1 - IL_004a: conv.i8 - IL_004b: add - IL_004c: stloc.s V_4 - IL_004e: ldloc.s V_4 - IL_0050: ldloc.1 - IL_0051: blt.un.s IL_003a - - IL_0053: ldloc.3 - IL_0054: ret + IL_0021: call !!0[] [runtime]System.Array::Empty() + IL_0026: ret + + IL_0027: ldloc.2 + IL_0028: conv.ovf.i.un + IL_0029: newarr [runtime]System.Int32 + IL_002e: stloc.3 + IL_002f: ldc.i4.0 + IL_0030: conv.i8 + IL_0031: stloc.s V_4 + IL_0033: ldloc.0 + IL_0034: stloc.s V_5 + IL_0036: br.s IL_004c + + IL_0038: ldloc.3 + IL_0039: ldloc.s V_4 + IL_003b: conv.i + IL_003c: ldloc.s V_5 + IL_003e: stelem.i4 + IL_003f: ldloc.s V_5 + IL_0041: ldc.i4.1 + IL_0042: add + IL_0043: stloc.s V_5 + IL_0045: ldloc.s V_4 + IL_0047: ldc.i4.1 + IL_0048: conv.i8 + IL_0049: add + IL_004a: stloc.s V_4 + IL_004c: ldloc.s V_4 + IL_004e: ldloc.1 + IL_004f: blt.un.s IL_0038 + + IL_0051: ldloc.3 + IL_0052: ret } .method public static int32[] f23(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1561,44 +1533,42 @@ IL_004d: ldloc.1 IL_004e: stloc.2 IL_004f: ldloc.2 - IL_0050: ldc.i4.1 - IL_0051: conv.i8 - IL_0052: bge.un.s IL_005a - - IL_0054: call !!0[] [runtime]System.Array::Empty() - IL_0059: ret - - IL_005a: ldloc.2 - IL_005b: conv.ovf.i.un - IL_005c: newarr [runtime]System.Int32 - IL_0061: stloc.3 - IL_0062: ldc.i4.0 - IL_0063: conv.i8 - IL_0064: stloc.s V_4 - IL_0066: ldc.i4.1 - IL_0067: stloc.s V_5 - IL_0069: br.s IL_007f - - IL_006b: ldloc.3 - IL_006c: ldloc.s V_4 - IL_006e: conv.i - IL_006f: ldloc.s V_5 - IL_0071: stelem.i4 - IL_0072: ldloc.s V_5 - IL_0074: ldloc.0 - IL_0075: add - IL_0076: stloc.s V_5 - IL_0078: ldloc.s V_4 - IL_007a: ldc.i4.1 - IL_007b: conv.i8 - IL_007c: add - IL_007d: stloc.s V_4 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.1 - IL_0082: blt.un.s IL_006b - - IL_0084: ldloc.3 - IL_0085: ret + IL_0050: brtrue.s IL_0058 + + IL_0052: call !!0[] [runtime]System.Array::Empty() + IL_0057: ret + + IL_0058: ldloc.2 + IL_0059: conv.ovf.i.un + IL_005a: newarr [runtime]System.Int32 + IL_005f: stloc.3 + IL_0060: ldc.i4.0 + IL_0061: conv.i8 + IL_0062: stloc.s V_4 + IL_0064: ldc.i4.1 + IL_0065: stloc.s V_5 + IL_0067: br.s IL_007d + + IL_0069: ldloc.3 + IL_006a: ldloc.s V_4 + IL_006c: conv.i + IL_006d: ldloc.s V_5 + IL_006f: stelem.i4 + IL_0070: ldloc.s V_5 + IL_0072: ldloc.0 + IL_0073: add + IL_0074: stloc.s V_5 + IL_0076: ldloc.s V_4 + IL_0078: ldc.i4.1 + IL_0079: conv.i8 + IL_007a: add + IL_007b: stloc.s V_4 + IL_007d: ldloc.s V_4 + IL_007f: ldloc.1 + IL_0080: blt.un.s IL_0069 + + IL_0082: ldloc.3 + IL_0083: ret } .method public static int32[] f24(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1636,44 +1606,42 @@ IL_001a: ldloc.1 IL_001b: stloc.2 IL_001c: ldloc.2 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: bge.un.s IL_0027 - - IL_0021: call !!0[] [runtime]System.Array::Empty() - IL_0026: ret - - IL_0027: ldloc.2 - IL_0028: conv.ovf.i.un - IL_0029: newarr [runtime]System.Int32 - IL_002e: stloc.3 - IL_002f: ldc.i4.0 - IL_0030: conv.i8 - IL_0031: stloc.s V_4 - IL_0033: ldc.i4.1 - IL_0034: stloc.s V_5 - IL_0036: br.s IL_004c + IL_001d: brtrue.s IL_0025 - IL_0038: ldloc.3 - IL_0039: ldloc.s V_4 - IL_003b: conv.i - IL_003c: ldloc.s V_5 - IL_003e: stelem.i4 - IL_003f: ldloc.s V_5 - IL_0041: ldc.i4.1 - IL_0042: add - IL_0043: stloc.s V_5 - IL_0045: ldloc.s V_4 - IL_0047: ldc.i4.1 - IL_0048: conv.i8 - IL_0049: add - IL_004a: stloc.s V_4 - IL_004c: ldloc.s V_4 - IL_004e: ldloc.1 - IL_004f: blt.un.s IL_0038 + IL_001f: call !!0[] [runtime]System.Array::Empty() + IL_0024: ret - IL_0051: ldloc.3 - IL_0052: ret + IL_0025: ldloc.2 + IL_0026: conv.ovf.i.un + IL_0027: newarr [runtime]System.Int32 + IL_002c: stloc.3 + IL_002d: ldc.i4.0 + IL_002e: conv.i8 + IL_002f: stloc.s V_4 + IL_0031: ldc.i4.1 + IL_0032: stloc.s V_5 + IL_0034: br.s IL_004a + + IL_0036: ldloc.3 + IL_0037: ldloc.s V_4 + IL_0039: conv.i + IL_003a: ldloc.s V_5 + IL_003c: stelem.i4 + IL_003d: ldloc.s V_5 + IL_003f: ldc.i4.1 + IL_0040: add + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_4 + IL_0045: ldc.i4.1 + IL_0046: conv.i8 + IL_0047: add + IL_0048: stloc.s V_4 + IL_004a: ldloc.s V_4 + IL_004c: ldloc.1 + IL_004d: blt.un.s IL_0036 + + IL_004f: ldloc.3 + IL_0050: ret } .method public static int32[] f25(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1769,44 +1737,42 @@ IL_0058: ldloc.3 IL_0059: stloc.s V_4 IL_005b: ldloc.s V_4 - IL_005d: ldc.i4.1 - IL_005e: conv.i8 - IL_005f: bge.un.s IL_0067 - - IL_0061: call !!0[] [runtime]System.Array::Empty() - IL_0066: ret - - IL_0067: ldloc.s V_4 - IL_0069: conv.ovf.i.un - IL_006a: newarr [runtime]System.Int32 - IL_006f: stloc.s V_5 - IL_0071: ldc.i4.0 - IL_0072: conv.i8 - IL_0073: stloc.s V_6 - IL_0075: ldloc.0 - IL_0076: stloc.s V_7 - IL_0078: br.s IL_008f - - IL_007a: ldloc.s V_5 - IL_007c: ldloc.s V_6 - IL_007e: conv.i - IL_007f: ldloc.s V_7 - IL_0081: stelem.i4 - IL_0082: ldloc.s V_7 - IL_0084: ldloc.1 - IL_0085: add - IL_0086: stloc.s V_7 - IL_0088: ldloc.s V_6 - IL_008a: ldc.i4.1 - IL_008b: conv.i8 - IL_008c: add - IL_008d: stloc.s V_6 - IL_008f: ldloc.s V_6 - IL_0091: ldloc.3 - IL_0092: blt.un.s IL_007a - - IL_0094: ldloc.s V_5 - IL_0096: ret + IL_005d: brtrue.s IL_0065 + + IL_005f: call !!0[] [runtime]System.Array::Empty() + IL_0064: ret + + IL_0065: ldloc.s V_4 + IL_0067: conv.ovf.i.un + IL_0068: newarr [runtime]System.Int32 + IL_006d: stloc.s V_5 + IL_006f: ldc.i4.0 + IL_0070: conv.i8 + IL_0071: stloc.s V_6 + IL_0073: ldloc.0 + IL_0074: stloc.s V_7 + IL_0076: br.s IL_008d + + IL_0078: ldloc.s V_5 + IL_007a: ldloc.s V_6 + IL_007c: conv.i + IL_007d: ldloc.s V_7 + IL_007f: stelem.i4 + IL_0080: ldloc.s V_7 + IL_0082: ldloc.1 + IL_0083: add + IL_0084: stloc.s V_7 + IL_0086: ldloc.s V_6 + IL_0088: ldc.i4.1 + IL_0089: conv.i8 + IL_008a: add + IL_008b: stloc.s V_6 + IL_008d: ldloc.s V_6 + IL_008f: ldloc.3 + IL_0090: blt.un.s IL_0078 + + IL_0092: ldloc.s V_5 + IL_0094: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeArrays.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeArrays.fs.il.bsl index d35ebad114..9a616f7184 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeArrays.fs.il.bsl @@ -223,45 +223,43 @@ IL_0016: ldloc.0 IL_0017: stloc.1 IL_0018: ldloc.1 - IL_0019: ldc.i4.1 - IL_001a: conv.i8 - IL_001b: bge.un.s IL_0023 + IL_0019: brtrue.s IL_0021 - IL_001d: call !!0[] [runtime]System.Array::Empty() - IL_0022: ret + IL_001b: call !!0[] [runtime]System.Array::Empty() + IL_0020: ret - IL_0023: ldloc.1 - IL_0024: conv.ovf.i.un - IL_0025: newarr [runtime]System.UInt64 - IL_002a: stloc.2 - IL_002b: ldc.i4.0 - IL_002c: conv.i8 - IL_002d: stloc.3 - IL_002e: ldarg.0 - IL_002f: stloc.s V_4 - IL_0031: br.s IL_0045 + IL_0021: ldloc.1 + IL_0022: conv.ovf.i.un + IL_0023: newarr [runtime]System.UInt64 + IL_0028: stloc.2 + IL_0029: ldc.i4.0 + IL_002a: conv.i8 + IL_002b: stloc.3 + IL_002c: ldarg.0 + IL_002d: stloc.s V_4 + IL_002f: br.s IL_0043 - IL_0033: ldloc.2 - IL_0034: ldloc.3 - IL_0035: conv.i - IL_0036: ldloc.s V_4 - IL_0038: stelem.i8 - IL_0039: ldloc.s V_4 - IL_003b: ldc.i4.1 - IL_003c: conv.i8 - IL_003d: add - IL_003e: stloc.s V_4 - IL_0040: ldloc.3 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.3 - IL_0045: ldloc.3 - IL_0046: ldloc.0 - IL_0047: blt.un.s IL_0033 + IL_0031: ldloc.2 + IL_0032: ldloc.3 + IL_0033: conv.i + IL_0034: ldloc.s V_4 + IL_0036: stelem.i8 + IL_0037: ldloc.s V_4 + IL_0039: ldc.i4.1 + IL_003a: conv.i8 + IL_003b: add + IL_003c: stloc.s V_4 + IL_003e: ldloc.3 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: ldloc.0 + IL_0045: blt.un.s IL_0031 - IL_0049: ldloc.2 - IL_004a: ret + IL_0047: ldloc.2 + IL_0048: ret } .method public static uint64[] f7(uint64 finish) cil managed @@ -296,46 +294,44 @@ IL_0014: ldloc.0 IL_0015: stloc.1 IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: bge.un.s IL_0021 + IL_0017: brtrue.s IL_001f - IL_001b: call !!0[] [runtime]System.Array::Empty() - IL_0020: ret + IL_0019: call !!0[] [runtime]System.Array::Empty() + IL_001e: ret - IL_0021: ldloc.1 - IL_0022: conv.ovf.i.un - IL_0023: newarr [runtime]System.UInt64 - IL_0028: stloc.2 - IL_0029: ldc.i4.0 - IL_002a: conv.i8 - IL_002b: stloc.3 - IL_002c: ldc.i4.1 - IL_002d: conv.i8 - IL_002e: stloc.s V_4 - IL_0030: br.s IL_0044 - - IL_0032: ldloc.2 - IL_0033: ldloc.3 - IL_0034: conv.i - IL_0035: ldloc.s V_4 - IL_0037: stelem.i8 - IL_0038: ldloc.s V_4 - IL_003a: ldc.i4.1 - IL_003b: conv.i8 - IL_003c: add - IL_003d: stloc.s V_4 - IL_003f: ldloc.3 - IL_0040: ldc.i4.1 - IL_0041: conv.i8 - IL_0042: add - IL_0043: stloc.3 - IL_0044: ldloc.3 - IL_0045: ldloc.0 - IL_0046: blt.un.s IL_0032 + IL_001f: ldloc.1 + IL_0020: conv.ovf.i.un + IL_0021: newarr [runtime]System.UInt64 + IL_0026: stloc.2 + IL_0027: ldc.i4.0 + IL_0028: conv.i8 + IL_0029: stloc.3 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: stloc.s V_4 + IL_002e: br.s IL_0042 + + IL_0030: ldloc.2 + IL_0031: ldloc.3 + IL_0032: conv.i + IL_0033: ldloc.s V_4 + IL_0035: stelem.i8 + IL_0036: ldloc.s V_4 + IL_0038: ldc.i4.1 + IL_0039: conv.i8 + IL_003a: add + IL_003b: stloc.s V_4 + IL_003d: ldloc.3 + IL_003e: ldc.i4.1 + IL_003f: conv.i8 + IL_0040: add + IL_0041: stloc.3 + IL_0042: ldloc.3 + IL_0043: ldloc.0 + IL_0044: blt.un.s IL_0030 - IL_0048: ldloc.2 - IL_0049: ret + IL_0046: ldloc.2 + IL_0047: ret } .method public static uint64[] f8(uint64 start, @@ -390,101 +386,99 @@ IL_0024: nop IL_0025: stloc.2 IL_0026: ldloc.2 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: bge.un.s IL_0031 - - IL_002b: call !!0[] [runtime]System.Array::Empty() - IL_0030: ret - - IL_0031: ldloc.2 - IL_0032: conv.ovf.i.un - IL_0033: newarr [runtime]System.UInt64 - IL_0038: stloc.3 - IL_0039: ldloc.1 - IL_003a: brfalse.s IL_006c - - IL_003c: ldc.i4.1 - IL_003d: stloc.s V_4 - IL_003f: ldc.i4.0 - IL_0040: conv.i8 - IL_0041: stloc.s V_5 - IL_0043: ldarg.0 - IL_0044: stloc.s V_6 - IL_0046: br.s IL_0065 + IL_0027: brtrue.s IL_002f - IL_0048: ldloc.3 - IL_0049: ldloc.s V_5 - IL_004b: conv.i - IL_004c: ldloc.s V_6 - IL_004e: stelem.i8 - IL_004f: ldloc.s V_6 - IL_0051: ldc.i4.1 - IL_0052: conv.i8 - IL_0053: add - IL_0054: stloc.s V_6 - IL_0056: ldloc.s V_5 - IL_0058: ldc.i4.1 - IL_0059: conv.i8 - IL_005a: add - IL_005b: stloc.s V_5 - IL_005d: ldloc.s V_5 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: cgt.un - IL_0063: stloc.s V_4 - IL_0065: ldloc.s V_4 - IL_0067: brtrue.s IL_0048 + IL_0029: call !!0[] [runtime]System.Array::Empty() + IL_002e: ret - IL_0069: nop - IL_006a: br.s IL_00a3 + IL_002f: ldloc.2 + IL_0030: conv.ovf.i.un + IL_0031: newarr [runtime]System.UInt64 + IL_0036: stloc.3 + IL_0037: ldloc.1 + IL_0038: brfalse.s IL_006a - IL_006c: ldarg.1 - IL_006d: ldarg.0 - IL_006e: bge.un.s IL_0075 + IL_003a: ldc.i4.1 + IL_003b: stloc.s V_4 + IL_003d: ldc.i4.0 + IL_003e: conv.i8 + IL_003f: stloc.s V_5 + IL_0041: ldarg.0 + IL_0042: stloc.s V_6 + IL_0044: br.s IL_0063 - IL_0070: ldc.i4.0 - IL_0071: conv.i8 - IL_0072: nop - IL_0073: br.s IL_007c - - IL_0075: ldarg.1 - IL_0076: ldarg.0 - IL_0077: sub - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add.ovf.un - IL_007b: nop - IL_007c: stloc.s V_5 - IL_007e: ldc.i4.0 - IL_007f: conv.i8 - IL_0080: stloc.s V_6 - IL_0082: ldarg.0 - IL_0083: stloc.s V_7 - IL_0085: br.s IL_009c - - IL_0087: ldloc.3 - IL_0088: ldloc.s V_6 - IL_008a: conv.i - IL_008b: ldloc.s V_7 - IL_008d: stelem.i8 - IL_008e: ldloc.s V_7 - IL_0090: ldc.i4.1 - IL_0091: conv.i8 - IL_0092: add - IL_0093: stloc.s V_7 - IL_0095: ldloc.s V_6 - IL_0097: ldc.i4.1 - IL_0098: conv.i8 - IL_0099: add - IL_009a: stloc.s V_6 - IL_009c: ldloc.s V_6 - IL_009e: ldloc.s V_5 - IL_00a0: blt.un.s IL_0087 - - IL_00a2: nop - IL_00a3: ldloc.3 - IL_00a4: ret + IL_0046: ldloc.3 + IL_0047: ldloc.s V_5 + IL_0049: conv.i + IL_004a: ldloc.s V_6 + IL_004c: stelem.i8 + IL_004d: ldloc.s V_6 + IL_004f: ldc.i4.1 + IL_0050: conv.i8 + IL_0051: add + IL_0052: stloc.s V_6 + IL_0054: ldloc.s V_5 + IL_0056: ldc.i4.1 + IL_0057: conv.i8 + IL_0058: add + IL_0059: stloc.s V_5 + IL_005b: ldloc.s V_5 + IL_005d: ldc.i4.0 + IL_005e: conv.i8 + IL_005f: cgt.un + IL_0061: stloc.s V_4 + IL_0063: ldloc.s V_4 + IL_0065: brtrue.s IL_0046 + + IL_0067: nop + IL_0068: br.s IL_00a1 + + IL_006a: ldarg.1 + IL_006b: ldarg.0 + IL_006c: bge.un.s IL_0073 + + IL_006e: ldc.i4.0 + IL_006f: conv.i8 + IL_0070: nop + IL_0071: br.s IL_007a + + IL_0073: ldarg.1 + IL_0074: ldarg.0 + IL_0075: sub + IL_0076: ldc.i4.1 + IL_0077: conv.i8 + IL_0078: add.ovf.un + IL_0079: nop + IL_007a: stloc.s V_5 + IL_007c: ldc.i4.0 + IL_007d: conv.i8 + IL_007e: stloc.s V_6 + IL_0080: ldarg.0 + IL_0081: stloc.s V_7 + IL_0083: br.s IL_009a + + IL_0085: ldloc.3 + IL_0086: ldloc.s V_6 + IL_0088: conv.i + IL_0089: ldloc.s V_7 + IL_008b: stelem.i8 + IL_008c: ldloc.s V_7 + IL_008e: ldc.i4.1 + IL_008f: conv.i8 + IL_0090: add + IL_0091: stloc.s V_7 + IL_0093: ldloc.s V_6 + IL_0095: ldc.i4.1 + IL_0096: conv.i8 + IL_0097: add + IL_0098: stloc.s V_6 + IL_009a: ldloc.s V_6 + IL_009c: ldloc.s V_5 + IL_009e: blt.un.s IL_0085 + + IL_00a0: nop + IL_00a1: ldloc.3 + IL_00a2: ret } .method public static uint64[] f9(uint64 start) cil managed @@ -519,45 +513,43 @@ IL_0016: ldloc.0 IL_0017: stloc.1 IL_0018: ldloc.1 - IL_0019: ldc.i4.1 - IL_001a: conv.i8 - IL_001b: bge.un.s IL_0023 + IL_0019: brtrue.s IL_0021 - IL_001d: call !!0[] [runtime]System.Array::Empty() - IL_0022: ret + IL_001b: call !!0[] [runtime]System.Array::Empty() + IL_0020: ret - IL_0023: ldloc.1 - IL_0024: conv.ovf.i.un - IL_0025: newarr [runtime]System.UInt64 - IL_002a: stloc.2 - IL_002b: ldc.i4.0 - IL_002c: conv.i8 - IL_002d: stloc.3 - IL_002e: ldarg.0 - IL_002f: stloc.s V_4 - IL_0031: br.s IL_0045 + IL_0021: ldloc.1 + IL_0022: conv.ovf.i.un + IL_0023: newarr [runtime]System.UInt64 + IL_0028: stloc.2 + IL_0029: ldc.i4.0 + IL_002a: conv.i8 + IL_002b: stloc.3 + IL_002c: ldarg.0 + IL_002d: stloc.s V_4 + IL_002f: br.s IL_0043 - IL_0033: ldloc.2 - IL_0034: ldloc.3 - IL_0035: conv.i - IL_0036: ldloc.s V_4 - IL_0038: stelem.i8 - IL_0039: ldloc.s V_4 - IL_003b: ldc.i4.1 - IL_003c: conv.i8 - IL_003d: add - IL_003e: stloc.s V_4 - IL_0040: ldloc.3 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.3 - IL_0045: ldloc.3 - IL_0046: ldloc.0 - IL_0047: blt.un.s IL_0033 + IL_0031: ldloc.2 + IL_0032: ldloc.3 + IL_0033: conv.i + IL_0034: ldloc.s V_4 + IL_0036: stelem.i8 + IL_0037: ldloc.s V_4 + IL_0039: ldc.i4.1 + IL_003a: conv.i8 + IL_003b: add + IL_003c: stloc.s V_4 + IL_003e: ldloc.3 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: ldloc.0 + IL_0045: blt.un.s IL_0031 - IL_0049: ldloc.2 - IL_004a: ret + IL_0047: ldloc.2 + IL_0048: ret } .method public static uint64[] f10(uint64 step) cil managed @@ -612,45 +604,43 @@ IL_002d: ldloc.0 IL_002e: stloc.1 IL_002f: ldloc.1 - IL_0030: ldc.i4.1 - IL_0031: conv.i8 - IL_0032: bge.un.s IL_003a + IL_0030: brtrue.s IL_0038 - IL_0034: call !!0[] [runtime]System.Array::Empty() - IL_0039: ret + IL_0032: call !!0[] [runtime]System.Array::Empty() + IL_0037: ret - IL_003a: ldloc.1 - IL_003b: conv.ovf.i.un - IL_003c: newarr [runtime]System.UInt64 - IL_0041: stloc.2 - IL_0042: ldc.i4.0 - IL_0043: conv.i8 - IL_0044: stloc.3 - IL_0045: ldc.i4.1 - IL_0046: conv.i8 - IL_0047: stloc.s V_4 - IL_0049: br.s IL_005c - - IL_004b: ldloc.2 - IL_004c: ldloc.3 - IL_004d: conv.i - IL_004e: ldloc.s V_4 - IL_0050: stelem.i8 - IL_0051: ldloc.s V_4 - IL_0053: ldarg.0 - IL_0054: add - IL_0055: stloc.s V_4 - IL_0057: ldloc.3 - IL_0058: ldc.i4.1 - IL_0059: conv.i8 - IL_005a: add - IL_005b: stloc.3 - IL_005c: ldloc.3 - IL_005d: ldloc.0 - IL_005e: blt.un.s IL_004b - - IL_0060: ldloc.2 - IL_0061: ret + IL_0038: ldloc.1 + IL_0039: conv.ovf.i.un + IL_003a: newarr [runtime]System.UInt64 + IL_003f: stloc.2 + IL_0040: ldc.i4.0 + IL_0041: conv.i8 + IL_0042: stloc.3 + IL_0043: ldc.i4.1 + IL_0044: conv.i8 + IL_0045: stloc.s V_4 + IL_0047: br.s IL_005a + + IL_0049: ldloc.2 + IL_004a: ldloc.3 + IL_004b: conv.i + IL_004c: ldloc.s V_4 + IL_004e: stelem.i8 + IL_004f: ldloc.s V_4 + IL_0051: ldarg.0 + IL_0052: add + IL_0053: stloc.s V_4 + IL_0055: ldloc.3 + IL_0056: ldc.i4.1 + IL_0057: conv.i8 + IL_0058: add + IL_0059: stloc.3 + IL_005a: ldloc.3 + IL_005b: ldloc.0 + IL_005c: blt.un.s IL_0049 + + IL_005e: ldloc.2 + IL_005f: ret } .method public static uint64[] f11(uint64 finish) cil managed @@ -685,46 +675,44 @@ IL_0014: ldloc.0 IL_0015: stloc.1 IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: bge.un.s IL_0021 + IL_0017: brtrue.s IL_001f - IL_001b: call !!0[] [runtime]System.Array::Empty() - IL_0020: ret + IL_0019: call !!0[] [runtime]System.Array::Empty() + IL_001e: ret - IL_0021: ldloc.1 - IL_0022: conv.ovf.i.un - IL_0023: newarr [runtime]System.UInt64 - IL_0028: stloc.2 - IL_0029: ldc.i4.0 - IL_002a: conv.i8 - IL_002b: stloc.3 - IL_002c: ldc.i4.1 - IL_002d: conv.i8 - IL_002e: stloc.s V_4 - IL_0030: br.s IL_0044 - - IL_0032: ldloc.2 - IL_0033: ldloc.3 - IL_0034: conv.i - IL_0035: ldloc.s V_4 - IL_0037: stelem.i8 - IL_0038: ldloc.s V_4 - IL_003a: ldc.i4.1 - IL_003b: conv.i8 - IL_003c: add - IL_003d: stloc.s V_4 - IL_003f: ldloc.3 - IL_0040: ldc.i4.1 - IL_0041: conv.i8 - IL_0042: add - IL_0043: stloc.3 - IL_0044: ldloc.3 - IL_0045: ldloc.0 - IL_0046: blt.un.s IL_0032 + IL_001f: ldloc.1 + IL_0020: conv.ovf.i.un + IL_0021: newarr [runtime]System.UInt64 + IL_0026: stloc.2 + IL_0027: ldc.i4.0 + IL_0028: conv.i8 + IL_0029: stloc.3 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: stloc.s V_4 + IL_002e: br.s IL_0042 + + IL_0030: ldloc.2 + IL_0031: ldloc.3 + IL_0032: conv.i + IL_0033: ldloc.s V_4 + IL_0035: stelem.i8 + IL_0036: ldloc.s V_4 + IL_0038: ldc.i4.1 + IL_0039: conv.i8 + IL_003a: add + IL_003b: stloc.s V_4 + IL_003d: ldloc.3 + IL_003e: ldc.i4.1 + IL_003f: conv.i8 + IL_0040: add + IL_0041: stloc.3 + IL_0042: ldloc.3 + IL_0043: ldloc.0 + IL_0044: blt.un.s IL_0030 - IL_0048: ldloc.2 - IL_0049: ret + IL_0046: ldloc.2 + IL_0047: ret } .method public static uint64[] f12(uint64 start, @@ -778,44 +766,42 @@ IL_002a: ldloc.0 IL_002b: stloc.1 IL_002c: ldloc.1 - IL_002d: ldc.i4.1 - IL_002e: conv.i8 - IL_002f: bge.un.s IL_0037 - - IL_0031: call !!0[] [runtime]System.Array::Empty() - IL_0036: ret + IL_002d: brtrue.s IL_0035 + + IL_002f: call !!0[] [runtime]System.Array::Empty() + IL_0034: ret + + IL_0035: ldloc.1 + IL_0036: conv.ovf.i.un + IL_0037: newarr [runtime]System.UInt64 + IL_003c: stloc.2 + IL_003d: ldc.i4.0 + IL_003e: conv.i8 + IL_003f: stloc.3 + IL_0040: ldarg.0 + IL_0041: stloc.s V_4 + IL_0043: br.s IL_0056 - IL_0037: ldloc.1 - IL_0038: conv.ovf.i.un - IL_0039: newarr [runtime]System.UInt64 - IL_003e: stloc.2 - IL_003f: ldc.i4.0 - IL_0040: conv.i8 - IL_0041: stloc.3 - IL_0042: ldarg.0 - IL_0043: stloc.s V_4 - IL_0045: br.s IL_0058 + IL_0045: ldloc.2 + IL_0046: ldloc.3 + IL_0047: conv.i + IL_0048: ldloc.s V_4 + IL_004a: stelem.i8 + IL_004b: ldloc.s V_4 + IL_004d: ldarg.1 + IL_004e: add + IL_004f: stloc.s V_4 + IL_0051: ldloc.3 + IL_0052: ldc.i4.1 + IL_0053: conv.i8 + IL_0054: add + IL_0055: stloc.3 + IL_0056: ldloc.3 + IL_0057: ldloc.0 + IL_0058: blt.un.s IL_0045 - IL_0047: ldloc.2 - IL_0048: ldloc.3 - IL_0049: conv.i - IL_004a: ldloc.s V_4 - IL_004c: stelem.i8 - IL_004d: ldloc.s V_4 - IL_004f: ldarg.1 - IL_0050: add - IL_0051: stloc.s V_4 - IL_0053: ldloc.3 - IL_0054: ldc.i4.1 - IL_0055: conv.i8 - IL_0056: add - IL_0057: stloc.3 - IL_0058: ldloc.3 - IL_0059: ldloc.0 - IL_005a: blt.un.s IL_0047 - - IL_005c: ldloc.2 - IL_005d: ret + IL_005a: ldloc.2 + IL_005b: ret } .method public static uint64[] f13(uint64 start, @@ -870,101 +856,99 @@ IL_0024: nop IL_0025: stloc.2 IL_0026: ldloc.2 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: bge.un.s IL_0031 + IL_0027: brtrue.s IL_002f - IL_002b: call !!0[] [runtime]System.Array::Empty() - IL_0030: ret + IL_0029: call !!0[] [runtime]System.Array::Empty() + IL_002e: ret - IL_0031: ldloc.2 - IL_0032: conv.ovf.i.un - IL_0033: newarr [runtime]System.UInt64 - IL_0038: stloc.3 - IL_0039: ldloc.1 - IL_003a: brfalse.s IL_006c - - IL_003c: ldc.i4.1 - IL_003d: stloc.s V_4 - IL_003f: ldc.i4.0 - IL_0040: conv.i8 - IL_0041: stloc.s V_5 - IL_0043: ldarg.0 - IL_0044: stloc.s V_6 - IL_0046: br.s IL_0065 - - IL_0048: ldloc.3 - IL_0049: ldloc.s V_5 - IL_004b: conv.i - IL_004c: ldloc.s V_6 - IL_004e: stelem.i8 - IL_004f: ldloc.s V_6 - IL_0051: ldc.i4.1 - IL_0052: conv.i8 - IL_0053: add - IL_0054: stloc.s V_6 - IL_0056: ldloc.s V_5 - IL_0058: ldc.i4.1 - IL_0059: conv.i8 - IL_005a: add - IL_005b: stloc.s V_5 - IL_005d: ldloc.s V_5 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: cgt.un - IL_0063: stloc.s V_4 - IL_0065: ldloc.s V_4 - IL_0067: brtrue.s IL_0048 - - IL_0069: nop - IL_006a: br.s IL_00a3 + IL_002f: ldloc.2 + IL_0030: conv.ovf.i.un + IL_0031: newarr [runtime]System.UInt64 + IL_0036: stloc.3 + IL_0037: ldloc.1 + IL_0038: brfalse.s IL_006a - IL_006c: ldarg.1 - IL_006d: ldarg.0 - IL_006e: bge.un.s IL_0075 + IL_003a: ldc.i4.1 + IL_003b: stloc.s V_4 + IL_003d: ldc.i4.0 + IL_003e: conv.i8 + IL_003f: stloc.s V_5 + IL_0041: ldarg.0 + IL_0042: stloc.s V_6 + IL_0044: br.s IL_0063 - IL_0070: ldc.i4.0 - IL_0071: conv.i8 - IL_0072: nop - IL_0073: br.s IL_007c - - IL_0075: ldarg.1 - IL_0076: ldarg.0 - IL_0077: sub - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add.ovf.un - IL_007b: nop - IL_007c: stloc.s V_5 - IL_007e: ldc.i4.0 - IL_007f: conv.i8 - IL_0080: stloc.s V_6 - IL_0082: ldarg.0 - IL_0083: stloc.s V_7 - IL_0085: br.s IL_009c - - IL_0087: ldloc.3 - IL_0088: ldloc.s V_6 - IL_008a: conv.i - IL_008b: ldloc.s V_7 - IL_008d: stelem.i8 - IL_008e: ldloc.s V_7 - IL_0090: ldc.i4.1 - IL_0091: conv.i8 - IL_0092: add - IL_0093: stloc.s V_7 - IL_0095: ldloc.s V_6 - IL_0097: ldc.i4.1 - IL_0098: conv.i8 - IL_0099: add - IL_009a: stloc.s V_6 - IL_009c: ldloc.s V_6 - IL_009e: ldloc.s V_5 - IL_00a0: blt.un.s IL_0087 - - IL_00a2: nop - IL_00a3: ldloc.3 - IL_00a4: ret + IL_0046: ldloc.3 + IL_0047: ldloc.s V_5 + IL_0049: conv.i + IL_004a: ldloc.s V_6 + IL_004c: stelem.i8 + IL_004d: ldloc.s V_6 + IL_004f: ldc.i4.1 + IL_0050: conv.i8 + IL_0051: add + IL_0052: stloc.s V_6 + IL_0054: ldloc.s V_5 + IL_0056: ldc.i4.1 + IL_0057: conv.i8 + IL_0058: add + IL_0059: stloc.s V_5 + IL_005b: ldloc.s V_5 + IL_005d: ldc.i4.0 + IL_005e: conv.i8 + IL_005f: cgt.un + IL_0061: stloc.s V_4 + IL_0063: ldloc.s V_4 + IL_0065: brtrue.s IL_0046 + + IL_0067: nop + IL_0068: br.s IL_00a1 + + IL_006a: ldarg.1 + IL_006b: ldarg.0 + IL_006c: bge.un.s IL_0073 + + IL_006e: ldc.i4.0 + IL_006f: conv.i8 + IL_0070: nop + IL_0071: br.s IL_007a + + IL_0073: ldarg.1 + IL_0074: ldarg.0 + IL_0075: sub + IL_0076: ldc.i4.1 + IL_0077: conv.i8 + IL_0078: add.ovf.un + IL_0079: nop + IL_007a: stloc.s V_5 + IL_007c: ldc.i4.0 + IL_007d: conv.i8 + IL_007e: stloc.s V_6 + IL_0080: ldarg.0 + IL_0081: stloc.s V_7 + IL_0083: br.s IL_009a + + IL_0085: ldloc.3 + IL_0086: ldloc.s V_6 + IL_0088: conv.i + IL_0089: ldloc.s V_7 + IL_008b: stelem.i8 + IL_008c: ldloc.s V_7 + IL_008e: ldc.i4.1 + IL_008f: conv.i8 + IL_0090: add + IL_0091: stloc.s V_7 + IL_0093: ldloc.s V_6 + IL_0095: ldc.i4.1 + IL_0096: conv.i8 + IL_0097: add + IL_0098: stloc.s V_6 + IL_009a: ldloc.s V_6 + IL_009c: ldloc.s V_5 + IL_009e: blt.un.s IL_0085 + + IL_00a0: nop + IL_00a1: ldloc.3 + IL_00a2: ret } .method public static uint64[] f14(uint64 step, @@ -1018,45 +1002,43 @@ IL_0027: ldloc.0 IL_0028: stloc.1 IL_0029: ldloc.1 - IL_002a: ldc.i4.1 - IL_002b: conv.i8 - IL_002c: bge.un.s IL_0034 + IL_002a: brtrue.s IL_0032 - IL_002e: call !!0[] [runtime]System.Array::Empty() - IL_0033: ret + IL_002c: call !!0[] [runtime]System.Array::Empty() + IL_0031: ret - IL_0034: ldloc.1 - IL_0035: conv.ovf.i.un - IL_0036: newarr [runtime]System.UInt64 - IL_003b: stloc.2 - IL_003c: ldc.i4.0 - IL_003d: conv.i8 - IL_003e: stloc.3 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: stloc.s V_4 - IL_0043: br.s IL_0056 + IL_0032: ldloc.1 + IL_0033: conv.ovf.i.un + IL_0034: newarr [runtime]System.UInt64 + IL_0039: stloc.2 + IL_003a: ldc.i4.0 + IL_003b: conv.i8 + IL_003c: stloc.3 + IL_003d: ldc.i4.1 + IL_003e: conv.i8 + IL_003f: stloc.s V_4 + IL_0041: br.s IL_0054 - IL_0045: ldloc.2 - IL_0046: ldloc.3 - IL_0047: conv.i - IL_0048: ldloc.s V_4 - IL_004a: stelem.i8 - IL_004b: ldloc.s V_4 - IL_004d: ldarg.0 - IL_004e: add - IL_004f: stloc.s V_4 - IL_0051: ldloc.3 - IL_0052: ldc.i4.1 - IL_0053: conv.i8 - IL_0054: add - IL_0055: stloc.3 - IL_0056: ldloc.3 - IL_0057: ldloc.0 - IL_0058: blt.un.s IL_0045 + IL_0043: ldloc.2 + IL_0044: ldloc.3 + IL_0045: conv.i + IL_0046: ldloc.s V_4 + IL_0048: stelem.i8 + IL_0049: ldloc.s V_4 + IL_004b: ldarg.0 + IL_004c: add + IL_004d: stloc.s V_4 + IL_004f: ldloc.3 + IL_0050: ldc.i4.1 + IL_0051: conv.i8 + IL_0052: add + IL_0053: stloc.3 + IL_0054: ldloc.3 + IL_0055: ldloc.0 + IL_0056: blt.un.s IL_0043 - IL_005a: ldloc.2 - IL_005b: ret + IL_0058: ldloc.2 + IL_0059: ret } .method public static uint64[] f15(uint64 start, @@ -1131,101 +1113,99 @@ IL_0038: nop IL_0039: stloc.2 IL_003a: ldloc.2 - IL_003b: ldc.i4.1 - IL_003c: conv.i8 - IL_003d: bge.un.s IL_0045 + IL_003b: brtrue.s IL_0043 - IL_003f: call !!0[] [runtime]System.Array::Empty() - IL_0044: ret + IL_003d: call !!0[] [runtime]System.Array::Empty() + IL_0042: ret - IL_0045: ldloc.2 - IL_0046: conv.ovf.i.un - IL_0047: newarr [runtime]System.UInt64 - IL_004c: stloc.3 - IL_004d: ldloc.1 - IL_004e: brfalse.s IL_007f + IL_0043: ldloc.2 + IL_0044: conv.ovf.i.un + IL_0045: newarr [runtime]System.UInt64 + IL_004a: stloc.3 + IL_004b: ldloc.1 + IL_004c: brfalse.s IL_007d - IL_0050: ldc.i4.1 - IL_0051: stloc.s V_4 - IL_0053: ldc.i4.0 - IL_0054: conv.i8 - IL_0055: stloc.s V_5 - IL_0057: ldarg.0 - IL_0058: stloc.s V_6 - IL_005a: br.s IL_0078 - - IL_005c: ldloc.3 - IL_005d: ldloc.s V_5 - IL_005f: conv.i - IL_0060: ldloc.s V_6 - IL_0062: stelem.i8 - IL_0063: ldloc.s V_6 - IL_0065: ldarg.1 - IL_0066: add - IL_0067: stloc.s V_6 - IL_0069: ldloc.s V_5 - IL_006b: ldc.i4.1 - IL_006c: conv.i8 - IL_006d: add - IL_006e: stloc.s V_5 - IL_0070: ldloc.s V_5 - IL_0072: ldc.i4.0 - IL_0073: conv.i8 - IL_0074: cgt.un - IL_0076: stloc.s V_4 - IL_0078: ldloc.s V_4 - IL_007a: brtrue.s IL_005c - - IL_007c: nop - IL_007d: br.s IL_00b7 - - IL_007f: ldarg.2 - IL_0080: ldarg.0 - IL_0081: bge.un.s IL_0088 - - IL_0083: ldc.i4.0 - IL_0084: conv.i8 - IL_0085: nop - IL_0086: br.s IL_0091 - - IL_0088: ldarg.2 - IL_0089: ldarg.0 - IL_008a: sub - IL_008b: ldarg.1 - IL_008c: div.un - IL_008d: ldc.i4.1 - IL_008e: conv.i8 - IL_008f: add.ovf.un - IL_0090: nop - IL_0091: stloc.s V_5 - IL_0093: ldc.i4.0 - IL_0094: conv.i8 - IL_0095: stloc.s V_6 - IL_0097: ldarg.0 - IL_0098: stloc.s V_7 - IL_009a: br.s IL_00b0 - - IL_009c: ldloc.3 - IL_009d: ldloc.s V_6 - IL_009f: conv.i - IL_00a0: ldloc.s V_7 - IL_00a2: stelem.i8 - IL_00a3: ldloc.s V_7 - IL_00a5: ldarg.1 - IL_00a6: add - IL_00a7: stloc.s V_7 - IL_00a9: ldloc.s V_6 - IL_00ab: ldc.i4.1 - IL_00ac: conv.i8 - IL_00ad: add - IL_00ae: stloc.s V_6 - IL_00b0: ldloc.s V_6 - IL_00b2: ldloc.s V_5 - IL_00b4: blt.un.s IL_009c - - IL_00b6: nop - IL_00b7: ldloc.3 - IL_00b8: ret + IL_004e: ldc.i4.1 + IL_004f: stloc.s V_4 + IL_0051: ldc.i4.0 + IL_0052: conv.i8 + IL_0053: stloc.s V_5 + IL_0055: ldarg.0 + IL_0056: stloc.s V_6 + IL_0058: br.s IL_0076 + + IL_005a: ldloc.3 + IL_005b: ldloc.s V_5 + IL_005d: conv.i + IL_005e: ldloc.s V_6 + IL_0060: stelem.i8 + IL_0061: ldloc.s V_6 + IL_0063: ldarg.1 + IL_0064: add + IL_0065: stloc.s V_6 + IL_0067: ldloc.s V_5 + IL_0069: ldc.i4.1 + IL_006a: conv.i8 + IL_006b: add + IL_006c: stloc.s V_5 + IL_006e: ldloc.s V_5 + IL_0070: ldc.i4.0 + IL_0071: conv.i8 + IL_0072: cgt.un + IL_0074: stloc.s V_4 + IL_0076: ldloc.s V_4 + IL_0078: brtrue.s IL_005a + + IL_007a: nop + IL_007b: br.s IL_00b5 + + IL_007d: ldarg.2 + IL_007e: ldarg.0 + IL_007f: bge.un.s IL_0086 + + IL_0081: ldc.i4.0 + IL_0082: conv.i8 + IL_0083: nop + IL_0084: br.s IL_008f + + IL_0086: ldarg.2 + IL_0087: ldarg.0 + IL_0088: sub + IL_0089: ldarg.1 + IL_008a: div.un + IL_008b: ldc.i4.1 + IL_008c: conv.i8 + IL_008d: add.ovf.un + IL_008e: nop + IL_008f: stloc.s V_5 + IL_0091: ldc.i4.0 + IL_0092: conv.i8 + IL_0093: stloc.s V_6 + IL_0095: ldarg.0 + IL_0096: stloc.s V_7 + IL_0098: br.s IL_00ae + + IL_009a: ldloc.3 + IL_009b: ldloc.s V_6 + IL_009d: conv.i + IL_009e: ldloc.s V_7 + IL_00a0: stelem.i8 + IL_00a1: ldloc.s V_7 + IL_00a3: ldarg.1 + IL_00a4: add + IL_00a5: stloc.s V_7 + IL_00a7: ldloc.s V_6 + IL_00a9: ldc.i4.1 + IL_00aa: conv.i8 + IL_00ab: add + IL_00ac: stloc.s V_6 + IL_00ae: ldloc.s V_6 + IL_00b0: ldloc.s V_5 + IL_00b2: blt.un.s IL_009a + + IL_00b4: nop + IL_00b5: ldloc.3 + IL_00b6: ret } .method public static uint64[] f16(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1264,45 +1244,43 @@ IL_001d: ldloc.1 IL_001e: stloc.2 IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: conv.i8 - IL_0022: bge.un.s IL_002a - - IL_0024: call !!0[] [runtime]System.Array::Empty() - IL_0029: ret - - IL_002a: ldloc.2 - IL_002b: conv.ovf.i.un - IL_002c: newarr [runtime]System.UInt64 - IL_0031: stloc.3 - IL_0032: ldc.i4.0 - IL_0033: conv.i8 - IL_0034: stloc.s V_4 - IL_0036: ldloc.0 - IL_0037: stloc.s V_5 - IL_0039: br.s IL_0050 + IL_0020: brtrue.s IL_0028 - IL_003b: ldloc.3 - IL_003c: ldloc.s V_4 - IL_003e: conv.i - IL_003f: ldloc.s V_5 - IL_0041: stelem.i8 - IL_0042: ldloc.s V_5 - IL_0044: ldc.i4.1 - IL_0045: conv.i8 - IL_0046: add - IL_0047: stloc.s V_5 - IL_0049: ldloc.s V_4 - IL_004b: ldc.i4.1 - IL_004c: conv.i8 - IL_004d: add - IL_004e: stloc.s V_4 - IL_0050: ldloc.s V_4 - IL_0052: ldloc.1 - IL_0053: blt.un.s IL_003b + IL_0022: call !!0[] [runtime]System.Array::Empty() + IL_0027: ret - IL_0055: ldloc.3 - IL_0056: ret + IL_0028: ldloc.2 + IL_0029: conv.ovf.i.un + IL_002a: newarr [runtime]System.UInt64 + IL_002f: stloc.3 + IL_0030: ldc.i4.0 + IL_0031: conv.i8 + IL_0032: stloc.s V_4 + IL_0034: ldloc.0 + IL_0035: stloc.s V_5 + IL_0037: br.s IL_004e + + IL_0039: ldloc.3 + IL_003a: ldloc.s V_4 + IL_003c: conv.i + IL_003d: ldloc.s V_5 + IL_003f: stelem.i8 + IL_0040: ldloc.s V_5 + IL_0042: ldc.i4.1 + IL_0043: conv.i8 + IL_0044: add + IL_0045: stloc.s V_5 + IL_0047: ldloc.s V_4 + IL_0049: ldc.i4.1 + IL_004a: conv.i8 + IL_004b: add + IL_004c: stloc.s V_4 + IL_004e: ldloc.s V_4 + IL_0050: ldloc.1 + IL_0051: blt.un.s IL_0039 + + IL_0053: ldloc.3 + IL_0054: ret } .method public static uint64[] f17(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1341,46 +1319,44 @@ IL_001b: ldloc.1 IL_001c: stloc.2 IL_001d: ldloc.2 - IL_001e: ldc.i4.1 - IL_001f: conv.i8 - IL_0020: bge.un.s IL_0028 + IL_001e: brtrue.s IL_0026 - IL_0022: call !!0[] [runtime]System.Array::Empty() - IL_0027: ret + IL_0020: call !!0[] [runtime]System.Array::Empty() + IL_0025: ret - IL_0028: ldloc.2 - IL_0029: conv.ovf.i.un - IL_002a: newarr [runtime]System.UInt64 - IL_002f: stloc.3 - IL_0030: ldc.i4.0 - IL_0031: conv.i8 - IL_0032: stloc.s V_4 - IL_0034: ldc.i4.1 - IL_0035: conv.i8 - IL_0036: stloc.s V_5 - IL_0038: br.s IL_004f - - IL_003a: ldloc.3 - IL_003b: ldloc.s V_4 - IL_003d: conv.i - IL_003e: ldloc.s V_5 - IL_0040: stelem.i8 - IL_0041: ldloc.s V_5 - IL_0043: ldc.i4.1 - IL_0044: conv.i8 - IL_0045: add - IL_0046: stloc.s V_5 - IL_0048: ldloc.s V_4 - IL_004a: ldc.i4.1 - IL_004b: conv.i8 - IL_004c: add - IL_004d: stloc.s V_4 - IL_004f: ldloc.s V_4 - IL_0051: ldloc.1 - IL_0052: blt.un.s IL_003a + IL_0026: ldloc.2 + IL_0027: conv.ovf.i.un + IL_0028: newarr [runtime]System.UInt64 + IL_002d: stloc.3 + IL_002e: ldc.i4.0 + IL_002f: conv.i8 + IL_0030: stloc.s V_4 + IL_0032: ldc.i4.1 + IL_0033: conv.i8 + IL_0034: stloc.s V_5 + IL_0036: br.s IL_004d - IL_0054: ldloc.3 - IL_0055: ret + IL_0038: ldloc.3 + IL_0039: ldloc.s V_4 + IL_003b: conv.i + IL_003c: ldloc.s V_5 + IL_003e: stelem.i8 + IL_003f: ldloc.s V_5 + IL_0041: ldc.i4.1 + IL_0042: conv.i8 + IL_0043: add + IL_0044: stloc.s V_5 + IL_0046: ldloc.s V_4 + IL_0048: ldc.i4.1 + IL_0049: conv.i8 + IL_004a: add + IL_004b: stloc.s V_4 + IL_004d: ldloc.s V_4 + IL_004f: ldloc.1 + IL_0050: blt.un.s IL_0038 + + IL_0052: ldloc.3 + IL_0053: ret } .method public static uint64[] f18(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1444,101 +1420,99 @@ IL_0033: nop IL_0034: stloc.s V_4 IL_0036: ldloc.s V_4 - IL_0038: ldc.i4.1 - IL_0039: conv.i8 - IL_003a: bge.un.s IL_0042 + IL_0038: brtrue.s IL_0040 - IL_003c: call !!0[] [runtime]System.Array::Empty() - IL_0041: ret + IL_003a: call !!0[] [runtime]System.Array::Empty() + IL_003f: ret - IL_0042: ldloc.s V_4 - IL_0044: conv.ovf.i.un - IL_0045: newarr [runtime]System.UInt64 - IL_004a: stloc.s V_5 - IL_004c: ldloc.3 - IL_004d: brfalse.s IL_0080 + IL_0040: ldloc.s V_4 + IL_0042: conv.ovf.i.un + IL_0043: newarr [runtime]System.UInt64 + IL_0048: stloc.s V_5 + IL_004a: ldloc.3 + IL_004b: brfalse.s IL_007e - IL_004f: ldc.i4.1 - IL_0050: stloc.s V_6 - IL_0052: ldc.i4.0 - IL_0053: conv.i8 - IL_0054: stloc.s V_7 - IL_0056: ldloc.0 - IL_0057: stloc.s V_8 - IL_0059: br.s IL_0079 + IL_004d: ldc.i4.1 + IL_004e: stloc.s V_6 + IL_0050: ldc.i4.0 + IL_0051: conv.i8 + IL_0052: stloc.s V_7 + IL_0054: ldloc.0 + IL_0055: stloc.s V_8 + IL_0057: br.s IL_0077 + + IL_0059: ldloc.s V_5 + IL_005b: ldloc.s V_7 + IL_005d: conv.i + IL_005e: ldloc.s V_8 + IL_0060: stelem.i8 + IL_0061: ldloc.s V_8 + IL_0063: ldc.i4.1 + IL_0064: conv.i8 + IL_0065: add + IL_0066: stloc.s V_8 + IL_0068: ldloc.s V_7 + IL_006a: ldc.i4.1 + IL_006b: conv.i8 + IL_006c: add + IL_006d: stloc.s V_7 + IL_006f: ldloc.s V_7 + IL_0071: ldc.i4.0 + IL_0072: conv.i8 + IL_0073: cgt.un + IL_0075: stloc.s V_6 + IL_0077: ldloc.s V_6 + IL_0079: brtrue.s IL_0059 - IL_005b: ldloc.s V_5 - IL_005d: ldloc.s V_7 - IL_005f: conv.i - IL_0060: ldloc.s V_8 - IL_0062: stelem.i8 - IL_0063: ldloc.s V_8 - IL_0065: ldc.i4.1 - IL_0066: conv.i8 - IL_0067: add - IL_0068: stloc.s V_8 - IL_006a: ldloc.s V_7 - IL_006c: ldc.i4.1 - IL_006d: conv.i8 - IL_006e: add - IL_006f: stloc.s V_7 - IL_0071: ldloc.s V_7 - IL_0073: ldc.i4.0 - IL_0074: conv.i8 - IL_0075: cgt.un - IL_0077: stloc.s V_6 - IL_0079: ldloc.s V_6 - IL_007b: brtrue.s IL_005b - - IL_007d: nop - IL_007e: br.s IL_00b8 - - IL_0080: ldloc.1 - IL_0081: ldloc.0 - IL_0082: bge.un.s IL_0089 - - IL_0084: ldc.i4.0 - IL_0085: conv.i8 - IL_0086: nop - IL_0087: br.s IL_0090 - - IL_0089: ldloc.1 - IL_008a: ldloc.0 - IL_008b: sub - IL_008c: ldc.i4.1 - IL_008d: conv.i8 - IL_008e: add.ovf.un - IL_008f: nop - IL_0090: stloc.s V_7 - IL_0092: ldc.i4.0 - IL_0093: conv.i8 - IL_0094: stloc.s V_8 - IL_0096: ldloc.0 - IL_0097: stloc.s V_9 - IL_0099: br.s IL_00b1 - - IL_009b: ldloc.s V_5 - IL_009d: ldloc.s V_8 - IL_009f: conv.i - IL_00a0: ldloc.s V_9 - IL_00a2: stelem.i8 - IL_00a3: ldloc.s V_9 - IL_00a5: ldc.i4.1 - IL_00a6: conv.i8 - IL_00a7: add - IL_00a8: stloc.s V_9 - IL_00aa: ldloc.s V_8 - IL_00ac: ldc.i4.1 - IL_00ad: conv.i8 - IL_00ae: add - IL_00af: stloc.s V_8 - IL_00b1: ldloc.s V_8 - IL_00b3: ldloc.s V_7 - IL_00b5: blt.un.s IL_009b - - IL_00b7: nop - IL_00b8: ldloc.s V_5 - IL_00ba: ret + IL_007b: nop + IL_007c: br.s IL_00b6 + + IL_007e: ldloc.1 + IL_007f: ldloc.0 + IL_0080: bge.un.s IL_0087 + + IL_0082: ldc.i4.0 + IL_0083: conv.i8 + IL_0084: nop + IL_0085: br.s IL_008e + + IL_0087: ldloc.1 + IL_0088: ldloc.0 + IL_0089: sub + IL_008a: ldc.i4.1 + IL_008b: conv.i8 + IL_008c: add.ovf.un + IL_008d: nop + IL_008e: stloc.s V_7 + IL_0090: ldc.i4.0 + IL_0091: conv.i8 + IL_0092: stloc.s V_8 + IL_0094: ldloc.0 + IL_0095: stloc.s V_9 + IL_0097: br.s IL_00af + + IL_0099: ldloc.s V_5 + IL_009b: ldloc.s V_8 + IL_009d: conv.i + IL_009e: ldloc.s V_9 + IL_00a0: stelem.i8 + IL_00a1: ldloc.s V_9 + IL_00a3: ldc.i4.1 + IL_00a4: conv.i8 + IL_00a5: add + IL_00a6: stloc.s V_9 + IL_00a8: ldloc.s V_8 + IL_00aa: ldc.i4.1 + IL_00ab: conv.i8 + IL_00ac: add + IL_00ad: stloc.s V_8 + IL_00af: ldloc.s V_8 + IL_00b1: ldloc.s V_7 + IL_00b3: blt.un.s IL_0099 + + IL_00b5: nop + IL_00b6: ldloc.s V_5 + IL_00b8: ret } .method public static uint64[] f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1577,45 +1551,43 @@ IL_001d: ldloc.1 IL_001e: stloc.2 IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: conv.i8 - IL_0022: bge.un.s IL_002a - - IL_0024: call !!0[] [runtime]System.Array::Empty() - IL_0029: ret - - IL_002a: ldloc.2 - IL_002b: conv.ovf.i.un - IL_002c: newarr [runtime]System.UInt64 - IL_0031: stloc.3 - IL_0032: ldc.i4.0 - IL_0033: conv.i8 - IL_0034: stloc.s V_4 - IL_0036: ldloc.0 - IL_0037: stloc.s V_5 - IL_0039: br.s IL_0050 + IL_0020: brtrue.s IL_0028 - IL_003b: ldloc.3 - IL_003c: ldloc.s V_4 - IL_003e: conv.i - IL_003f: ldloc.s V_5 - IL_0041: stelem.i8 - IL_0042: ldloc.s V_5 - IL_0044: ldc.i4.1 - IL_0045: conv.i8 - IL_0046: add - IL_0047: stloc.s V_5 - IL_0049: ldloc.s V_4 - IL_004b: ldc.i4.1 - IL_004c: conv.i8 - IL_004d: add - IL_004e: stloc.s V_4 - IL_0050: ldloc.s V_4 - IL_0052: ldloc.1 - IL_0053: blt.un.s IL_003b + IL_0022: call !!0[] [runtime]System.Array::Empty() + IL_0027: ret - IL_0055: ldloc.3 - IL_0056: ret + IL_0028: ldloc.2 + IL_0029: conv.ovf.i.un + IL_002a: newarr [runtime]System.UInt64 + IL_002f: stloc.3 + IL_0030: ldc.i4.0 + IL_0031: conv.i8 + IL_0032: stloc.s V_4 + IL_0034: ldloc.0 + IL_0035: stloc.s V_5 + IL_0037: br.s IL_004e + + IL_0039: ldloc.3 + IL_003a: ldloc.s V_4 + IL_003c: conv.i + IL_003d: ldloc.s V_5 + IL_003f: stelem.i8 + IL_0040: ldloc.s V_5 + IL_0042: ldc.i4.1 + IL_0043: conv.i8 + IL_0044: add + IL_0045: stloc.s V_5 + IL_0047: ldloc.s V_4 + IL_0049: ldc.i4.1 + IL_004a: conv.i8 + IL_004b: add + IL_004c: stloc.s V_4 + IL_004e: ldloc.s V_4 + IL_0050: ldloc.1 + IL_0051: blt.un.s IL_0039 + + IL_0053: ldloc.3 + IL_0054: ret } .method public static uint64[] f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1674,45 +1646,43 @@ IL_0034: ldloc.1 IL_0035: stloc.2 IL_0036: ldloc.2 - IL_0037: ldc.i4.1 - IL_0038: conv.i8 - IL_0039: bge.un.s IL_0041 + IL_0037: brtrue.s IL_003f - IL_003b: call !!0[] [runtime]System.Array::Empty() - IL_0040: ret + IL_0039: call !!0[] [runtime]System.Array::Empty() + IL_003e: ret - IL_0041: ldloc.2 - IL_0042: conv.ovf.i.un - IL_0043: newarr [runtime]System.UInt64 - IL_0048: stloc.3 - IL_0049: ldc.i4.0 - IL_004a: conv.i8 - IL_004b: stloc.s V_4 - IL_004d: ldc.i4.1 - IL_004e: conv.i8 - IL_004f: stloc.s V_5 - IL_0051: br.s IL_0067 + IL_003f: ldloc.2 + IL_0040: conv.ovf.i.un + IL_0041: newarr [runtime]System.UInt64 + IL_0046: stloc.3 + IL_0047: ldc.i4.0 + IL_0048: conv.i8 + IL_0049: stloc.s V_4 + IL_004b: ldc.i4.1 + IL_004c: conv.i8 + IL_004d: stloc.s V_5 + IL_004f: br.s IL_0065 - IL_0053: ldloc.3 - IL_0054: ldloc.s V_4 - IL_0056: conv.i - IL_0057: ldloc.s V_5 - IL_0059: stelem.i8 - IL_005a: ldloc.s V_5 - IL_005c: ldloc.0 - IL_005d: add - IL_005e: stloc.s V_5 - IL_0060: ldloc.s V_4 - IL_0062: ldc.i4.1 - IL_0063: conv.i8 - IL_0064: add - IL_0065: stloc.s V_4 - IL_0067: ldloc.s V_4 - IL_0069: ldloc.1 - IL_006a: blt.un.s IL_0053 + IL_0051: ldloc.3 + IL_0052: ldloc.s V_4 + IL_0054: conv.i + IL_0055: ldloc.s V_5 + IL_0057: stelem.i8 + IL_0058: ldloc.s V_5 + IL_005a: ldloc.0 + IL_005b: add + IL_005c: stloc.s V_5 + IL_005e: ldloc.s V_4 + IL_0060: ldc.i4.1 + IL_0061: conv.i8 + IL_0062: add + IL_0063: stloc.s V_4 + IL_0065: ldloc.s V_4 + IL_0067: ldloc.1 + IL_0068: blt.un.s IL_0051 - IL_006c: ldloc.3 - IL_006d: ret + IL_006a: ldloc.3 + IL_006b: ret } .method public static uint64[] f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1751,46 +1721,44 @@ IL_001b: ldloc.1 IL_001c: stloc.2 IL_001d: ldloc.2 - IL_001e: ldc.i4.1 - IL_001f: conv.i8 - IL_0020: bge.un.s IL_0028 + IL_001e: brtrue.s IL_0026 - IL_0022: call !!0[] [runtime]System.Array::Empty() - IL_0027: ret + IL_0020: call !!0[] [runtime]System.Array::Empty() + IL_0025: ret - IL_0028: ldloc.2 - IL_0029: conv.ovf.i.un - IL_002a: newarr [runtime]System.UInt64 - IL_002f: stloc.3 - IL_0030: ldc.i4.0 - IL_0031: conv.i8 - IL_0032: stloc.s V_4 - IL_0034: ldc.i4.1 - IL_0035: conv.i8 - IL_0036: stloc.s V_5 - IL_0038: br.s IL_004f - - IL_003a: ldloc.3 - IL_003b: ldloc.s V_4 - IL_003d: conv.i - IL_003e: ldloc.s V_5 - IL_0040: stelem.i8 - IL_0041: ldloc.s V_5 - IL_0043: ldc.i4.1 - IL_0044: conv.i8 - IL_0045: add - IL_0046: stloc.s V_5 - IL_0048: ldloc.s V_4 - IL_004a: ldc.i4.1 - IL_004b: conv.i8 - IL_004c: add - IL_004d: stloc.s V_4 - IL_004f: ldloc.s V_4 - IL_0051: ldloc.1 - IL_0052: blt.un.s IL_003a + IL_0026: ldloc.2 + IL_0027: conv.ovf.i.un + IL_0028: newarr [runtime]System.UInt64 + IL_002d: stloc.3 + IL_002e: ldc.i4.0 + IL_002f: conv.i8 + IL_0030: stloc.s V_4 + IL_0032: ldc.i4.1 + IL_0033: conv.i8 + IL_0034: stloc.s V_5 + IL_0036: br.s IL_004d - IL_0054: ldloc.3 - IL_0055: ret + IL_0038: ldloc.3 + IL_0039: ldloc.s V_4 + IL_003b: conv.i + IL_003c: ldloc.s V_5 + IL_003e: stelem.i8 + IL_003f: ldloc.s V_5 + IL_0041: ldc.i4.1 + IL_0042: conv.i8 + IL_0043: add + IL_0044: stloc.s V_5 + IL_0046: ldloc.s V_4 + IL_0048: ldc.i4.1 + IL_0049: conv.i8 + IL_004a: add + IL_004b: stloc.s V_4 + IL_004d: ldloc.s V_4 + IL_004f: ldloc.1 + IL_0050: blt.un.s IL_0038 + + IL_0052: ldloc.3 + IL_0053: ret } .method public static uint64[] f22(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1879,101 +1847,99 @@ IL_0050: nop IL_0051: stloc.s V_5 IL_0053: ldloc.s V_5 - IL_0055: ldc.i4.1 - IL_0056: conv.i8 - IL_0057: bge.un.s IL_005f - - IL_0059: call !!0[] [runtime]System.Array::Empty() - IL_005e: ret - - IL_005f: ldloc.s V_5 - IL_0061: conv.ovf.i.un - IL_0062: newarr [runtime]System.UInt64 - IL_0067: stloc.s V_6 - IL_0069: ldloc.s V_4 - IL_006b: brfalse.s IL_009d - - IL_006d: ldc.i4.1 - IL_006e: stloc.s V_7 - IL_0070: ldc.i4.0 - IL_0071: conv.i8 - IL_0072: stloc.s V_8 - IL_0074: ldloc.0 - IL_0075: stloc.s V_9 - IL_0077: br.s IL_0096 - - IL_0079: ldloc.s V_6 - IL_007b: ldloc.s V_8 - IL_007d: conv.i - IL_007e: ldloc.s V_9 - IL_0080: stelem.i8 - IL_0081: ldloc.s V_9 - IL_0083: ldloc.1 - IL_0084: add - IL_0085: stloc.s V_9 - IL_0087: ldloc.s V_8 - IL_0089: ldc.i4.1 - IL_008a: conv.i8 - IL_008b: add - IL_008c: stloc.s V_8 - IL_008e: ldloc.s V_8 - IL_0090: ldc.i4.0 - IL_0091: conv.i8 - IL_0092: cgt.un - IL_0094: stloc.s V_7 - IL_0096: ldloc.s V_7 - IL_0098: brtrue.s IL_0079 - - IL_009a: nop - IL_009b: br.s IL_00d6 - - IL_009d: ldloc.2 - IL_009e: ldloc.0 - IL_009f: bge.un.s IL_00a6 - - IL_00a1: ldc.i4.0 - IL_00a2: conv.i8 - IL_00a3: nop - IL_00a4: br.s IL_00af - - IL_00a6: ldloc.2 - IL_00a7: ldloc.0 - IL_00a8: sub - IL_00a9: ldloc.1 - IL_00aa: div.un - IL_00ab: ldc.i4.1 - IL_00ac: conv.i8 - IL_00ad: add.ovf.un - IL_00ae: nop - IL_00af: stloc.s V_8 - IL_00b1: ldc.i4.0 - IL_00b2: conv.i8 - IL_00b3: stloc.s V_9 - IL_00b5: ldloc.0 - IL_00b6: stloc.s V_10 - IL_00b8: br.s IL_00cf - - IL_00ba: ldloc.s V_6 - IL_00bc: ldloc.s V_9 - IL_00be: conv.i - IL_00bf: ldloc.s V_10 - IL_00c1: stelem.i8 - IL_00c2: ldloc.s V_10 - IL_00c4: ldloc.1 - IL_00c5: add - IL_00c6: stloc.s V_10 - IL_00c8: ldloc.s V_9 - IL_00ca: ldc.i4.1 - IL_00cb: conv.i8 - IL_00cc: add - IL_00cd: stloc.s V_9 - IL_00cf: ldloc.s V_9 - IL_00d1: ldloc.s V_8 - IL_00d3: blt.un.s IL_00ba - - IL_00d5: nop - IL_00d6: ldloc.s V_6 - IL_00d8: ret + IL_0055: brtrue.s IL_005d + + IL_0057: call !!0[] [runtime]System.Array::Empty() + IL_005c: ret + + IL_005d: ldloc.s V_5 + IL_005f: conv.ovf.i.un + IL_0060: newarr [runtime]System.UInt64 + IL_0065: stloc.s V_6 + IL_0067: ldloc.s V_4 + IL_0069: brfalse.s IL_009b + + IL_006b: ldc.i4.1 + IL_006c: stloc.s V_7 + IL_006e: ldc.i4.0 + IL_006f: conv.i8 + IL_0070: stloc.s V_8 + IL_0072: ldloc.0 + IL_0073: stloc.s V_9 + IL_0075: br.s IL_0094 + + IL_0077: ldloc.s V_6 + IL_0079: ldloc.s V_8 + IL_007b: conv.i + IL_007c: ldloc.s V_9 + IL_007e: stelem.i8 + IL_007f: ldloc.s V_9 + IL_0081: ldloc.1 + IL_0082: add + IL_0083: stloc.s V_9 + IL_0085: ldloc.s V_8 + IL_0087: ldc.i4.1 + IL_0088: conv.i8 + IL_0089: add + IL_008a: stloc.s V_8 + IL_008c: ldloc.s V_8 + IL_008e: ldc.i4.0 + IL_008f: conv.i8 + IL_0090: cgt.un + IL_0092: stloc.s V_7 + IL_0094: ldloc.s V_7 + IL_0096: brtrue.s IL_0077 + + IL_0098: nop + IL_0099: br.s IL_00d4 + + IL_009b: ldloc.2 + IL_009c: ldloc.0 + IL_009d: bge.un.s IL_00a4 + + IL_009f: ldc.i4.0 + IL_00a0: conv.i8 + IL_00a1: nop + IL_00a2: br.s IL_00ad + + IL_00a4: ldloc.2 + IL_00a5: ldloc.0 + IL_00a6: sub + IL_00a7: ldloc.1 + IL_00a8: div.un + IL_00a9: ldc.i4.1 + IL_00aa: conv.i8 + IL_00ab: add.ovf.un + IL_00ac: nop + IL_00ad: stloc.s V_8 + IL_00af: ldc.i4.0 + IL_00b0: conv.i8 + IL_00b1: stloc.s V_9 + IL_00b3: ldloc.0 + IL_00b4: stloc.s V_10 + IL_00b6: br.s IL_00cd + + IL_00b8: ldloc.s V_6 + IL_00ba: ldloc.s V_9 + IL_00bc: conv.i + IL_00bd: ldloc.s V_10 + IL_00bf: stelem.i8 + IL_00c0: ldloc.s V_10 + IL_00c2: ldloc.1 + IL_00c3: add + IL_00c4: stloc.s V_10 + IL_00c6: ldloc.s V_9 + IL_00c8: ldc.i4.1 + IL_00c9: conv.i8 + IL_00ca: add + IL_00cb: stloc.s V_9 + IL_00cd: ldloc.s V_9 + IL_00cf: ldloc.s V_8 + IL_00d1: blt.un.s IL_00b8 + + IL_00d3: nop + IL_00d4: ldloc.s V_6 + IL_00d6: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs index 9d34b2466e..e3ff4102f7 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs @@ -1522,3 +1522,164 @@ namespace N Message = "The member or function 'reverse' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way." } ] + + [] + let ``Don't warn for yield! call of rec func in seq`` () = + """ +namespace N + +module M = + + type SynExpr = + | Sequential of expr1 : SynExpr * expr2 : SynExpr + | NotSequential + member _.Range = 99 + + type SyntaxNode = SynExpr of SynExpr + + type SyntaxVisitor () = member _.VisitExpr _ = None + + let visitor = SyntaxVisitor () + let dive expr range f = range, fun () -> Some expr + let traverseSynExpr _ expr = Some expr + + [] + let rec traverseSequentials path expr = + seq { + match expr with + | SynExpr.Sequential(expr1 = expr1; expr2 = SynExpr.Sequential _ as expr2) -> + yield dive expr expr.Range (fun expr -> visitor.VisitExpr(path, traverseSynExpr path, (fun _ -> None), expr)) + let path = SyntaxNode.SynExpr expr :: path + yield dive expr1 expr1.Range (traverseSynExpr path) + yield! traverseSequentials path expr2 // should not warn + + | _ -> + yield dive expr expr.Range (traverseSynExpr path) + } + """ + |> FSharp + |> withLangVersion80 + |> compile + |> shouldSucceed + + [] + let ``Warn for yield! call of rec func in list comprehension`` () = + """ +namespace N + +module M = + + type SynExpr = + | Sequential of expr1 : SynExpr * expr2 : SynExpr + | NotSequential + member _.Range = 99 + + type SyntaxNode = SynExpr of SynExpr + + type SyntaxVisitor () = member _.VisitExpr _ = None + + let visitor = SyntaxVisitor () + let dive expr range f = range, fun () -> Some expr + let traverseSynExpr _ expr = Some expr + + [] + let rec traverseSequentials path expr = + [ + match expr with + | SynExpr.Sequential(expr1 = expr1; expr2 = SynExpr.Sequential _ as expr2) -> + // It's a nested sequential expression. + // Visit it, but make defaultTraverse do nothing, + // since we're going to traverse its descendants ourselves. + yield dive expr expr.Range (fun expr -> visitor.VisitExpr(path, traverseSynExpr path, (fun _ -> None), expr)) + + // Now traverse its descendants. + let path = SyntaxNode.SynExpr expr :: path + yield dive expr1 expr1.Range (traverseSynExpr path) + yield! traverseSequentials path expr2 // should warn + + | _ -> + // It's not a nested sequential expression. + // Traverse it normally. + yield dive expr expr.Range (traverseSynExpr path) + ] + """ + |> FSharp + |> withLangVersion80 + |> compile + |> shouldFail + |> withResults [ + { Error = Warning 3569 + Range = { StartLine = 32 + StartColumn = 24 + EndLine = 32 + EndColumn = 54 } + Message = + "The member or function 'traverseSequentials' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way." } + ] + + [] + let ``Warn for yield! call of rec func in custom CE`` () = + """ +namespace N + +module M = + + type SynExpr = + | Sequential of expr1 : SynExpr * expr2 : SynExpr + | NotSequential + member _.Range = 99 + + type SyntaxNode = SynExpr of SynExpr + + type SyntaxVisitor () = member _.VisitExpr _ = None + + let visitor = SyntaxVisitor () + let dive expr range f = range, fun () -> Some expr + let traverseSynExpr _ expr = Some expr + + type ThingsBuilder() = + + member _.Yield(x) = [ x ] + + member _.Combine(currentThings, newThings) = currentThings @ newThings + + member _.Delay(f) = f () + + member _.YieldFrom(x) = x + + let things = ThingsBuilder() + + [] + let rec traverseSequentials path expr = + things { + match expr with + | SynExpr.Sequential(expr1 = expr1; expr2 = SynExpr.Sequential _ as expr2) -> + // It's a nested sequential expression. + // Visit it, but make defaultTraverse do nothing, + // since we're going to traverse its descendants ourselves. + yield dive expr expr.Range (fun expr -> visitor.VisitExpr(path, traverseSynExpr path, (fun _ -> None), expr)) + + // Now traverse its descendants. + let path = SyntaxNode.SynExpr expr :: path + yield dive expr1 expr1.Range (traverseSynExpr path) + yield! traverseSequentials path expr2 // should warn + + | _ -> + // It's not a nested sequential expression. + // Traverse it normally. + yield dive expr expr.Range (traverseSynExpr path) + } + """ + |> FSharp + |> withLangVersion80 + |> compile + |> shouldFail + |> withResults [ + { Error = Warning 3569 + Range = { StartLine = 43 + StartColumn = 17 + EndLine = 43 + EndColumn = 68 } + Message = + "The member or function 'traverseSequentials' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way." } + ] diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs index bcdc351739..6912abca33 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs @@ -166,3 +166,31 @@ let GetAllUsesOfAllSymbols() = traceProvider.Dispose() if result.Length <> 79 then failwith $"Expected 79 symbolUses, got {result.Length}:\n%A{result}" + +[] +let ``We don't lose subsequent diagnostics when there's error in one file`` () = + let project = + { SyntheticProject.Create( + { sourceFile "First" [] with + Source = """module AbstractBaseClass.File1 + + let foo x = () + + a""" }, + { sourceFile "Second" [] with + Source = """module AbstractBaseClass.File2 + + open AbstractBaseClass.File1 + + let goo = foo 1 + + type AbstractBaseClass() = + + abstract P: int""" }) with + AutoAddModules = false + SkipInitialCheck = true } + + project.Workflow { + checkFile "First" (expectErrorCodes ["FS0039"]) + checkFile "Second" (expectErrorCodes ["FS0054"; "FS0365"]) + } diff --git a/tests/FSharp.Compiler.ComponentTests/Language/BooleanReturningAndReturnTypeDirectedPartialActivePatternTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/BooleanReturningAndReturnTypeDirectedPartialActivePatternTests.fs index ce630714e6..26461598a5 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/BooleanReturningAndReturnTypeDirectedPartialActivePatternTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/BooleanReturningAndReturnTypeDirectedPartialActivePatternTests.fs @@ -101,6 +101,8 @@ but here has type (Error 39, Line 4, Col 7, Line 4, Col 13, "The value or constructor 'result' is not defined. Maybe you want one of the following: Result") + (Warning 20, Line 3, Col 1, Line 5, Col 15, + "The result of this expression has type 'string' 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'."); (Error 1, Line 8, Col 3, Line 8, Col 13, "This expression was expected to have type 'string -> bool' @@ -108,10 +110,17 @@ but here has type 'bool' ") (Error 39, Line 8, Col 7, Line 8, Col 13, "The value or constructor 'result' is not defined. Maybe you want one of the following: + Result"); + (Error 39, Line 8, Col 17, Line 8, Col 23, + "The value or constructor 'result' is not defined. Maybe you want one of the following: Result") + (Warning 20, Line 7, Col 1, Line 9, Col 15, + "The result of this expression has type 'string' 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'."); (Error 1, Line 12, Col 3, Line 12, Col 30, "This expression was expected to have type 'string -> bool' but here has type 'bool' ") + (Warning 20, Line 11, Col 1, Line 13, Col 21, + "The result of this expression has type 'string' 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'.") ] diff --git a/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs index 03bd579f6a..21c1c0de20 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs @@ -96,7 +96,6 @@ let x = lb {1; 2; if true then 3;} [] [] - [] [] [] [] @@ -135,4 +134,4 @@ let _pythags = seqbuilder {{ code |> FSharp |> typecheck - |> shouldSucceed \ No newline at end of file + |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs index d503daa77e..f31371a965 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs @@ -1,5 +1,6 @@ namespace Language +open FSharp.Test open Xunit open FSharp.Test.Compiler @@ -1262,3 +1263,185 @@ let f (x: IFirst) = x.F() (Error 101, Line 13, Col 11, Line 13, Col 17, "This construct is deprecated. Use G instead") (Error 72, Line 13, Col 21, Line 13, Col 24, "Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved.") ] + + [] + let ``Obsolete attribute warning is taken into account in a constructor property assignment`` () = + Fsx """ +open System +type JsonSerializerOptions() = + [] + member val DefaultOptions = false with get, set + + member val UseCustomOptions = false with get, set + +let options = JsonSerializerOptions(DefaultOptions = true, UseCustomOptions = false) +let options2 = JsonSerializerOptions(DefaultOptions = true, DefaultOptions = false) + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 9, Col 37, Line 9, Col 51, "This construct is deprecated. This is bad") + (Error 364, Line 10, Col 16, Line 10, Col 84, "The named argument 'DefaultOptions' has been assigned more than one value") + (Warning 44, Line 10, Col 38, Line 10, Col 52, "This construct is deprecated. This is bad") + (Warning 44, Line 10, Col 61, Line 10, Col 75, "This construct is deprecated. This is bad") + ] + + [] + let ``Obsolete attribute warning is not taken into account in prop setters that can be included in methods which are not constructors`` () = + Fsx """ +open System + +type JsonSerializerOptions() = + [] + member val DefaultOptions = false with get, set + member val UseCustomOptions = false with get, set + member this.With() = this + +let options = JsonSerializerOptions() +let options2 = + options + .With(DefaultOptions = true) + .With(UseCustomOptions = false) + """ + |> typecheck + |> withDiagnostics [ + (Warning 44, Line 13, Col 15, Line 13, Col 29, "This construct is deprecated. This is bad") + ] + + [] + let ``Obsolete attribute error is not taken into account in prop setters that can be included in methods which are not constructors`` () = + Fsx """ +open System + +type JsonSerializerOptions() = + [] + member val DefaultOptions = false with get, set + member val UseCustomOptions = false with get, set + member this.With() = this + +let options = JsonSerializerOptions() +let options2 = + options + .With(DefaultOptions = true) + .With(UseCustomOptions = false) + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 101, Line 13, Col 15, Line 13, Col 29, "This construct is deprecated. This is bad") + ] + + [] + let ``Obsolete attribute error is taken into account in a constructor property assignment`` () = + Fsx """ +open System +type JsonSerializerOptions() = + [] + member val DefaultOptions = false with get, set + + member val UseCustomOptions = false with get, set + +let options = JsonSerializerOptions(DefaultOptions = true, UseCustomOptions = false) +let options2 = JsonSerializerOptions(DefaultOptions = true, DefaultOptions = false) + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 101, Line 9, Col 37, Line 9, Col 51, "This construct is deprecated. This is bad"); + (Error 364, Line 10, Col 16, Line 10, Col 84, "The named argument 'DefaultOptions' has been assigned more than one value"); + (Error 101, Line 10, Col 38, Line 10, Col 52, "This construct is deprecated. This is bad") + ] + + [] + let ``Obsolete attribute warning is taken into account in a nested constructor property assignment`` () = + Fsx """ +open System +type JsonSerializer1Options() = + [] + member val DefaultOptions = false with get, set + + member val UseCustomOptions = false with get, set + +type JsonSerializerOptions() = + member val DefaultOptions = JsonSerializer1Options() with get, set + + member val UseCustomOptions = false with get, set + +let options = JsonSerializerOptions(DefaultOptions = JsonSerializer1Options(DefaultOptions = true), UseCustomOptions = false) + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 14, Col 77, Line 14, Col 91, "This construct is deprecated. This is bad") + ] + + [] + let ``Obsolete attribute error is taken into account in a nested constructor property assignment`` () = + Fsx """ +open System +type JsonSerializer1Options() = + [] + member val DefaultOptions = false with get, set + + member val UseCustomOptions = false with get, set + +type JsonSerializerOptions() = + member val DefaultOptions = JsonSerializer1Options() with get, set + + member val UseCustomOptions = false with get, set + +let options = JsonSerializerOptions(DefaultOptions = JsonSerializer1Options(DefaultOptions = true), UseCustomOptions = false) + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 101, Line 14, Col 77, Line 14, Col 91, "This construct is deprecated. This is bad") + ] + + [] + let ``Obsolete attribute warning is taken into account in a constructor property assignment from a csharp class`` () = + let CSLib = + CSharp """ +using System; +public class JsonProtocolTestData { + [Obsolete("Use Json instead")] + public bool IgnoreNullValues { get; set; } +} + """ |> withName "CSLib" + + let app = + FSharp """ +module ObsoleteStruct.FS +let res = JsonProtocolTestData(IgnoreNullValues = false) + """ |> withReferences [CSLib] + + app + |> compile + |> shouldFail + |> withDiagnostics [ + (Warning 44, Line 3, Col 32, Line 3, Col 48, "This construct is deprecated. Use Json instead") + ] + + [] + let ``Obsolete attribute error is taken into account in a constructor property assignment from a csharp class`` () = + let CSLib = + CSharp """ +using System; +public class JsonProtocolTestData { + [Obsolete("Use Json instead", true)] + public bool IgnoreNullValues { get; set; } +} + """ |> withName "CSLib" + + let app = + FSharp """ +module ObsoleteStruct.FS +let res = JsonProtocolTestData(IgnoreNullValues = false) + """ |> withReferences [CSLib] + + app + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 101, Line 3, Col 32, Line 3, Col 48, "This construct is deprecated. Use Json instead") + ] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs index 4b85f0cd80..12b13b88be 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs @@ -937,6 +937,30 @@ let v = 2 module B do ignore (match "" with | nameof X.Y.Z -> () | _ -> ()) +""" + (set [| 0 |]) + ] + scenario + "nameof type with generic parameters" + [ + sourceFile + "A.fs" + """ +namespace A + +module B = + module C = + type D = class end +""" + Set.empty + sourceFile + "Z.fs" + """ +module Z + +open System.Threading.Tasks + +let _ = nameof Task """ (set [| 0 |]) ] 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 ccebabe869..aa70fc6ea3 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 @@ -6049,6 +6049,7 @@ FSharp.Compiler.Syntax.ParserDetail: Int32 GetHashCode(System.Collections.IEqual FSharp.Compiler.Syntax.ParserDetail: Int32 Tag FSharp.Compiler.Syntax.ParserDetail: Int32 get_Tag() FSharp.Compiler.Syntax.ParserDetail: System.String ToString() +FSharp.Compiler.Syntax.PrettyNaming: Boolean DoesIdentifierNeedBackticks(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsActivePatternName(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsCompilerGeneratedName(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsIdentifierFirstCharacter(Char) 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 ccebabe869..aa70fc6ea3 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 @@ -6049,6 +6049,7 @@ FSharp.Compiler.Syntax.ParserDetail: Int32 GetHashCode(System.Collections.IEqual FSharp.Compiler.Syntax.ParserDetail: Int32 Tag FSharp.Compiler.Syntax.ParserDetail: Int32 get_Tag() FSharp.Compiler.Syntax.ParserDetail: System.String ToString() +FSharp.Compiler.Syntax.PrettyNaming: Boolean DoesIdentifierNeedBackticks(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsActivePatternName(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsCompilerGeneratedName(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsIdentifierFirstCharacter(Char) diff --git a/tests/FSharp.Compiler.Service.Tests/SynExprTests.fs b/tests/FSharp.Compiler.Service.Tests/SynExprTests.fs index 1e402a1d25..e0e664377b 100644 --- a/tests/FSharp.Compiler.Service.Tests/SynExprTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/SynExprTests.fs @@ -86,3 +86,37 @@ let shouldBeParenthesizedInContext (expected: Parenthesization list) src = | _ -> actual) CollectionAssert.AreEqual(expected, actual) + +[] +[] +[ ignore")>] +[] +[ ignore +")>] +[ ignore +")>] +let ``shouldBeParenthesizedInContext handles an unparenthesized hypothetical`` src = + let ast = getParseResults src + + let getSourceLineStr = + let lines = src.ReplaceLineEndings().Split '\n' + Line.toZ >> Array.get lines + + let expr, path = + (None, ast) + ||> ParsedInput.foldWhile (fun acc path node -> + match node with + | SyntaxNode.SynExpr (SynExpr.Const(SynConst.Int32 9, _) as expr) -> Some(Some(expr, path)) + | _ -> Some acc) + |> Option.defaultWith (fun () -> invalidOp "Expected a 9 but did not find one.") + + Assert.False(SynExpr.shouldBeParenthesizedInContext getSourceLineStr path expr) diff --git a/tests/FSharp.Test.Utilities/ProjectGeneration.fs b/tests/FSharp.Test.Utilities/ProjectGeneration.fs index ad3660747f..892d7c1670 100644 --- a/tests/FSharp.Test.Utilities/ProjectGeneration.fs +++ b/tests/FSharp.Test.Utilities/ProjectGeneration.fs @@ -725,6 +725,19 @@ module ProjectOperations = then failwith "Expected errors, but there were none" + let expectErrorCodes codes parseAndCheckResults _ = + let (parseResult: FSharpParseFileResults), _checkResult = parseAndCheckResults + + if not parseResult.ParseHadErrors then + let checkResult = getTypeCheckResult parseAndCheckResults + let actualCodes = checkResult.Diagnostics |> Seq.map (fun d -> d.ErrorNumberText) |> Set + let codes = Set.ofSeq codes + if actualCodes <> codes then + failwith $"Expected error codes {codes} but got {actualCodes}. \n%A{checkResult.Diagnostics}" + + else + failwith $"There were parse errors: %A{parseResult.Diagnostics}" + let expectSignatureChanged result (oldSignature: string, newSignature: string) = expectOk result () Assert.NotEqual(oldSignature, newSignature) diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Benchmarks.fs b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Benchmarks.fs deleted file mode 100644 index cce0973913..0000000000 --- a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Benchmarks.fs +++ /dev/null @@ -1,11 +0,0 @@ -namespace MicroPerf - -open BenchmarkDotNet.Running - -module Main = - - [] - let main args = - printfn "Running benchmarks..." - BenchmarkSwitcher.FromAssembly(typeof.Assembly).Run(args) |> ignore - 0 diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/ComputedCollections/Arrays/IntegralRanges.fs b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/ComputedCollections/Arrays/IntegralRanges.fs new file mode 100644 index 0000000000..645ce31c64 --- /dev/null +++ b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/ComputedCollections/Arrays/IntegralRanges.fs @@ -0,0 +1,653 @@ +module MicroPerf.ComputedCollections.Arrays.IntegralRanges + +open BenchmarkDotNet.Attributes + +#nowarn "77" + +let inline (~~) x = (^a : (static member op_Explicit : int -> ^a) x) + +module All = + let inline ``[|start..finish|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member One : 'a) + and 'a : comparison> + (start : 'a) (finish : 'a) + = + [|start..finish|] + + let inline ``[|start..step..finish|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member Zero : 'a) + and 'a : (static member One : 'a) + and 'a : comparison> + (start : 'a) (step : 'a) (finish : 'a) + = + [|start..step..finish|] + + let inline ``[|for n in start..finish -> n|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member One : 'a) + and 'a : comparison> + (start : 'a) (finish : 'a) + = + [|for n in start..finish -> n|] + + let inline ``[|for n in start..step..finish -> n|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member Zero : 'a) + and 'a : (static member One : 'a) + and 'a : comparison> + (start : 'a) (step : 'a) (finish : 'a) + = + [|for n in start..step..finish -> n|] + + let inline ``[|1..127|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member One : 'a) + and 'a : comparison + and 'a : (static member op_Explicit : int -> 'a)> () = + ``[|start..finish|]``<'a> ~~1 ~~127 + + let inline ``[|1..2..127|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member Zero : 'a) + and 'a : (static member One : 'a) + and 'a : (static member op_Explicit : int -> 'a) + and 'a : comparison> () = + ``[|start..step..finish|]``<'a> ~~1 ~~2 ~~127 + + let inline ``[|127..1|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member One : 'a) + and 'a : comparison + and 'a : (static member op_Explicit : int -> 'a)> () = + ``[|start..finish|]``<'a> ~~127 ~~1 + + let inline ``[|127..2..1|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member Zero : 'a) + and 'a : (static member One : 'a) + and 'a : (static member op_Explicit : int -> 'a) + and 'a : comparison> () = + ``[|start..step..finish|]``<'a> ~~127 ~~2 ~~1 + + let inline ``[|1..32767|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member One : 'a) + and 'a : comparison + and 'a : (static member op_Explicit : int -> 'a)> () = + ``[|start..finish|]``<'a> ~~1 ~~32767 + + let inline ``[|1..2..32767|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member Zero : 'a) + and 'a : (static member One : 'a) + and 'a : (static member op_Explicit : int -> 'a) + and 'a : comparison> () = + ``[|start..step..finish|]``<'a> ~~1 ~~2 ~~32767 + +module Signed = + let inline ``[|127..-1..-128|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member (~-) : 'a -> 'a) + and 'a : (static member One : 'a) + and 'a : (static member Zero : 'a) + and 'a : (static member op_Explicit : int -> 'a) + and 'a : comparison> () = + All.``[|start..step..finish|]``<'a> ~~127 (- ~~1) (- ~~128) + + let inline ``[|127..-2..-128|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member (~-) : 'a -> 'a) + and 'a : (static member One : 'a) + and 'a : (static member Zero : 'a) + and 'a : (static member op_Explicit : int -> 'a) + and 'a : comparison> () = + All.``[|start..step..finish|]``<'a> ~~127 (- ~~2) (- ~~128) + + let inline ``[|32767..-1..-32768|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member (~-) : 'a -> 'a) + and 'a : (static member One : 'a) + and 'a : (static member Zero : 'a) + and 'a : (static member op_Explicit : int -> 'a) + and 'a : comparison> () = + All.``[|start..step..finish|]``<'a> ~~32767 (- ~~1) (- ~~32768) + + let inline ``[|32767..-2..-32768|]``<'a + when 'a : (static member (+) : 'a * 'a -> 'a) + and 'a : (static member (~-) : 'a -> 'a) + and 'a : (static member One : 'a) + and 'a : (static member Zero : 'a) + and 'a : (static member op_Explicit : int -> 'a) + and 'a : comparison> () = + All.``[|start..step..finish|]``<'a> ~~32767 (- ~~2) (- ~~32769) + +[] +type ComputedCollections_Arrays_IntegralRanges_SByte () = + member _.StartFinish : obj array seq = + [ + [|-128y; 127y|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|127y; -1y; -128y|] + [|-128y; 2y; 127y|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + member _.M5 () = Signed.``[|127..-1..-128|]`` () + + [] + member _.M6 () = Signed.``[|127..-2..-128|]`` () + + [] + [.StartFinish)>] + member _.M7 (start, finish) = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M8 (start, step, finish) = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M9 (start, finish) = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M10 (start, step, finish) = All.``[|for n in start..step..finish -> n|]`` start step finish + +[] +type ComputedCollections_Arrays_IntegralRanges_Byte () = + member _.StartFinish : obj array seq = + [ + [|box 0uy; 255uy|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|box 0uy; 2uy; 255uy|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + [.StartFinish)>] + member _.M5 (start, finish) = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M6 (start, step, finish) = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M7 (start, finish) = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M8 (start, step, finish) = All.``[|for n in start..step..finish -> n|]`` start step finish + +[] +type ComputedCollections_Arrays_IntegralRanges_Char () = + member _.StartFinish : obj array seq = + [ + [|'\000'; '\u7fff'|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|'\000'; '\002'; '\u7fff'|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + member _.M5 () = All.``[|1..32767|]`` () + + [] + member _.M6 () = All.``[|1..2..32767|]`` () + + [] + [.StartFinish)>] + member _.M7 (start : char) finish = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M8 (start : char) step finish = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M9 (start : char) finish = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M10 (start : char) step finish = All.``[|for n in start..step..finish -> n|]`` start step finish + +[] +type ComputedCollections_Arrays_IntegralRanges_Int16 () = + member _.StartFinish : obj array seq = + [ + [|-32768s; 32767s|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|32767s; -1s; -32768s|] + [|-32768s; 2s; 32767s|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + member _.M5 () = All.``[|1..32767|]`` () + + [] + member _.M6 () = All.``[|1..2..32767|]`` () + + [] + member _.M7 () = Signed.``[|32767..-1..-32768|]`` () + + [] + member _.M8 () = Signed.``[|32767..-2..-32768|]`` () + + [] + [.StartFinish)>] + member _.M9 (start, finish) = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M10 (start, step, finish) = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M11 (start, finish) = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M12 (start, step, finish) = All.``[|for n in start..step..finish -> n|]`` start step finish + +[] +type ComputedCollections_Arrays_IntegralRanges_UInt16 () = + member _.StartFinish : obj array seq = + [ + [|box 0us; 32767us|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|box 0us; 2us; 32767us|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + member _.M5 () = All.``[|1..32767|]`` () + + [] + member _.M6 () = All.``[|1..2..32767|]`` () + + [] + [.StartFinish)>] + member _.M7 (start, finish) = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M8 (start, step, finish) = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M9 (start, finish) = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M10 (start, step, finish) = All.``[|for n in start..step..finish -> n|]`` start step finish + +[] +type ComputedCollections_Arrays_IntegralRanges_Int32 () = + member _.StartFinish : obj array seq = + [ + [|-32768; 32767|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|32767; -1; -32768|] + [|-32768; 2; 32767|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + member _.M5 () = All.``[|1..32767|]`` () + + [] + member _.M6 () = All.``[|1..2..32767|]`` () + + [] + member _.M7 () = Signed.``[|32767..-1..-32768|]`` () + + [] + member _.M8 () = Signed.``[|32767..-2..-32768|]`` () + + [] + [.StartFinish)>] + member _.M9 (start, finish) = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M10 (start, step, finish) = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M11 (start, finish) = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M12 (start, step, finish) = All.``[|for n in start..step..finish -> n|]`` start step finish + +[] +type ComputedCollections_Arrays_IntegralRanges_UInt32 () = + member _.StartFinish : obj array seq = + [ + [|0u; 32767u|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|0u; 2u; 32767u|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + member _.M5 () = All.``[|1..32767|]`` () + + [] + member _.M6 () = All.``[|1..2..32767|]`` () + + [] + [.StartFinish)>] + member _.M7 (start, finish) = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M8 (start, step, finish) = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M9 (start, finish) = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M10 (start, step, finish) = All.``[|for n in start..step..finish -> n|]`` start step finish + +[] +type ComputedCollections_Arrays_IntegralRanges_Int64 () = + member _.StartFinish : obj array seq = + [ + [|-32768L; 32767L|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|32767L; -1L; -32768L|] + [|-32768L; 2L; 32767L|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + member _.M5 () = All.``[|1..32767|]`` () + + [] + member _.M6 () = All.``[|1..2..32767|]`` () + + [] + member _.M7 () = Signed.``[|32767..-1..-32768|]`` () + + [] + member _.M8 () = Signed.``[|32767..-2..-32768|]`` () + + [] + [.StartFinish)>] + member _.M9 (start, finish) = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M10 (start, step, finish) = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M11 (start, finish) = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M12 (start, step, finish) = All.``[|for n in start..step..finish -> n|]`` start step finish + +[] +type ComputedCollections_Arrays_IntegralRanges_UInt64 () = + member _.StartFinish : obj array seq = + [ + [|0UL; 32767UL|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|0UL; 2UL; 32767UL|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + member _.M5 () = All.``[|1..32767|]`` () + + [] + member _.M6 () = All.``[|1..2..32767|]`` () + + [] + [.StartFinish)>] + member _.M7 (start, finish) = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M8 (start, step, finish) = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M9 (start, finish) = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M10 (start, step, finish) = All.``[|for n in start..step..finish -> n|]`` start step finish + +[] +type ComputedCollections_Arrays_IntegralRanges_IntPtr () = + member _.StartFinish : obj array seq = + [ + [|-32768n; 32767n|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|32767n; -1n; -32768n|] + [|-32768n; 2n; 32767n|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + member _.M5 () = All.``[|1..32767|]`` () + + [] + member _.M6 () = All.``[|1..2..32767|]`` () + + [] + member _.M7 () = Signed.``[|32767..-1..-32768|]`` () + + [] + member _.M8 () = Signed.``[|32767..-2..-32768|]`` () + + [] + [.StartFinish)>] + member _.M9 (start, finish) = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M10 (start, step, finish) = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M11 (start, finish) = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M12 (start, step, finish) = All.``[|for n in start..step..finish -> n|]`` start step finish + +[] +type ComputedCollections_Arrays_IntegralRanges_UIntPtr () = + member _.StartFinish : obj array seq = + [ + [|0un; 32767un|] + ] + + member _.StartStepFinish : obj array seq = + [ + [|0un; 2un; 32767un|] + ] + + [] + member _.M1 () = All.``[|127..1|]`` () + + [] + member _.M2 () = All.``[|127..2..1|]`` () + + [] + member _.M3 () = All.``[|1..127|]`` () + + [] + member _.M4 () = All.``[|1..2..127|]`` () + + [] + member _.M5 () = All.``[|1..32767|]`` () + + [] + member _.M6 () = All.``[|1..2..32767|]`` () + + [] + [.StartFinish)>] + member _.M7 (start, finish) = All.``[|start..finish|]`` start finish + + [] + [.StartStepFinish)>] + member _.M8 (start, step, finish) = All.``[|start..step..finish|]`` start step finish + + [ n|]")>] + [.StartFinish)>] + member _.M9 (start, finish) = All.``[|for n in start..finish -> n|]`` start finish + + [ n|]")>] + [.StartStepFinish)>] + member _.M10 (start, step, finish) = All.``[|for n in start..step..finish -> n|]`` start step finish diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj index 9fc704b2ce..2cbfaf0aab 100644 --- a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj +++ b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj @@ -1,14 +1,20 @@  + Exe - $(OtherFlags) --nowarn:1204 - $(OtherFlags) --nowarn:57 - $(OtherFlags) --langversion:preview - $(OtherFlags) --define:PREVIEW + $(NoWarn);1204;57 + true + + + $(MSBuildThisFileDirectory)../../../../artifacts/bin/fsc/Release/$(TargetFramework)/fsc.dll + preview + + + @@ -21,9 +27,22 @@ - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Program.fs b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Program.fs new file mode 100644 index 0000000000..574f186dd3 --- /dev/null +++ b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/Program.fs @@ -0,0 +1,16 @@ +module MicroPerf.Program + +open System +open System.Reflection +open BenchmarkDotNet.Configs +open BenchmarkDotNet.Jobs +open BenchmarkDotNet.Running + +let config = + DefaultConfig.Instance + .AddJob(Job.Default.WithId("Current").WithArguments([|MsBuildArgument "/p:BUILDING_USING_DOTNET=true"|]).AsBaseline()) + .AddJob(Job.Default.WithId("Preview").WithArguments([|MsBuildArgument "/p:BUILDING_USING_DOTNET=true"|]).WithCustomBuildConfiguration "Preview") + .WithOptions(ConfigOptions.JoinSummary) + .HideColumns("BuildConfiguration") + +ignore (BenchmarkSwitcher.FromAssembly(Assembly.GetExecutingAssembly()).Run(Environment.GetCommandLineArgs(), config)) diff --git a/tests/benchmarks/CompiledCodeBenchmarks/README.md b/tests/benchmarks/CompiledCodeBenchmarks/README.md new file mode 100644 index 0000000000..80ccf5eba9 --- /dev/null +++ b/tests/benchmarks/CompiledCodeBenchmarks/README.md @@ -0,0 +1,58 @@ +# Compiled Code Benchmarks + +This benchmarks project is meant to be used to test the performance of code generated by the F# compiler. It is set up so that, by default, it will build and run your benchmarks in two jobs: + +- The first will be built using the local compiler targeting the current language version and will be used as the baseline. +- The second will be built using the local compiler targeting the `preview` language version. + +Note that the intent is generally that you use this project to benchmark your changes locally. Most of the time, you will not need to check in your benchmarks. + +#### Build the repo with the `Release` config + +```pwsh +./Build.cmd -c Release +``` + +#### Run the benchmarks + +```pwsh +dotnet run --project .\tests\benchmarks\CompiledCodeBenchmarks\MicroPerf\MicroPerf.fsproj -c Release +``` + +The benchmark switcher will prompt you to choose which benchmark or benchmarks you want to run. + +#### Sample output + +```console +| Job | Categories | start | finish | step | Mean | Error | StdDev | Median | Ratio | RatioSD | Gen0 | Gen1 | Gen2 | Allocated | Alloc Ratio | +|-------- |--------------------------------------------------------------------------------------- |------ |------- |----- |---------------:|--------------:|--------------:|---------------:|------:|--------:|-------:|-------:|-------:|----------:|------------:| +| Current | UInt32,[|127u..1u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 24.046 ns | 0.4269 ns | 0.3993 ns | 23.985 ns | 1.00 | 0.00 | 0.0004 | - | - | 96 B | 1.00 | +| Preview | UInt32,[|127u..1u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 1.729 ns | 0.0804 ns | 0.0752 ns | 1.725 ns | 0.07 | 0.00 | - | - | - | - | 0.00 | +| | | | | | | | | | | | | | | | | +| Current | UInt32,[|127u..2u..1u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 22.817 ns | 0.2053 ns | 0.1920 ns | 22.760 ns | 1.00 | 0.00 | 0.0004 | - | - | 96 B | 1.00 | +| Preview | UInt32,[|127u..2u..1u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 3.161 ns | 0.1053 ns | 0.0985 ns | 3.172 ns | 0.14 | 0.00 | - | - | - | - | 0.00 | +| | | | | | | | | | | | | | | | | +| Current | UInt32,[|1u..127u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 361.493 ns | 4.3161 ns | 3.8261 ns | 361.798 ns | 1.00 | 0.00 | 0.0072 | - | - | 1768 B | 1.00 | +| Preview | UInt32,[|1u..127u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 96.560 ns | 1.9609 ns | 3.6347 ns | 94.721 ns | 0.27 | 0.01 | 0.0021 | - | - | 536 B | 0.30 | +| | | | | | | | | | | | | | | | | +| Current | UInt32,[|1u..2u..127u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 263.240 ns | 3.4600 ns | 2.8893 ns | 264.086 ns | 1.00 | 0.00 | 0.0029 | - | - | 712 B | 1.00 | +| Preview | UInt32,[|1u..2u..127u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 58.053 ns | 1.1757 ns | 1.6481 ns | 57.840 ns | 0.22 | 0.01 | 0.0011 | - | - | 280 B | 0.39 | +| | | | | | | | | | | | | | | | | +| Current | UInt32,[|1u..2u..32767u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 40,529.790 ns | 272.6267 ns | 241.6764 ns | 40,486.288 ns | 1.00 | 0.00 | 0.4883 | - | - | 131464 B | 1.00 | +| Preview | UInt32,[|1u..2u..32767u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 7,787.907 ns | 152.9334 ns | 176.1183 ns | 7,737.320 ns | 0.19 | 0.00 | 0.2747 | - | - | 65560 B | 0.50 | +| | | | | | | | | | | | | | | | | +| Current | UInt32,[|1u..32767u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 256,084.235 ns | 5,074.6636 ns | 6,598.4961 ns | 257,729.980 ns | 1.00 | 0.00 | 8.3008 | 8.3008 | 8.3008 | 393680 B | 1.00 | +| Preview | UInt32,[|1u..32767u|],ComputedCollections,Arrays,IntegralRanges | ? | ? | ? | 77,660.979 ns | 1,541.8822 ns | 4,399.0768 ns | 77,866.278 ns | 0.31 | 0.02 | 2.8076 | 2.8076 | 2.8076 | 131088 B | 0.33 | +| | | | | | | | | | | | | | | | | +| Current | UInt32,[|for n in start..finish -> n|],ComputedCollections,Arrays,IntegralRanges | 0 | 32767 | ? | 281,373.636 ns | 5,097.5675 ns | 4,518.8608 ns | 282,881.763 ns | 1.00 | 0.00 | 8.7891 | 8.7891 | 8.7891 | 393741 B | 1.00 | +| Preview | UInt32,[|for n in start..finish -> n|],ComputedCollections,Arrays,IntegralRanges | 0 | 32767 | ? | 77,629.964 ns | 1,545.8980 ns | 4,509.4572 ns | 77,968.518 ns | 0.29 | 0.02 | 3.0518 | 3.0518 | 3.0518 | 131090 B | 0.33 | +| | | | | | | | | | | | | | | | | +| Current | UInt32,[|for n in start..step..finish -> n|],ComputedCollections,Arrays,IntegralRanges | 0 | 32767 | 2 | 69,948.064 ns | 1,078.6284 ns | 1,154.1203 ns | 69,834.222 ns | 1.00 | 0.00 | 0.7324 | - | - | 197056 B | 1.00 | +| Preview | UInt32,[|for n in start..step..finish -> n|],ComputedCollections,Arrays,IntegralRanges | 0 | 32767 | 2 | 7,700.286 ns | 115.4058 ns | 107.9507 ns | 7,679.921 ns | 0.11 | 0.00 | 0.2747 | - | - | 65560 B | 0.33 | +| | | | | | | | | | | | | | | | | +| Current | UInt32,[|start..finish|],ComputedCollections,Arrays,IntegralRanges | 0 | 32767 | ? | 148,726.931 ns | 2,956.8132 ns | 4,603.4019 ns | 148,672.632 ns | 1.00 | 0.00 | 4.8828 | 4.3945 | 4.3945 | 262584 B | 1.00 | +| Preview | UInt32,[|start..finish|],ComputedCollections,Arrays,IntegralRanges | 0 | 32767 | ? | 77,915.564 ns | 1,554.2518 ns | 3,476.3069 ns | 77,861.060 ns | 0.52 | 0.03 | 4.0283 | 4.0283 | 4.0283 | 131095 B | 0.50 | +| | | | | | | | | | | | | | | | | +| Current | UInt32,[|start..step..finish|],ComputedCollections,Arrays,IntegralRanges | 0 | 32767 | 2 | 38,456.304 ns | 682.2118 ns | 638.1413 ns | 38,380.719 ns | 1.00 | 0.00 | 0.4883 | - | - | 131464 B | 1.00 | +| Preview | UInt32,[|start..step..finish|],ComputedCollections,Arrays,IntegralRanges | 0 | 32767 | 2 | 7,791.339 ns | 93.7728 ns | 87.7152 ns | 7,789.114 ns | 0.20 | 0.00 | 0.2747 | - | - | 65560 B | 0.50 | +``` \ No newline at end of file diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj index 4c66d9cfb8..d23efc28b9 100644 --- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj +++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj @@ -3,6 +3,7 @@ Exe false + true diff --git a/tests/service/CompletionTests.fs b/tests/service/CompletionTests.fs index c3859e0b82..8e47020dad 100644 --- a/tests/service/CompletionTests.fs +++ b/tests/service/CompletionTests.fs @@ -82,6 +82,14 @@ let myFancyFunc (x:string) = |> _.ToL""" assertHasItemWithNames ["ToLower"] info +[] +let ``Underscore dot lambda - No prefix`` () = + let info = getCompletionInfo "[s] |> List.map _. " (3, 18) """ +let s = "" +[s] |> List.map _. +""" + assertHasItemWithNames ["Length"] info + [] let ``Type decl - Record - Field type 01`` () = let info = getCompletionInfo "type Record = { Field: }" (2, 23) """ diff --git a/tests/service/PatternMatchCompilationTests.fs b/tests/service/PatternMatchCompilationTests.fs index c75225aae0..9b7fe1ff12 100644 --- a/tests/service/PatternMatchCompilationTests.fs +++ b/tests/service/PatternMatchCompilationTests.fs @@ -1260,4 +1260,17 @@ let f : obj -> _ = assertHasSymbolUsages ["i"] checkResults dumpDiagnostics checkResults |> shouldEqual [ "(5,6--5,18): Feature 'non-variable patterns to the right of 'as' patterns' is not available in F# 5.0. Please use language version 6.0 or greater." - ] \ No newline at end of file + ] + +[] +let ``Unresolved name - Qualifier 01`` () = + let _, checkResults = getParseAndCheckResults """ +match None with +| Foo.Bar -> let a = 1 in ignore a +| Some b -> ignore b +""" + assertHasSymbolUsages ["a"; "b"] checkResults + dumpDiagnostics checkResults |> shouldEqual [ + "(3,2--3,5): The namespace or module 'Foo' is not defined." + "(2,6--2,10): Incomplete pattern matches on this expression." + ] diff --git a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj index 56f95a12ba..5510d3dcb9 100644 --- a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj +++ b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj @@ -10,7 +10,6 @@ true true true - false false nunit true