diff --git a/docs/release-notes/.FSharp.Compiler.Service/10.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/10.0.300.md index 471abbfb982..81298532d32 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/10.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/10.0.300.md @@ -1,5 +1,9 @@ ### Fixed +* Fix extra sequence point at the end of match expressions. ([Issue #12052](https://github.com/dotnet/fsharp/issues/12052)) +* Fix wrong sequence point range for `return`/`yield`/`return!`/`yield!` inside computation expressions. ([Issue #19248](https://github.com/dotnet/fsharp/issues/19248)) +* Fix extra out-of-order sequence point for `use` in `task` computation expressions. ([Issue #19255](https://github.com/dotnet/fsharp/issues/19255)) +* Fix debug points failing to bind in body of `[ for x in xs -> body ]` comprehensions. ([Issue #13504](https://github.com/dotnet/fsharp/issues/13504)) * Fixed Find All References not correctly finding active pattern cases in signature files. ([Issue #19173](https://github.com/dotnet/fsharp/issues/19173), [Issue #14969](https://github.com/dotnet/fsharp/issues/14969), [PR #19252](https://github.com/dotnet/fsharp/pull/19252)) * Fixed Rename not correctly handling operators containing `.` (e.g., `-.-`). ([Issue #17221](https://github.com/dotnet/fsharp/issues/17221), [Issue #14057](https://github.com/dotnet/fsharp/issues/14057), [PR #19252](https://github.com/dotnet/fsharp/pull/19252)) * Fixed Find All References not correctly applying `#line` directive remapping. ([Issue #9928](https://github.com/dotnet/fsharp/issues/9928), [PR #19252](https://github.com/dotnet/fsharp/pull/19252)) diff --git a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs index 0af55834f8f..a835497ce18 100644 --- a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs @@ -1893,6 +1893,7 @@ let rec TryTranslateComputationExpression headPat = pat expr = rhsExpr debugPoint = spBind + range = mBind trivia = { LeadingKeyword = leadingKeyword }) ] Body = innerComp }, @@ -1914,7 +1915,7 @@ let rec TryTranslateComputationExpression None, TranslateComputationExpressionNoQueryOps ceenv innerComp, innerCompRange, - DebugPointAtTarget.Yes, + DebugPointAtTarget.No, SynMatchClauseTrivia.Zero ) ], @@ -1925,7 +1926,7 @@ let rec TryTranslateComputationExpression requireBuilderMethod "Using" ceenv leadingKeyword.Range leadingKeyword.Range Some( - translatedCtxt (mkSynCall "Using" leadingKeyword.Range [ rhsExpr; consumeExpr ] ceenv.builderValName) + translatedCtxt (mkSynCall "Using" mBind [ rhsExpr; consumeExpr ] ceenv.builderValName) |> addBindDebugPoint spBind ) @@ -2321,7 +2322,7 @@ let rec TryTranslateComputationExpression Some(translatedCtxt callExpr) - | SynExpr.YieldOrReturnFrom((true, _), synYieldExpr, _, { YieldOrReturnFromKeyword = m }) -> + | SynExpr.YieldOrReturnFrom((true, _), synYieldExpr, mFull, { YieldOrReturnFromKeyword = m }) -> let yieldFromExpr = mkSourceExpr synYieldExpr ceenv.sourceMethInfo ceenv.builderValName @@ -2343,11 +2344,11 @@ let rec TryTranslateComputationExpression if IsControlFlowExpression synYieldExpr then yieldFromCall else - SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, false, yieldFromCall) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mFull, false, yieldFromCall) Some(translatedCtxt yieldFromCall) - | SynExpr.YieldOrReturnFrom((false, _), synReturnExpr, _, { YieldOrReturnFromKeyword = m }) -> + | SynExpr.YieldOrReturnFrom((false, _), synReturnExpr, mFull, { YieldOrReturnFromKeyword = m }) -> let returnFromExpr = mkSourceExpr synReturnExpr ceenv.sourceMethInfo ceenv.builderValName @@ -2372,11 +2373,11 @@ let rec TryTranslateComputationExpression if IsControlFlowExpression synReturnExpr then returnFromCall else - SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, false, returnFromCall) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mFull, false, returnFromCall) Some(translatedCtxt returnFromCall) - | SynExpr.YieldOrReturn((isYield, _), synYieldOrReturnExpr, _, { YieldOrReturnKeyword = m }) -> + | SynExpr.YieldOrReturn((isYield, _), synYieldOrReturnExpr, mFull, { YieldOrReturnKeyword = m }) -> let methName = (if isYield then "Yield" else "Return") if ceenv.isQuery && not isYield then @@ -2391,7 +2392,7 @@ let rec TryTranslateComputationExpression if IsControlFlowExpression synYieldOrReturnExpr then yieldOrReturnCall else - SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, false, yieldOrReturnCall) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mFull, false, yieldOrReturnCall) Some(translatedCtxt yieldOrReturnCall) diff --git a/src/Compiler/Checking/NameResolution.fs b/src/Compiler/Checking/NameResolution.fs index b89c6d91d13..1bb3f6de895 100644 --- a/src/Compiler/Checking/NameResolution.fs +++ b/src/Compiler/Checking/NameResolution.fs @@ -2241,9 +2241,7 @@ let CallEnvSink (sink: TcResultsSink) (scopem, nenv, ad) = | None -> () | Some sink -> sink.NotifyEnvWithScope(scopem, nenv, ad) -// (#16621) Register union case tester properties as references to their underlying union case. -// For union case testers (e.g., IsB property), this ensures "Find All References" on a union case -// includes usages of its tester property. Uses a shifted range to avoid duplicate filtering in ItemKeyStore. +// (#16621) Register union case tester properties (e.g., IsB) as references to their underlying union case. let RegisterUnionCaseTesterForProperty (sink: TcResultsSink) (m: range) @@ -2278,7 +2276,7 @@ let CallNameResolutionSink (sink: TcResultsSink) (m: range, nenv, item, tpinst, | None -> () | Some currentSink -> currentSink.NotifyNameResolution(m.End, item, tpinst, occurrenceType, nenv, ad, m, false) - // (#16621) For union case tester properties, also register the underlying union case + match item with | Item.Property(_, pinfos, _) -> RegisterUnionCaseTesterForProperty sink m nenv pinfos occurrenceType ad | _ -> () @@ -2288,7 +2286,7 @@ let CallMethodGroupNameResolutionSink (sink: TcResultsSink) (m: range, nenv, ite | None -> () | Some currentSink -> currentSink.NotifyMethodGroupNameResolution(m.End, item, itemMethodGroup, tpinst, occurrenceType, nenv, ad, m, false) - // (#16621) For union case tester properties, also register the underlying union case + match item with | Item.Property(_, pinfos, _) -> RegisterUnionCaseTesterForProperty sink m nenv pinfos occurrenceType ad | _ -> () diff --git a/src/Compiler/Checking/NameResolution.fsi b/src/Compiler/Checking/NameResolution.fsi index dc42c830909..c4e08188c4c 100755 --- a/src/Compiler/Checking/NameResolution.fsi +++ b/src/Compiler/Checking/NameResolution.fsi @@ -628,10 +628,6 @@ val internal CallMethodGroupNameResolutionSink: val internal CallNameResolutionSinkReplacing: TcResultsSink -> range * NameResolutionEnv * Item * TyparInstantiation * ItemOccurrence * AccessorDomain -> unit -/// (#16621) Register union case tester properties as references to their underlying union case -val internal RegisterUnionCaseTesterForProperty: - TcResultsSink -> range -> NameResolutionEnv -> PropInfo list -> ItemOccurrence -> AccessorDomain -> unit - /// Report a specific name resolution at a source range val internal CallExprHasTypeSink: TcResultsSink -> range * NameResolutionEnv * TType * AccessorDomain -> unit diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 1e2f26b011e..9d3a7922799 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -3556,8 +3556,7 @@ and GenLinearExpr cenv cgbuf eenv expr sequel preSteps (contf: FakeUnit -> FakeU // // In both cases, any instructions that come after this point will be falsely associated with the last branch of the control // prior to the join point. This is base, e.g. see FSharp 1.0 bug 5155 - if not (isNil stackAfterJoin) then - cgbuf.EmitStartOfHiddenCode() + cgbuf.EmitStartOfHiddenCode() GenSequel cenv eenv.cloc cgbuf sequelAfterJoin Fake)) diff --git a/src/Compiler/Optimize/LowerComputedCollections.fs b/src/Compiler/Optimize/LowerComputedCollections.fs index da1fbbdd7aa..a0495b890eb 100644 --- a/src/Compiler/Optimize/LowerComputedCollections.fs +++ b/src/Compiler/Optimize/LowerComputedCollections.fs @@ -616,12 +616,12 @@ let gatherPrelude ((|App|_|) : _ -> _ voption) expr = [] let (|SeqMap|_|) g = gatherPrelude (function - | ValApp g g.seq_map_vref ([ty1; ty2], [Expr.Lambda (valParams = [loopVal]; bodyExpr = body; range = mIn) as mapping; input], mFor) -> + | ValApp g g.seq_map_vref ([ty1; ty2], [Expr.Lambda (valParams = [loopVal]; bodyExpr = DebugPoints (body, debug); range = mIn) as mapping; input], mFor) -> let spIn = match mIn.NotedSourceConstruct with NotedSourceConstruct.InOrTo -> DebugPointAtInOrTo.Yes mIn | _ -> DebugPointAtInOrTo.No let spFor = DebugPointAtBinding.Yes mFor let spInWhile = match spIn with DebugPointAtInOrTo.Yes m -> DebugPointAtWhile.Yes m | DebugPointAtInOrTo.No -> DebugPointAtWhile.No let ranges = body.Range, spFor, spIn, mFor, mIn, spInWhile - ValueSome (ty1, ty2, input, mapping, loopVal, body, ranges) + ValueSome (ty1, ty2, input, mapping, loopVal, debug body, ranges) | _ -> ValueNone) diff --git a/src/Compiler/SyntaxTree/PrettyNaming.fs b/src/Compiler/SyntaxTree/PrettyNaming.fs index 7f3e4edfe58..67136ce69dd 100755 --- a/src/Compiler/SyntaxTree/PrettyNaming.fs +++ b/src/Compiler/SyntaxTree/PrettyNaming.fs @@ -927,11 +927,9 @@ let splitAroundQuotationWithCount (text: string) (separator: char) (count: int) [] let FSharpModuleSuffix = "Module" -/// Prefix for union case tester properties (e.g., "get_IsCase" for union case "Case") [] let unionCaseTesterPropertyPrefix = "get_Is" -/// The length of unionCaseTesterPropertyPrefix [] let unionCaseTesterPropertyPrefixLength = 6 // "get_Is".Length diff --git a/src/Compiler/SyntaxTree/PrettyNaming.fsi b/src/Compiler/SyntaxTree/PrettyNaming.fsi index afc85dad491..31842f17664 100644 --- a/src/Compiler/SyntaxTree/PrettyNaming.fsi +++ b/src/Compiler/SyntaxTree/PrettyNaming.fsi @@ -221,15 +221,12 @@ val internal FSharpModuleSuffix: string = "Module" [] val internal MangledGlobalName: string = "`global`" -/// Prefix for union case tester properties (e.g., "get_IsCase" for union case "Case") [] val internal unionCaseTesterPropertyPrefix: string = "get_Is" -/// The length of unionCaseTesterPropertyPrefix [] val internal unionCaseTesterPropertyPrefixLength: int = 6 -/// Check if a property name is a union case tester property val internal IsUnionCaseTesterPropertyName: name: string -> bool val internal IllegalCharactersInTypeAndNamespaceNames: char[] diff --git a/tests/AheadOfTime/Trimming/check.ps1 b/tests/AheadOfTime/Trimming/check.ps1 index ec64b57863f..1695a3684f0 100644 --- a/tests/AheadOfTime/Trimming/check.ps1 +++ b/tests/AheadOfTime/Trimming/check.ps1 @@ -63,7 +63,7 @@ function CheckTrim($root, $tfm, $outputfile, $expected_len, $callerLineNumber) { $allErrors = @() # Check net9.0 trimmed assemblies -$allErrors += CheckTrim -root "SelfContained_Trimming_Test" -tfm "net9.0" -outputfile "FSharp.Core.dll" -expected_len 311296 -callerLineNumber 66 +$allErrors += CheckTrim -root "SelfContained_Trimming_Test" -tfm "net9.0" -outputfile "FSharp.Core.dll" -expected_len 311808 -callerLineNumber 66 # Check net9.0 trimmed assemblies with static linked FSharpCore $allErrors += CheckTrim -root "StaticLinkedFSharpCore_Trimming_Test" -tfm "net9.0" -outputfile "StaticLinkedFSharpCore_Trimming_Test.dll" -expected_len 9169408 -callerLineNumber 69 diff --git a/tests/FSharp.Compiler.ComponentTests/Debugger/CEDebugPoints.fs b/tests/FSharp.Compiler.ComponentTests/Debugger/CEDebugPoints.fs new file mode 100644 index 00000000000..57f0100a242 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Debugger/CEDebugPoints.fs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Debugger + +open Xunit +open FSharp.Test.Compiler +open Debugger.DebuggerTestHelpers + +/// https://github.com/dotnet/fsharp/issues/19248 +/// https://github.com/dotnet/fsharp/issues/19255 +module CEDebugPoints = + + [] + let ``Return in async CE - debug point covers full expression`` () = + verifyMethodDebugPoints """ +module TestModule + +let a = + async { + return 1 + } + """ "Invoke" [ (Line 6, Col 9, Line 6, Col 17) ] + + [] + let ``Yield in seq CE - debug point on yield value`` () = + verifyMethodDebugPoints """ +module TestModule + +let a = + seq { + yield 42 + } + """ "GenerateNext" [ (Line 6, Col 15, Line 6, Col 17) ] + + [] + let ``ReturnFrom in async CE - debug point covers full expression`` () = + verifyMethodDebugPoints """ +module TestModule + +let a = + async { + return! async.Return(1) + } + """ "Invoke" [ (Line 6, Col 9, Line 6, Col 32) ] + + [] + let ``YieldFrom in CE - debug point covers full expression`` () = + verifyMethodDebugPoints """ +module TestModule + +type Wrapper<'a> = Wrapper of 'a list + +type ListBuilder() = + member _.Yield(x) = Wrapper [x] + member _.YieldFrom(Wrapper xs) = Wrapper xs + member _.Combine(Wrapper xs, Wrapper ys) = Wrapper(xs @ ys) + member _.Delay(f: unit -> Wrapper<'a>) = f() + member _.Zero() = Wrapper [] + +let list = ListBuilder() + +let a = + list { + yield! Wrapper [1; 2] + } + """ "staticInitialization@" [ (Line 13, Col 1, Line 13, Col 25); (Line 16, Col 5, Line 16, Col 9); (Line 17, Col 9, Line 17, Col 30) ] + + [] + let ``Yield in task CE - debug point covers full expression`` () = + verifyMethodDebugPoints """ +module TestModule + +open System.Collections.Generic + +let mkValue () = 42 + +let items = ResizeArray() + +let t = + task { + items.Add(mkValue()) + return () + } + """ "MoveNext" [ (Line 12, Col 9, Line 12, Col 29); (Line 13, Col 9, Line 13, Col 18) ] + + [] + let ``Use in task CE - no extra out-of-order sequence point`` () = + verifyMethodDebugPoints """ +module TestModule + +open System +open System.Threading.Tasks + +type Disposable() = + interface IDisposable with + member _.Dispose() = () + +let t = + task { + let i = 1 + use d = new Disposable() + return i + } + """ "MoveNext" [ (Line 14, Col 9, Line 14, Col 33); (Line 13, Col 9, Line 13, Col 18); (Line 14, Col 13, Line 14, Col 14); (Line 15, Col 9, Line 15, Col 17) ] diff --git a/tests/FSharp.Compiler.ComponentTests/Debugger/DebuggerTestHelpers.fs b/tests/FSharp.Compiler.ComponentTests/Debugger/DebuggerTestHelpers.fs new file mode 100644 index 00000000000..88366a2be86 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Debugger/DebuggerTestHelpers.fs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Debugger + +open FSharp.Test.Compiler + +module DebuggerTestHelpers = + + let verifyMethodDebugPoints source methodName expectedSequencePoints = + FSharp source + |> asLibrary + |> withPortablePdb + |> compile + |> shouldSucceed + |> verifyPdb [ VerifyMethodSequencePoints(methodName, expectedSequencePoints) ] + + let verifyAllSequencePoints source expectedSequencePoints = + FSharp source + |> asLibrary + |> withPortablePdb + |> compile + |> shouldSucceed + |> verifyPdb [ VerifySequencePoints expectedSequencePoints ] + + let verifyMethodDebugPointsInRange source methodName startLine endLine = + FSharp source + |> asLibrary + |> withPortablePdb + |> compile + |> shouldSucceed + |> verifyPdb [ VerifyMethodSequencePointsInRange(methodName, startLine, endLine) ] diff --git a/tests/FSharp.Compiler.ComponentTests/Debugger/ForArrowDebugPoints.fs b/tests/FSharp.Compiler.ComponentTests/Debugger/ForArrowDebugPoints.fs new file mode 100644 index 00000000000..de5501070c7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Debugger/ForArrowDebugPoints.fs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Debugger + +open Xunit +open FSharp.Test.Compiler +open Debugger.DebuggerTestHelpers + +/// https://github.com/dotnet/fsharp/issues/13504 +module ForArrowDebugPoints = + + [] + let ``For-arrow list comprehension body has debug point`` () = + verifyAllSequencePoints """ +module TestModule + +let squares = [ + for x in [1; 2; 3] -> + x * x + ] + """ [ + (Line 4, Col 1, Line 7, Col 6) + (Line 5, Col 5, Line 5, Col 8) + (Line 5, Col 11, Line 5, Col 13) + (Line 6, Col 9, Line 6, Col 14) + (Line 16707566, Col 0, Line 16707566, Col 0) + ] + + [] + let ``For-arrow array comprehension body has debug point`` () = + verifyAllSequencePoints """ +module TestModule + +let squares = [| + for x in [|1; 2; 3|] -> + x * x + |] + """ [ + (Line 4, Col 1, Line 7, Col 7) + (Line 5, Col 5, Line 5, Col 8) + (Line 5, Col 11, Line 5, Col 13) + (Line 6, Col 9, Line 6, Col 14) + (Line 16707566, Col 0, Line 16707566, Col 0) + ] + + [] + let ``For-do-yield comprehension body has debug point`` () = + verifyAllSequencePoints """ +module TestModule + +let squares = [ + for x in [1; 2; 3] do + yield x * x + ] + """ [ + (Line 4, Col 1, Line 7, Col 6) + (Line 5, Col 5, Line 5, Col 8) + (Line 5, Col 11, Line 5, Col 13) + (Line 6, Col 15, Line 6, Col 20) + (Line 16707566, Col 0, Line 16707566, Col 0) + ] diff --git a/tests/FSharp.Compiler.ComponentTests/Debugger/MatchEndSequencePoint.fs b/tests/FSharp.Compiler.ComponentTests/Debugger/MatchEndSequencePoint.fs new file mode 100644 index 00000000000..4ef0d5bb48b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Debugger/MatchEndSequencePoint.fs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Debugger + +open Xunit +open FSharp.Test.Compiler +open Debugger.DebuggerTestHelpers + +/// https://github.com/dotnet/fsharp/issues/12052 +module MatchEndSequencePoint = + + [] + let ``Match expression does not produce extra sequence point at end`` () = + verifyMethodDebugPoints + " +module TestModule + +let funcA (x: int) = + let result = + match x with + | 1 -> \"one\" + | 2 -> \"two\" + | _ -> \"other\" + System.Console.WriteLine(result) + " + "funcA" + [ (Line 10, Col 5, Line 10, Col 37) + (Line 6, Col 9, Line 6, Col 21) + (Line 7, Col 16, Line 7, Col 21) + (Line 8, Col 16, Line 8, Col 21) + (Line 9, Col 16, Line 9, Col 23) ] + + [] + let ``Match in statement position does not produce extra sequence point`` () = + verifyMethodDebugPoints + " +module TestModule2 + +let funcB (x: int) = + match x with + | 1 -> System.Console.WriteLine(\"one\") + | 2 -> System.Console.WriteLine(\"two\") + | _ -> System.Console.WriteLine(\"other\") + System.Console.WriteLine(\"done\") + " + "funcB" + [ (Line 5, Col 5, Line 5, Col 17) + (Line 6, Col 12, Line 6, Col 43) + (Line 7, Col 12, Line 7, Col 43) + (Line 8, Col 12, Line 8, Col 45) + (Line 9, Col 5, Line 9, Col 37) ] + + [] + let ``Match with when guards has sequence points for all branches`` () = + verifyMethodDebugPoints + " +module TestModule3 + +let classify (x: int) (y: string) = + match x with + | n when n < 0 -> \"negative\" + | 0 -> \"zero\" + | n when n > 100 && y.Length > 0 -> \"big with text\" + | n when n > 100 -> \"big\" + | n when n > 50 -> \"medium\" + | _ -> \"small\" + " + "classify" + [ (Line 5, Col 5, Line 5, Col 17) + (Line 6, Col 14, Line 6, Col 19) + (Line 8, Col 14, Line 8, Col 21) + (Line 8, Col 25, Line 8, Col 37) + (Line 9, Col 14, Line 9, Col 21) + (Line 10, Col 14, Line 10, Col 20) + (Line 6, Col 23, Line 6, Col 33) + (Line 7, Col 12, Line 7, Col 18) + (Line 8, Col 41, Line 8, Col 56) + (Line 9, Col 25, Line 9, Col 30) + (Line 10, Col 24, Line 10, Col 32) + (Line 11, Col 12, Line 11, Col 19) ] + + [] + let ``Match with when guards followed by code has no sequence point bleed`` () = + verifyMethodDebugPoints + " +module TestModule4 + +let processAndLog (x: int) = + let label = + match x with + | n when n < 0 -> \"negative\" + | n when n > 0 -> \"positive\" + | _ -> \"zero\" + System.Console.WriteLine(label) + " + "processAndLog" + [ (Line 10, Col 5, Line 10, Col 36) + (Line 6, Col 9, Line 6, Col 21) + (Line 7, Col 18, Line 7, Col 23) + (Line 8, Col 18, Line 8, Col 23) + (Line 7, Col 27, Line 7, Col 37) + (Line 8, Col 27, Line 8, Col 37) + (Line 9, Col 16, Line 9, Col 22) ] + + /// https://github.com/dotnet/fsharp/issues/12052#issuecomment-974695340 + [] + let ``If-then-else does not produce extra sequence point at end`` () = + verifyMethodDebugPoints + " +module TestModuleIf + +let funcC (x: int) = + let result = + if x > 0 then \"positive\" + elif x = 0 then \"zero\" + else \"negative\" + System.Console.WriteLine(result) + " + "funcC" + [ (Line 9, Col 5, Line 9, Col 37) + (Line 6, Col 9, Line 6, Col 22) + (Line 6, Col 23, Line 6, Col 33) + (Line 7, Col 9, Line 7, Col 24) + (Line 7, Col 25, Line 7, Col 31) + (Line 8, Col 14, Line 8, Col 24) ] + + [] + let ``If-then-else in statement position does not produce extra sequence point`` () = + verifyMethodDebugPoints + " +module TestModuleIfStmt + +let funcD (x: int) = + if x > 0 then + System.Console.WriteLine(\"positive\") + else + System.Console.WriteLine(\"non-positive\") + System.Console.WriteLine(\"done\") + " + "funcD" + [ (Line 5, Col 5, Line 5, Col 18) + (Line 6, Col 9, Line 6, Col 45) + (Line 8, Col 9, Line 8, Col 49) + (Line 9, Col 5, Line 9, Col 37) ] + + [] + let ``Complex match with nested when guards has all sequence points within method range`` () = + verifyMethodDebugPointsInRange + " +module TestModule5 + +type Cmd = Start of int | Stop | Pause of string | Resume + +let dispatch (cmd: Cmd) (active: bool) (count: int) = + match cmd with + | Start n when n > 0 && active -> + let msg = sprintf \"Starting %d\" n + msg + | Start n when n > 0 -> + \"start-inactive\" + | Start _ -> + \"start-invalid\" + | Stop when active && count > 0 -> + let status = sprintf \"Stopping after %d\" count + status + | Stop -> + \"stop-noop\" + | Pause reason when active && reason.Length > 0 -> + sprintf \"Pausing: %s\" reason + | Pause _ when active -> + \"pause-no-reason\" + | Pause _ -> + \"pause-ignored\" + | Resume when not active -> + \"resuming\" + | Resume -> + \"already-active\" + " + "dispatch" + (Line 6) + (Line 29) 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 29d94148d27..fc915de9f0e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -1557,7 +1547,7 @@ IL_001b: ldc.i4.0 IL_001c: conv.i8 IL_001d: nop - IL_001e: br.s IL_0045 + IL_001e: br.s IL_0047 IL_0020: ldc.i4.s 10 IL_0022: ldc.i4.1 @@ -1569,7 +1559,7 @@ IL_0028: conv.i8 IL_0029: add IL_002a: nop - IL_002b: br.s IL_0045 + IL_002b: br.s IL_0047 IL_002d: ldc.i4.1 IL_002e: ldc.i4.s 10 @@ -1578,7 +1568,7 @@ IL_0032: ldc.i4.0 IL_0033: conv.i8 IL_0034: nop - IL_0035: br.s IL_0045 + IL_0035: br.s IL_0047 IL_0037: ldc.i4.1 IL_0038: ldc.i4.s 10 @@ -1593,48 +1583,50 @@ IL_0042: conv.i8 IL_0043: add IL_0044: nop - IL_0045: stloc.0 - IL_0046: ldloc.0 - IL_0047: stloc.1 - IL_0048: ldloc.1 - 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_0045: br.s IL_0047 + + IL_0047: stloc.0 + IL_0048: ldloc.0 + IL_0049: stloc.1 + IL_004a: ldloc.1 + IL_004b: brtrue.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_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 + IL_007c: ldloc.2 + IL_007d: ret } .method public static int32[] f14(int32 finish) cil managed @@ -1747,7 +1739,7 @@ IL_001b: ldc.i4.0 IL_001c: conv.i8 IL_001d: nop - IL_001e: br.s IL_0045 + IL_001e: br.s IL_0047 IL_0020: ldc.i4.s 10 IL_0022: ldarg.0 @@ -1759,7 +1751,7 @@ IL_0028: conv.i8 IL_0029: add IL_002a: nop - IL_002b: br.s IL_0045 + IL_002b: br.s IL_0047 IL_002d: ldarg.0 IL_002e: ldc.i4.s 10 @@ -1768,7 +1760,7 @@ IL_0032: ldc.i4.0 IL_0033: conv.i8 IL_0034: nop - IL_0035: br.s IL_0045 + IL_0035: br.s IL_0047 IL_0037: ldarg.0 IL_0038: ldc.i4.s 10 @@ -1783,48 +1775,50 @@ IL_0042: conv.i8 IL_0043: add IL_0044: nop - IL_0045: stloc.0 - IL_0046: ldloc.0 - IL_0047: stloc.1 - IL_0048: ldloc.1 - 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_0045: br.s IL_0047 + + IL_0047: stloc.0 + IL_0048: ldloc.0 + IL_0049: stloc.1 + IL_004a: ldloc.1 + IL_004b: brtrue.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_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 + IL_007c: ldloc.2 + IL_007d: ret } .method public static int32[] f16(int32 start, @@ -1939,7 +1933,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.1 IL_001f: ldc.i4.1 @@ -1951,7 +1945,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldc.i4.1 IL_002b: ldarg.1 @@ -1960,7 +1954,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldc.i4.1 IL_0034: ldarg.1 @@ -1975,48 +1969,50 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldloc.0 - IL_0042: stloc.1 - IL_0043: ldloc.1 - 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 + IL_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldloc.0 + IL_0044: stloc.1 + IL_0045: ldloc.1 + IL_0046: brtrue.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 } .method public static int32[] f18(int32 start, @@ -2059,7 +2055,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -2071,7 +2067,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldarg.0 IL_002b: ldarg.2 @@ -2080,7 +2076,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldarg.0 IL_0034: ldarg.2 @@ -2095,48 +2091,50 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldloc.0 - IL_0042: stloc.1 - IL_0043: ldloc.1 - 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 + IL_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldloc.0 + IL_0044: stloc.1 + IL_0045: ldloc.1 + IL_0046: brtrue.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 } .method public static int32[] f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2490,7 +2488,7 @@ IL_0022: ldc.i4.0 IL_0023: conv.i8 IL_0024: nop - IL_0025: br.s IL_004c + IL_0025: br.s IL_004e IL_0027: ldc.i4.s 10 IL_0029: ldc.i4.1 @@ -2502,7 +2500,7 @@ IL_002f: conv.i8 IL_0030: add IL_0031: nop - IL_0032: br.s IL_004c + IL_0032: br.s IL_004e IL_0034: ldc.i4.1 IL_0035: ldc.i4.s 10 @@ -2511,7 +2509,7 @@ IL_0039: ldc.i4.0 IL_003a: conv.i8 IL_003b: nop - IL_003c: br.s IL_004c + IL_003c: br.s IL_004e IL_003e: ldc.i4.1 IL_003f: ldc.i4.s 10 @@ -2526,48 +2524,50 @@ IL_0049: conv.i8 IL_004a: add IL_004b: nop - IL_004c: stloc.1 - IL_004d: ldloc.1 - IL_004e: stloc.2 - IL_004f: ldloc.2 - 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 + IL_004c: br.s IL_004e + + IL_004e: stloc.1 + IL_004f: ldloc.1 + IL_0050: stloc.2 + IL_0051: ldloc.2 + IL_0052: brtrue.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 } .method public static int32[] f24(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2700,7 +2700,7 @@ IL_0030: ldc.i4.0 IL_0031: conv.i8 IL_0032: nop - IL_0033: br.s IL_0057 + IL_0033: br.s IL_0059 IL_0035: ldloc.2 IL_0036: ldloc.0 @@ -2712,7 +2712,7 @@ IL_003c: conv.i8 IL_003d: add IL_003e: nop - IL_003f: br.s IL_0057 + IL_003f: br.s IL_0059 IL_0041: ldloc.0 IL_0042: ldloc.2 @@ -2721,7 +2721,7 @@ IL_0045: ldc.i4.0 IL_0046: conv.i8 IL_0047: nop - IL_0048: br.s IL_0057 + IL_0048: br.s IL_0059 IL_004a: ldloc.0 IL_004b: ldloc.2 @@ -2736,48 +2736,50 @@ IL_0054: conv.i8 IL_0055: add IL_0056: nop - IL_0057: stloc.3 - IL_0058: ldloc.3 - IL_0059: stloc.s V_4 - IL_005b: ldloc.s V_4 - 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 + IL_0057: br.s IL_0059 + + IL_0059: stloc.3 + IL_005a: ldloc.3 + IL_005b: stloc.s V_4 + IL_005d: ldloc.s V_4 + IL_005f: brtrue.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 } .method public static class [runtime]System.Tuple`2[] @@ -2821,7 +2823,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -2833,7 +2835,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldarg.0 IL_002b: ldarg.2 @@ -2842,7 +2844,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldarg.0 IL_0034: ldarg.2 @@ -2857,52 +2859,54 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldloc.0 - IL_0042: stloc.1 - IL_0043: ldloc.1 - 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_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldloc.0 + IL_0044: stloc.1 + IL_0045: ldloc.1 + IL_0046: brtrue.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_0065: ldloc.s V_5 - IL_0067: conv.r8 - IL_0068: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + IL_0067: ldloc.s V_5 + IL_0069: conv.r8 + IL_006a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, !1) - 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 + 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 } .method public static valuetype [runtime]System.ValueTuple`2[] @@ -2946,7 +2950,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -2958,7 +2962,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldarg.0 IL_002b: ldarg.2 @@ -2967,7 +2971,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldarg.0 IL_0034: ldarg.2 @@ -2982,52 +2986,54 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldloc.0 - IL_0042: stloc.1 - IL_0043: ldloc.1 - 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_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldloc.0 + IL_0044: stloc.1 + IL_0045: ldloc.1 + IL_0046: brtrue.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_0065: ldloc.s V_5 - IL_0067: conv.r8 - IL_0068: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, + IL_0067: ldloc.s V_5 + IL_0069: conv.r8 + IL_006a: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, !1) - 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 + 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 } .method public static int32[] f28(int32 start, @@ -3070,7 +3076,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -3082,7 +3088,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldarg.0 IL_002b: ldarg.2 @@ -3091,7 +3097,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldarg.0 IL_0034: ldarg.2 @@ -3106,51 +3112,53 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldloc.0 - IL_0042: stloc.1 - IL_0043: ldloc.1 - 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_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_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldloc.0 + IL_0044: stloc.1 + IL_0045: ldloc.1 + IL_0046: brtrue.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: 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 + 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_007b: ldloc.2 + IL_007c: ret } .method public static int32[] f29(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -3820,4 +3828,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl index 1fb59872872..f2166a85d28 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -1435,7 +1425,7 @@ IL_001b: ldc.i4.0 IL_001c: conv.i8 IL_001d: nop - IL_001e: br.s IL_0045 + IL_001e: br.s IL_0047 IL_0020: ldc.i4.s 10 IL_0022: ldc.i4.1 @@ -1447,7 +1437,7 @@ IL_0028: conv.i8 IL_0029: add IL_002a: nop - IL_002b: br.s IL_0045 + IL_002b: br.s IL_0047 IL_002d: ldc.i4.1 IL_002e: ldc.i4.s 10 @@ -1456,7 +1446,7 @@ IL_0032: ldc.i4.0 IL_0033: conv.i8 IL_0034: nop - IL_0035: br.s IL_0045 + IL_0035: br.s IL_0047 IL_0037: ldc.i4.1 IL_0038: ldc.i4.s 10 @@ -1471,36 +1461,38 @@ IL_0042: conv.i8 IL_0043: add IL_0044: nop - IL_0045: stloc.0 - IL_0046: ldc.i4.0 - IL_0047: conv.i8 - IL_0048: stloc.2 - IL_0049: ldc.i4.1 - IL_004a: stloc.3 - IL_004b: br.s IL_0063 - - IL_004d: ldloca.s V_1 - IL_004f: ldloc.3 - IL_0050: stloc.s V_4 - IL_0052: ldloc.s V_4 - IL_0054: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0059: nop - IL_005a: ldloc.3 - IL_005b: ldarg.0 - IL_005c: add - IL_005d: stloc.3 - IL_005e: ldloc.2 - IL_005f: ldc.i4.1 - IL_0060: conv.i8 - IL_0061: add - IL_0062: stloc.2 - IL_0063: ldloc.2 - IL_0064: ldloc.0 - IL_0065: blt.un.s IL_004d + IL_0045: br.s IL_0047 - IL_0067: ldloca.s V_1 - IL_0069: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_006e: ret + IL_0047: stloc.0 + IL_0048: ldc.i4.0 + IL_0049: conv.i8 + IL_004a: stloc.2 + IL_004b: ldc.i4.1 + IL_004c: stloc.3 + IL_004d: br.s IL_0065 + + IL_004f: ldloca.s V_1 + IL_0051: ldloc.3 + IL_0052: stloc.s V_4 + IL_0054: ldloc.s V_4 + IL_0056: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005b: nop + IL_005c: ldloc.3 + IL_005d: ldarg.0 + IL_005e: add + IL_005f: stloc.3 + IL_0060: ldloc.2 + IL_0061: ldc.i4.1 + IL_0062: conv.i8 + IL_0063: add + IL_0064: stloc.2 + IL_0065: ldloc.2 + IL_0066: ldloc.0 + IL_0067: blt.un.s IL_004f + + IL_0069: ldloca.s V_1 + IL_006b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0070: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f14(int32 finish) cil managed @@ -1598,7 +1590,7 @@ IL_001b: ldc.i4.0 IL_001c: conv.i8 IL_001d: nop - IL_001e: br.s IL_0045 + IL_001e: br.s IL_0047 IL_0020: ldc.i4.s 10 IL_0022: ldarg.0 @@ -1610,7 +1602,7 @@ IL_0028: conv.i8 IL_0029: add IL_002a: nop - IL_002b: br.s IL_0045 + IL_002b: br.s IL_0047 IL_002d: ldarg.0 IL_002e: ldc.i4.s 10 @@ -1619,7 +1611,7 @@ IL_0032: ldc.i4.0 IL_0033: conv.i8 IL_0034: nop - IL_0035: br.s IL_0045 + IL_0035: br.s IL_0047 IL_0037: ldarg.0 IL_0038: ldc.i4.s 10 @@ -1634,36 +1626,38 @@ IL_0042: conv.i8 IL_0043: add IL_0044: nop - IL_0045: stloc.0 - IL_0046: ldc.i4.0 - IL_0047: conv.i8 - IL_0048: stloc.2 - IL_0049: ldarg.0 - IL_004a: stloc.3 - IL_004b: br.s IL_0063 - - IL_004d: ldloca.s V_1 - IL_004f: ldloc.3 - IL_0050: stloc.s V_4 - IL_0052: ldloc.s V_4 - IL_0054: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0059: nop - IL_005a: ldloc.3 - IL_005b: ldarg.1 - IL_005c: add - IL_005d: stloc.3 - IL_005e: ldloc.2 - IL_005f: ldc.i4.1 - IL_0060: conv.i8 - IL_0061: add - IL_0062: stloc.2 - IL_0063: ldloc.2 - IL_0064: ldloc.0 - IL_0065: blt.un.s IL_004d + IL_0045: br.s IL_0047 - IL_0067: ldloca.s V_1 - IL_0069: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_006e: ret + IL_0047: stloc.0 + IL_0048: ldc.i4.0 + IL_0049: conv.i8 + IL_004a: stloc.2 + IL_004b: ldarg.0 + IL_004c: stloc.3 + IL_004d: br.s IL_0065 + + IL_004f: ldloca.s V_1 + IL_0051: ldloc.3 + IL_0052: stloc.s V_4 + IL_0054: ldloc.s V_4 + IL_0056: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005b: nop + IL_005c: ldloc.3 + IL_005d: ldarg.1 + IL_005e: add + IL_005f: stloc.3 + IL_0060: ldloc.2 + IL_0061: ldc.i4.1 + IL_0062: conv.i8 + IL_0063: add + IL_0064: stloc.2 + IL_0065: ldloc.2 + IL_0066: ldloc.0 + IL_0067: blt.un.s IL_004f + + IL_0069: ldloca.s V_1 + IL_006b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0070: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f16(int32 start, int32 finish) cil managed @@ -1762,7 +1756,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.1 IL_001f: ldc.i4.1 @@ -1774,7 +1768,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldc.i4.1 IL_002b: ldarg.1 @@ -1783,7 +1777,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldc.i4.1 IL_0034: ldarg.1 @@ -1798,36 +1792,38 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldc.i4.1 - IL_0045: stloc.3 - IL_0046: br.s IL_005e - - IL_0048: ldloca.s V_1 - IL_004a: ldloc.3 - IL_004b: stloc.s V_4 - IL_004d: ldloc.s V_4 - IL_004f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0054: nop - IL_0055: ldloc.3 - IL_0056: ldarg.0 - IL_0057: add - IL_0058: stloc.3 - IL_0059: ldloc.2 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: stloc.2 - IL_005e: ldloc.2 - IL_005f: ldloc.0 - IL_0060: blt.un.s IL_0048 - - IL_0062: ldloca.s V_1 - IL_0064: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0069: ret + IL_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldc.i4.1 + IL_0047: stloc.3 + IL_0048: br.s IL_0060 + + IL_004a: ldloca.s V_1 + IL_004c: ldloc.3 + IL_004d: stloc.s V_4 + IL_004f: ldloc.s V_4 + IL_0051: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0056: nop + IL_0057: ldloc.3 + IL_0058: ldarg.0 + IL_0059: add + IL_005a: stloc.3 + IL_005b: ldloc.2 + IL_005c: ldc.i4.1 + IL_005d: conv.i8 + IL_005e: add + IL_005f: stloc.2 + IL_0060: ldloc.2 + IL_0061: ldloc.0 + IL_0062: blt.un.s IL_004a + + IL_0064: ldloca.s V_1 + IL_0066: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1870,7 +1866,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -1882,7 +1878,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldarg.0 IL_002b: ldarg.2 @@ -1891,7 +1887,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldarg.0 IL_0034: ldarg.2 @@ -1906,36 +1902,38 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldarg.0 - IL_0045: stloc.3 - IL_0046: br.s IL_005e - - IL_0048: ldloca.s V_1 - IL_004a: ldloc.3 - IL_004b: stloc.s V_4 - IL_004d: ldloc.s V_4 - IL_004f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0054: nop - IL_0055: ldloc.3 - IL_0056: ldarg.1 - IL_0057: add - IL_0058: stloc.3 - IL_0059: ldloc.2 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: stloc.2 - IL_005e: ldloc.2 - IL_005f: ldloc.0 - IL_0060: blt.un.s IL_0048 - - IL_0062: ldloca.s V_1 - IL_0064: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0069: ret + IL_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.0 + IL_0047: stloc.3 + IL_0048: br.s IL_0060 + + IL_004a: ldloca.s V_1 + IL_004c: ldloc.3 + IL_004d: stloc.s V_4 + IL_004f: ldloc.s V_4 + IL_0051: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0056: nop + IL_0057: ldloc.3 + IL_0058: ldarg.1 + IL_0059: add + IL_005a: stloc.3 + IL_005b: ldloc.2 + IL_005c: ldc.i4.1 + IL_005d: conv.i8 + IL_005e: add + IL_005f: stloc.2 + IL_0060: ldloc.2 + IL_0061: ldloc.0 + IL_0062: blt.un.s IL_004a + + IL_0064: ldloca.s V_1 + IL_0066: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2235,7 +2233,7 @@ IL_0022: ldc.i4.0 IL_0023: conv.i8 IL_0024: nop - IL_0025: br.s IL_004c + IL_0025: br.s IL_004e IL_0027: ldc.i4.s 10 IL_0029: ldc.i4.1 @@ -2247,7 +2245,7 @@ IL_002f: conv.i8 IL_0030: add IL_0031: nop - IL_0032: br.s IL_004c + IL_0032: br.s IL_004e IL_0034: ldc.i4.1 IL_0035: ldc.i4.s 10 @@ -2256,7 +2254,7 @@ IL_0039: ldc.i4.0 IL_003a: conv.i8 IL_003b: nop - IL_003c: br.s IL_004c + IL_003c: br.s IL_004e IL_003e: ldc.i4.1 IL_003f: ldc.i4.s 10 @@ -2271,36 +2269,38 @@ IL_0049: conv.i8 IL_004a: add IL_004b: nop - IL_004c: stloc.1 - IL_004d: ldc.i4.0 - IL_004e: conv.i8 - IL_004f: stloc.3 - IL_0050: ldc.i4.1 - IL_0051: stloc.s V_4 - IL_0053: br.s IL_006e - - IL_0055: ldloca.s V_2 - IL_0057: ldloc.s V_4 - IL_0059: stloc.s V_5 - IL_005b: ldloc.s V_5 - IL_005d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0062: nop - IL_0063: ldloc.s V_4 - IL_0065: ldloc.0 - IL_0066: add - IL_0067: stloc.s V_4 - IL_0069: ldloc.3 - IL_006a: ldc.i4.1 - IL_006b: conv.i8 - IL_006c: add - IL_006d: stloc.3 - IL_006e: ldloc.3 - IL_006f: ldloc.1 - IL_0070: blt.un.s IL_0055 - - IL_0072: ldloca.s V_2 - IL_0074: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0079: ret + IL_004c: br.s IL_004e + + IL_004e: stloc.1 + IL_004f: ldc.i4.0 + IL_0050: conv.i8 + IL_0051: stloc.3 + IL_0052: ldc.i4.1 + IL_0053: stloc.s V_4 + IL_0055: br.s IL_0070 + + IL_0057: ldloca.s V_2 + IL_0059: ldloc.s V_4 + IL_005b: stloc.s V_5 + IL_005d: ldloc.s V_5 + IL_005f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0064: nop + IL_0065: ldloc.s V_4 + IL_0067: ldloc.0 + IL_0068: add + IL_0069: stloc.s V_4 + IL_006b: ldloc.3 + IL_006c: ldc.i4.1 + IL_006d: conv.i8 + IL_006e: add + IL_006f: stloc.3 + IL_0070: ldloc.3 + IL_0071: ldloc.1 + IL_0072: blt.un.s IL_0057 + + IL_0074: ldloca.s V_2 + IL_0076: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_007b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f24(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2420,7 +2420,7 @@ IL_0030: ldc.i4.0 IL_0031: conv.i8 IL_0032: nop - IL_0033: br.s IL_0057 + IL_0033: br.s IL_0059 IL_0035: ldloc.2 IL_0036: ldloc.0 @@ -2432,7 +2432,7 @@ IL_003c: conv.i8 IL_003d: add IL_003e: nop - IL_003f: br.s IL_0057 + IL_003f: br.s IL_0059 IL_0041: ldloc.0 IL_0042: ldloc.2 @@ -2441,7 +2441,7 @@ IL_0045: ldc.i4.0 IL_0046: conv.i8 IL_0047: nop - IL_0048: br.s IL_0057 + IL_0048: br.s IL_0059 IL_004a: ldloc.0 IL_004b: ldloc.2 @@ -2456,36 +2456,38 @@ IL_0054: conv.i8 IL_0055: add IL_0056: nop - IL_0057: stloc.3 - IL_0058: ldc.i4.0 - IL_0059: conv.i8 - IL_005a: stloc.s V_5 - IL_005c: ldloc.0 - IL_005d: stloc.s V_6 - IL_005f: br.s IL_007c - - IL_0061: ldloca.s V_4 - IL_0063: ldloc.s V_6 - IL_0065: stloc.s V_7 - IL_0067: ldloc.s V_7 - IL_0069: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_006e: nop - IL_006f: ldloc.s V_6 - IL_0071: ldloc.1 - IL_0072: add - IL_0073: stloc.s V_6 - IL_0075: ldloc.s V_5 - IL_0077: ldc.i4.1 - IL_0078: conv.i8 - IL_0079: add - IL_007a: stloc.s V_5 - IL_007c: ldloc.s V_5 - IL_007e: ldloc.3 - IL_007f: blt.un.s IL_0061 - - IL_0081: ldloca.s V_4 - IL_0083: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0088: ret + IL_0057: br.s IL_0059 + + IL_0059: stloc.3 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: stloc.s V_5 + IL_005e: ldloc.0 + IL_005f: stloc.s V_6 + IL_0061: br.s IL_007e + + IL_0063: ldloca.s V_4 + IL_0065: ldloc.s V_6 + IL_0067: stloc.s V_7 + IL_0069: ldloc.s V_7 + IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0070: nop + IL_0071: ldloc.s V_6 + IL_0073: ldloc.1 + IL_0074: add + IL_0075: stloc.s V_6 + IL_0077: ldloc.s V_5 + IL_0079: ldc.i4.1 + IL_007a: conv.i8 + IL_007b: add + IL_007c: stloc.s V_5 + IL_007e: ldloc.s V_5 + IL_0080: ldloc.3 + IL_0081: blt.un.s IL_0063 + + IL_0083: ldloca.s V_4 + IL_0085: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_008a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> @@ -2528,7 +2530,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -2540,7 +2542,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldarg.0 IL_002b: ldarg.2 @@ -2549,7 +2551,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldarg.0 IL_0034: ldarg.2 @@ -2564,40 +2566,42 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldarg.0 - IL_0045: stloc.3 - IL_0046: br.s IL_0066 - - IL_0048: ldloca.s V_1 - IL_004a: ldloc.3 - IL_004b: stloc.s V_4 - IL_004d: ldloc.s V_4 + IL_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.0 + IL_0047: stloc.3 + IL_0048: br.s IL_0068 + + IL_004a: ldloca.s V_1 + IL_004c: ldloc.3 + IL_004d: stloc.s V_4 IL_004f: ldloc.s V_4 - IL_0051: conv.r8 - IL_0052: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + IL_0051: ldloc.s V_4 + IL_0053: conv.r8 + IL_0054: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, !1) - IL_0057: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) - IL_005c: nop - IL_005d: ldloc.3 - IL_005e: ldarg.1 - IL_005f: add - IL_0060: stloc.3 - IL_0061: ldloc.2 - IL_0062: ldc.i4.1 - IL_0063: conv.i8 - IL_0064: add - IL_0065: stloc.2 - IL_0066: ldloc.2 - IL_0067: ldloc.0 - IL_0068: blt.un.s IL_0048 - - IL_006a: ldloca.s V_1 - IL_006c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() - IL_0071: ret + IL_0059: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) + IL_005e: nop + IL_005f: ldloc.3 + IL_0060: ldarg.1 + IL_0061: add + IL_0062: stloc.3 + IL_0063: ldloc.2 + IL_0064: ldc.i4.1 + IL_0065: conv.i8 + IL_0066: add + IL_0067: stloc.2 + IL_0068: ldloc.2 + IL_0069: ldloc.0 + IL_006a: blt.un.s IL_004a + + IL_006c: ldloca.s V_1 + IL_006e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() + IL_0073: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> @@ -2640,7 +2644,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -2652,7 +2656,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldarg.0 IL_002b: ldarg.2 @@ -2661,7 +2665,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldarg.0 IL_0034: ldarg.2 @@ -2676,40 +2680,42 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldarg.0 - IL_0045: stloc.3 - IL_0046: br.s IL_0066 - - IL_0048: ldloca.s V_1 - IL_004a: ldloc.3 - IL_004b: stloc.s V_4 - IL_004d: ldloc.s V_4 + IL_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.0 + IL_0047: stloc.3 + IL_0048: br.s IL_0068 + + IL_004a: ldloca.s V_1 + IL_004c: ldloc.3 + IL_004d: stloc.s V_4 IL_004f: ldloc.s V_4 - IL_0051: conv.r8 - IL_0052: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, + IL_0051: ldloc.s V_4 + IL_0053: conv.r8 + IL_0054: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, !1) - IL_0057: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) - IL_005c: nop - IL_005d: ldloc.3 - IL_005e: ldarg.1 - IL_005f: add - IL_0060: stloc.3 - IL_0061: ldloc.2 - IL_0062: ldc.i4.1 - IL_0063: conv.i8 - IL_0064: add - IL_0065: stloc.2 - IL_0066: ldloc.2 - IL_0067: ldloc.0 - IL_0068: blt.un.s IL_0048 - - IL_006a: ldloca.s V_1 - IL_006c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() - IL_0071: ret + IL_0059: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) + IL_005e: nop + IL_005f: ldloc.3 + IL_0060: ldarg.1 + IL_0061: add + IL_0062: stloc.3 + IL_0063: ldloc.2 + IL_0064: ldc.i4.1 + IL_0065: conv.i8 + IL_0066: add + IL_0067: stloc.2 + IL_0068: ldloc.2 + IL_0069: ldloc.0 + IL_006a: blt.un.s IL_004a + + IL_006c: ldloca.s V_1 + IL_006e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() + IL_0073: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -2752,7 +2758,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -2764,7 +2770,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldarg.0 IL_002b: ldarg.2 @@ -2773,7 +2779,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldarg.0 IL_0034: ldarg.2 @@ -2788,39 +2794,41 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldarg.0 - IL_0045: stloc.3 - IL_0046: br.s IL_0062 - - IL_0048: ldloca.s V_1 - IL_004a: ldloc.3 - IL_004b: stloc.s V_4 - IL_004d: nop - IL_004e: ldloc.s V_4 + IL_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.0 + IL_0047: stloc.3 + IL_0048: br.s IL_0064 + + IL_004a: ldloca.s V_1 + IL_004c: ldloc.3 + IL_004d: stloc.s V_4 + IL_004f: nop IL_0050: ldloc.s V_4 - IL_0052: mul - IL_0053: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0058: nop - IL_0059: ldloc.3 - IL_005a: ldarg.1 - IL_005b: add - IL_005c: stloc.3 - IL_005d: ldloc.2 - IL_005e: ldc.i4.1 - IL_005f: conv.i8 - IL_0060: add - IL_0061: stloc.2 - IL_0062: ldloc.2 - IL_0063: ldloc.0 - IL_0064: blt.un.s IL_0048 - - IL_0066: ldloca.s V_1 - IL_0068: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_006d: ret + IL_0052: ldloc.s V_4 + IL_0054: mul + IL_0055: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005a: nop + IL_005b: ldloc.3 + IL_005c: ldarg.1 + IL_005d: add + IL_005e: stloc.3 + IL_005f: ldloc.2 + IL_0060: ldc.i4.1 + IL_0061: conv.i8 + IL_0062: add + IL_0063: stloc.2 + IL_0064: ldloc.2 + IL_0065: ldloc.0 + IL_0066: blt.un.s IL_004a + + IL_0068: ldloca.s V_1 + IL_006a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f29(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed @@ -3395,4 +3403,3 @@ - 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 4422a6a829f..296b02ebf58 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -590,7 +580,7 @@ IL_001b: ldc.i4.0 IL_001c: conv.i8 IL_001d: nop - IL_001e: br.s IL_0045 + IL_001e: br.s IL_0047 IL_0020: ldc.i4.s 10 IL_0022: ldc.i4.1 @@ -602,7 +592,7 @@ IL_0028: conv.i8 IL_0029: add IL_002a: nop - IL_002b: br.s IL_0045 + IL_002b: br.s IL_0047 IL_002d: ldc.i4.1 IL_002e: ldc.i4.s 10 @@ -611,7 +601,7 @@ IL_0032: ldc.i4.0 IL_0033: conv.i8 IL_0034: nop - IL_0035: br.s IL_0045 + IL_0035: br.s IL_0047 IL_0037: ldc.i4.1 IL_0038: ldc.i4.s 10 @@ -626,46 +616,48 @@ IL_0042: conv.i8 IL_0043: add IL_0044: nop - IL_0045: stloc.0 - IL_0046: ldloc.0 - IL_0047: stloc.1 - IL_0048: ldloc.1 - IL_0049: brtrue.s IL_0051 + IL_0045: br.s IL_0047 - IL_004b: call !!0[] [runtime]System.Array::Empty() - IL_0050: ret + IL_0047: stloc.0 + IL_0048: ldloc.0 + IL_0049: stloc.1 + IL_004a: ldloc.1 + IL_004b: brtrue.s IL_0053 - 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 + 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 } .method public static int32[] f14(int32 finish) cil managed @@ -774,7 +766,7 @@ IL_001b: ldc.i4.0 IL_001c: conv.i8 IL_001d: nop - IL_001e: br.s IL_0045 + IL_001e: br.s IL_0047 IL_0020: ldc.i4.s 10 IL_0022: ldarg.0 @@ -786,7 +778,7 @@ IL_0028: conv.i8 IL_0029: add IL_002a: nop - IL_002b: br.s IL_0045 + IL_002b: br.s IL_0047 IL_002d: ldarg.0 IL_002e: ldc.i4.s 10 @@ -795,7 +787,7 @@ IL_0032: ldc.i4.0 IL_0033: conv.i8 IL_0034: nop - IL_0035: br.s IL_0045 + IL_0035: br.s IL_0047 IL_0037: ldarg.0 IL_0038: ldc.i4.s 10 @@ -810,46 +802,48 @@ IL_0042: conv.i8 IL_0043: add IL_0044: nop - IL_0045: stloc.0 - IL_0046: ldloc.0 - IL_0047: stloc.1 - IL_0048: ldloc.1 - IL_0049: brtrue.s IL_0051 + IL_0045: br.s IL_0047 - IL_004b: call !!0[] [runtime]System.Array::Empty() - IL_0050: ret + IL_0047: stloc.0 + IL_0048: ldloc.0 + IL_0049: stloc.1 + IL_004a: ldloc.1 + IL_004b: brtrue.s IL_0053 - 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 + 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 } .method public static int32[] f16(int32 start, @@ -960,7 +954,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.1 IL_001f: ldc.i4.1 @@ -972,7 +966,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldc.i4.1 IL_002b: ldarg.1 @@ -981,7 +975,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldc.i4.1 IL_0034: ldarg.1 @@ -996,46 +990,48 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldloc.0 - IL_0042: stloc.1 - IL_0043: ldloc.1 - IL_0044: brtrue.s IL_004c + IL_0040: br.s IL_0042 - IL_0046: call !!0[] [runtime]System.Array::Empty() - IL_004b: ret + IL_0042: stloc.0 + IL_0043: ldloc.0 + IL_0044: stloc.1 + IL_0045: ldloc.1 + IL_0046: brtrue.s IL_004e - 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 + 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 } .method public static int32[] f18(int32 start, @@ -1077,7 +1073,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -1089,7 +1085,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldarg.0 IL_002b: ldarg.2 @@ -1098,7 +1094,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldarg.0 IL_0034: ldarg.2 @@ -1113,46 +1109,48 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldloc.0 - IL_0042: stloc.1 - IL_0043: ldloc.1 - IL_0044: brtrue.s IL_004c + IL_0040: br.s IL_0042 - IL_0046: call !!0[] [runtime]System.Array::Empty() - IL_004b: ret + IL_0042: stloc.0 + IL_0043: ldloc.0 + IL_0044: stloc.1 + IL_0045: ldloc.1 + IL_0046: brtrue.s IL_004e - 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 + 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 } .method public static int32[] f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1493,7 +1491,7 @@ IL_0022: ldc.i4.0 IL_0023: conv.i8 IL_0024: nop - IL_0025: br.s IL_004c + IL_0025: br.s IL_004e IL_0027: ldc.i4.s 10 IL_0029: ldc.i4.1 @@ -1505,7 +1503,7 @@ IL_002f: conv.i8 IL_0030: add IL_0031: nop - IL_0032: br.s IL_004c + IL_0032: br.s IL_004e IL_0034: ldc.i4.1 IL_0035: ldc.i4.s 10 @@ -1514,7 +1512,7 @@ IL_0039: ldc.i4.0 IL_003a: conv.i8 IL_003b: nop - IL_003c: br.s IL_004c + IL_003c: br.s IL_004e IL_003e: ldc.i4.1 IL_003f: ldc.i4.s 10 @@ -1529,46 +1527,48 @@ IL_0049: conv.i8 IL_004a: add IL_004b: nop - IL_004c: stloc.1 - IL_004d: ldloc.1 - IL_004e: stloc.2 - IL_004f: ldloc.2 - 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 + IL_004c: br.s IL_004e + + IL_004e: stloc.1 + IL_004f: ldloc.1 + IL_0050: stloc.2 + IL_0051: ldloc.2 + IL_0052: brtrue.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 } .method public static int32[] f24(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1697,7 +1697,7 @@ IL_0030: ldc.i4.0 IL_0031: conv.i8 IL_0032: nop - IL_0033: br.s IL_0057 + IL_0033: br.s IL_0059 IL_0035: ldloc.2 IL_0036: ldloc.0 @@ -1709,7 +1709,7 @@ IL_003c: conv.i8 IL_003d: add IL_003e: nop - IL_003f: br.s IL_0057 + IL_003f: br.s IL_0059 IL_0041: ldloc.0 IL_0042: ldloc.2 @@ -1718,7 +1718,7 @@ IL_0045: ldc.i4.0 IL_0046: conv.i8 IL_0047: nop - IL_0048: br.s IL_0057 + IL_0048: br.s IL_0059 IL_004a: ldloc.0 IL_004b: ldloc.2 @@ -1733,46 +1733,48 @@ IL_0054: conv.i8 IL_0055: add IL_0056: nop - IL_0057: stloc.3 - IL_0058: ldloc.3 - IL_0059: stloc.s V_4 - IL_005b: ldloc.s V_4 - 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 + IL_0057: br.s IL_0059 + + IL_0059: stloc.3 + IL_005a: ldloc.3 + IL_005b: stloc.s V_4 + IL_005d: ldloc.s V_4 + IL_005f: brtrue.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 } } @@ -1794,4 +1796,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeLists.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeLists.fs.il.bsl index e92ceb62f4e..fdcf9dd08c4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeLists.fs.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -364,9 +354,7 @@ IL_0037: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f11(int32 start, - int32 finish) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f11(int32 start, int32 finish) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -513,7 +501,7 @@ IL_001b: ldc.i4.0 IL_001c: conv.i8 IL_001d: nop - IL_001e: br.s IL_0045 + IL_001e: br.s IL_0047 IL_0020: ldc.i4.s 10 IL_0022: ldc.i4.1 @@ -525,7 +513,7 @@ IL_0028: conv.i8 IL_0029: add IL_002a: nop - IL_002b: br.s IL_0045 + IL_002b: br.s IL_0047 IL_002d: ldc.i4.1 IL_002e: ldc.i4.s 10 @@ -534,7 +522,7 @@ IL_0032: ldc.i4.0 IL_0033: conv.i8 IL_0034: nop - IL_0035: br.s IL_0045 + IL_0035: br.s IL_0047 IL_0037: ldc.i4.1 IL_0038: ldc.i4.s 10 @@ -549,34 +537,36 @@ IL_0042: conv.i8 IL_0043: add IL_0044: nop - IL_0045: stloc.0 - IL_0046: ldc.i4.0 - IL_0047: conv.i8 - IL_0048: stloc.2 - IL_0049: ldc.i4.1 - IL_004a: stloc.3 - IL_004b: br.s IL_005f - - IL_004d: ldloca.s V_1 - IL_004f: ldloc.3 - IL_0050: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0055: nop - IL_0056: ldloc.3 - IL_0057: ldarg.0 - IL_0058: add - IL_0059: stloc.3 - IL_005a: ldloc.2 - IL_005b: ldc.i4.1 - IL_005c: conv.i8 - IL_005d: add - IL_005e: stloc.2 - IL_005f: ldloc.2 - IL_0060: ldloc.0 - IL_0061: blt.un.s IL_004d - - IL_0063: ldloca.s V_1 - IL_0065: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_006a: ret + IL_0045: br.s IL_0047 + + IL_0047: stloc.0 + IL_0048: ldc.i4.0 + IL_0049: conv.i8 + IL_004a: stloc.2 + IL_004b: ldc.i4.1 + IL_004c: stloc.3 + IL_004d: br.s IL_0061 + + IL_004f: ldloca.s V_1 + IL_0051: ldloc.3 + IL_0052: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0057: nop + IL_0058: ldloc.3 + IL_0059: ldarg.0 + IL_005a: add + IL_005b: stloc.3 + IL_005c: ldloc.2 + IL_005d: ldc.i4.1 + IL_005e: conv.i8 + IL_005f: add + IL_0060: stloc.2 + IL_0061: ldloc.2 + IL_0062: ldloc.0 + IL_0063: blt.un.s IL_004f + + IL_0065: ldloca.s V_1 + IL_0067: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006c: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f14(int32 finish) cil managed @@ -635,9 +625,7 @@ IL_0037: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f15(int32 start, - int32 step) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f15(int32 start, int32 step) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -672,7 +660,7 @@ IL_001b: ldc.i4.0 IL_001c: conv.i8 IL_001d: nop - IL_001e: br.s IL_0045 + IL_001e: br.s IL_0047 IL_0020: ldc.i4.s 10 IL_0022: ldarg.0 @@ -684,7 +672,7 @@ IL_0028: conv.i8 IL_0029: add IL_002a: nop - IL_002b: br.s IL_0045 + IL_002b: br.s IL_0047 IL_002d: ldarg.0 IL_002e: ldc.i4.s 10 @@ -693,7 +681,7 @@ IL_0032: ldc.i4.0 IL_0033: conv.i8 IL_0034: nop - IL_0035: br.s IL_0045 + IL_0035: br.s IL_0047 IL_0037: ldarg.0 IL_0038: ldc.i4.s 10 @@ -708,39 +696,39 @@ IL_0042: conv.i8 IL_0043: add IL_0044: nop - IL_0045: stloc.0 - IL_0046: ldc.i4.0 - IL_0047: conv.i8 - IL_0048: stloc.2 - IL_0049: ldarg.0 - IL_004a: stloc.3 - IL_004b: br.s IL_005f - - IL_004d: ldloca.s V_1 - IL_004f: ldloc.3 - IL_0050: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0055: nop - IL_0056: ldloc.3 - IL_0057: ldarg.1 - IL_0058: add - IL_0059: stloc.3 - IL_005a: ldloc.2 - IL_005b: ldc.i4.1 - IL_005c: conv.i8 - IL_005d: add - IL_005e: stloc.2 - IL_005f: ldloc.2 - IL_0060: ldloc.0 - IL_0061: blt.un.s IL_004d - - IL_0063: ldloca.s V_1 - IL_0065: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_006a: ret + IL_0045: br.s IL_0047 + + IL_0047: stloc.0 + IL_0048: ldc.i4.0 + IL_0049: conv.i8 + IL_004a: stloc.2 + IL_004b: ldarg.0 + IL_004c: stloc.3 + IL_004d: br.s IL_0061 + + IL_004f: ldloca.s V_1 + IL_0051: ldloc.3 + IL_0052: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0057: nop + IL_0058: ldloc.3 + IL_0059: ldarg.1 + IL_005a: add + IL_005b: stloc.3 + IL_005c: ldloc.2 + IL_005d: ldc.i4.1 + IL_005e: conv.i8 + IL_005f: add + IL_0060: stloc.2 + IL_0061: ldloc.2 + IL_0062: ldloc.0 + IL_0063: blt.un.s IL_004f + + IL_0065: ldloca.s V_1 + IL_0067: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006c: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f16(int32 start, - int32 finish) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f16(int32 start, int32 finish) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -797,9 +785,7 @@ IL_0037: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f17(int32 step, - int32 finish) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f17(int32 step, int32 finish) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -834,7 +820,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.1 IL_001f: ldc.i4.1 @@ -846,7 +832,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldc.i4.1 IL_002b: ldarg.1 @@ -855,7 +841,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldc.i4.1 IL_0034: ldarg.1 @@ -870,34 +856,36 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldc.i4.1 - IL_0045: stloc.3 - IL_0046: br.s IL_005a - - IL_0048: ldloca.s V_1 - IL_004a: ldloc.3 - IL_004b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0050: nop - IL_0051: ldloc.3 - IL_0052: ldarg.0 - IL_0053: add - IL_0054: stloc.3 - IL_0055: ldloc.2 - IL_0056: ldc.i4.1 - IL_0057: conv.i8 - IL_0058: add - IL_0059: stloc.2 - IL_005a: ldloc.2 - IL_005b: ldloc.0 - IL_005c: blt.un.s IL_0048 - - IL_005e: ldloca.s V_1 - IL_0060: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0065: ret + IL_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldc.i4.1 + IL_0047: stloc.3 + IL_0048: br.s IL_005c + + IL_004a: ldloca.s V_1 + IL_004c: ldloc.3 + IL_004d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0052: nop + IL_0053: ldloc.3 + IL_0054: ldarg.0 + IL_0055: add + IL_0056: stloc.3 + IL_0057: ldloc.2 + IL_0058: ldc.i4.1 + IL_0059: conv.i8 + IL_005a: add + IL_005b: stloc.2 + IL_005c: ldloc.2 + IL_005d: ldloc.0 + IL_005e: blt.un.s IL_004a + + IL_0060: ldloca.s V_1 + IL_0062: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0067: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -939,7 +927,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0040 + IL_001c: br.s IL_0042 IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -951,7 +939,7 @@ IL_0025: conv.i8 IL_0026: add IL_0027: nop - IL_0028: br.s IL_0040 + IL_0028: br.s IL_0042 IL_002a: ldarg.0 IL_002b: ldarg.2 @@ -960,7 +948,7 @@ IL_002e: ldc.i4.0 IL_002f: conv.i8 IL_0030: nop - IL_0031: br.s IL_0040 + IL_0031: br.s IL_0042 IL_0033: ldarg.0 IL_0034: ldarg.2 @@ -975,34 +963,36 @@ IL_003d: conv.i8 IL_003e: add IL_003f: nop - IL_0040: stloc.0 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldarg.0 - IL_0045: stloc.3 - IL_0046: br.s IL_005a - - IL_0048: ldloca.s V_1 - IL_004a: ldloc.3 - IL_004b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0050: nop - IL_0051: ldloc.3 - IL_0052: ldarg.1 - IL_0053: add - IL_0054: stloc.3 - IL_0055: ldloc.2 - IL_0056: ldc.i4.1 - IL_0057: conv.i8 - IL_0058: add - IL_0059: stloc.2 - IL_005a: ldloc.2 - IL_005b: ldloc.0 - IL_005c: blt.un.s IL_0048 - - IL_005e: ldloca.s V_1 - IL_0060: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0065: ret + IL_0040: br.s IL_0042 + + IL_0042: stloc.0 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.0 + IL_0047: stloc.3 + IL_0048: br.s IL_005c + + IL_004a: ldloca.s V_1 + IL_004c: ldloc.3 + IL_004d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0052: nop + IL_0053: ldloc.3 + IL_0054: ldarg.1 + IL_0055: add + IL_0056: stloc.3 + IL_0057: ldloc.2 + IL_0058: ldc.i4.1 + IL_0059: conv.i8 + IL_005a: add + IL_005b: stloc.2 + IL_005c: ldloc.2 + IL_005d: ldloc.0 + IL_005e: blt.un.s IL_004a + + IL_0060: ldloca.s V_1 + IL_0062: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0067: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1125,9 +1115,7 @@ IL_0042: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -1291,7 +1279,7 @@ IL_0022: ldc.i4.0 IL_0023: conv.i8 IL_0024: nop - IL_0025: br.s IL_004c + IL_0025: br.s IL_004e IL_0027: ldc.i4.s 10 IL_0029: ldc.i4.1 @@ -1303,7 +1291,7 @@ IL_002f: conv.i8 IL_0030: add IL_0031: nop - IL_0032: br.s IL_004c + IL_0032: br.s IL_004e IL_0034: ldc.i4.1 IL_0035: ldc.i4.s 10 @@ -1312,7 +1300,7 @@ IL_0039: ldc.i4.0 IL_003a: conv.i8 IL_003b: nop - IL_003c: br.s IL_004c + IL_003c: br.s IL_004e IL_003e: ldc.i4.1 IL_003f: ldc.i4.s 10 @@ -1327,34 +1315,36 @@ IL_0049: conv.i8 IL_004a: add IL_004b: nop - IL_004c: stloc.1 - IL_004d: ldc.i4.0 - IL_004e: conv.i8 - IL_004f: stloc.3 - IL_0050: ldc.i4.1 - IL_0051: stloc.s V_4 - IL_0053: br.s IL_006a - - IL_0055: ldloca.s V_2 - IL_0057: ldloc.s V_4 - IL_0059: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_005e: nop - IL_005f: ldloc.s V_4 - IL_0061: ldloc.0 - IL_0062: add - IL_0063: stloc.s V_4 - IL_0065: ldloc.3 - IL_0066: ldc.i4.1 - IL_0067: conv.i8 - IL_0068: add - IL_0069: stloc.3 - IL_006a: ldloc.3 - IL_006b: ldloc.1 - IL_006c: blt.un.s IL_0055 - - IL_006e: ldloca.s V_2 - IL_0070: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0075: ret + IL_004c: br.s IL_004e + + IL_004e: stloc.1 + IL_004f: ldc.i4.0 + IL_0050: conv.i8 + IL_0051: stloc.3 + IL_0052: ldc.i4.1 + IL_0053: stloc.s V_4 + IL_0055: br.s IL_006c + + IL_0057: ldloca.s V_2 + IL_0059: ldloc.s V_4 + IL_005b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0060: nop + IL_0061: ldloc.s V_4 + IL_0063: ldloc.0 + IL_0064: add + IL_0065: stloc.s V_4 + IL_0067: ldloc.3 + IL_0068: ldc.i4.1 + IL_0069: conv.i8 + IL_006a: add + IL_006b: stloc.3 + IL_006c: ldloc.3 + IL_006d: ldloc.1 + IL_006e: blt.un.s IL_0057 + + IL_0070: ldloca.s V_2 + IL_0072: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0077: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f24(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1470,7 +1460,7 @@ IL_0030: ldc.i4.0 IL_0031: conv.i8 IL_0032: nop - IL_0033: br.s IL_0057 + IL_0033: br.s IL_0059 IL_0035: ldloc.2 IL_0036: ldloc.0 @@ -1482,7 +1472,7 @@ IL_003c: conv.i8 IL_003d: add IL_003e: nop - IL_003f: br.s IL_0057 + IL_003f: br.s IL_0059 IL_0041: ldloc.0 IL_0042: ldloc.2 @@ -1491,7 +1481,7 @@ IL_0045: ldc.i4.0 IL_0046: conv.i8 IL_0047: nop - IL_0048: br.s IL_0057 + IL_0048: br.s IL_0059 IL_004a: ldloc.0 IL_004b: ldloc.2 @@ -1506,34 +1496,36 @@ IL_0054: conv.i8 IL_0055: add IL_0056: nop - IL_0057: stloc.3 - IL_0058: ldc.i4.0 - IL_0059: conv.i8 - IL_005a: stloc.s V_5 - IL_005c: ldloc.0 - IL_005d: stloc.s V_6 - IL_005f: br.s IL_0078 - - IL_0061: ldloca.s V_4 - IL_0063: ldloc.s V_6 - IL_0065: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_006a: nop - IL_006b: ldloc.s V_6 - IL_006d: ldloc.1 - IL_006e: add - IL_006f: stloc.s V_6 - IL_0071: ldloc.s V_5 - IL_0073: ldc.i4.1 - IL_0074: conv.i8 - IL_0075: add - IL_0076: stloc.s V_5 - IL_0078: ldloc.s V_5 - IL_007a: ldloc.3 - IL_007b: blt.un.s IL_0061 - - IL_007d: ldloca.s V_4 - IL_007f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0084: ret + IL_0057: br.s IL_0059 + + IL_0059: stloc.3 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: stloc.s V_5 + IL_005e: ldloc.0 + IL_005f: stloc.s V_6 + IL_0061: br.s IL_007a + + IL_0063: ldloca.s V_4 + IL_0065: ldloc.s V_6 + IL_0067: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_006c: nop + IL_006d: ldloc.s V_6 + IL_006f: ldloc.1 + IL_0070: add + IL_0071: stloc.s V_6 + IL_0073: ldloc.s V_5 + IL_0075: ldc.i4.1 + IL_0076: conv.i8 + IL_0077: add + IL_0078: stloc.s V_5 + IL_007a: ldloc.s V_5 + IL_007c: ldloc.3 + IL_007d: blt.un.s IL_0063 + + IL_007f: ldloca.s V_4 + IL_0081: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0086: ret } } @@ -1555,4 +1547,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index a1034a8ae8d..fed27da4f38 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -536,7 +526,7 @@ IL_0018: ldc.i4.0 IL_0019: nop - IL_001a: br.s IL_003b + IL_001a: br.s IL_003d IL_001c: ldarg.2 IL_001d: ldarg.2 @@ -547,7 +537,7 @@ IL_0022: ldc.i4.1 IL_0023: add IL_0024: nop - IL_0025: br.s IL_003b + IL_0025: br.s IL_003d IL_0027: ldarg.2 IL_0028: ldarg.2 @@ -555,7 +545,7 @@ IL_002b: ldc.i4.0 IL_002c: nop - IL_002d: br.s IL_003b + IL_002d: br.s IL_003d IL_002f: ldarg.2 IL_0030: ldarg.2 @@ -569,28 +559,30 @@ IL_0038: ldc.i4.1 IL_0039: add IL_003a: nop - IL_003b: stloc.0 - IL_003c: ldc.i4.0 - IL_003d: stloc.1 - IL_003e: ldarg.2 - IL_003f: stloc.2 - IL_0040: br.s IL_0050 - - IL_0042: ldloc.2 - IL_0043: call void assembly::set_c(int16) - IL_0048: ldloc.2 - IL_0049: ldarg.1 - IL_004a: add - IL_004b: stloc.2 - IL_004c: ldloc.1 - IL_004d: ldc.i4.1 - IL_004e: add - IL_004f: stloc.1 - IL_0050: ldloc.1 - IL_0051: ldloc.0 - IL_0052: blt.un.s IL_0042 - - IL_0054: ret + IL_003b: br.s IL_003d + + IL_003d: stloc.0 + IL_003e: ldc.i4.0 + IL_003f: stloc.1 + IL_0040: ldarg.2 + IL_0041: stloc.2 + IL_0042: br.s IL_0052 + + IL_0044: ldloc.2 + IL_0045: call void assembly::set_c(int16) + IL_004a: ldloc.2 + IL_004b: ldarg.1 + IL_004c: add + IL_004d: stloc.2 + IL_004e: ldloc.1 + IL_004f: ldc.i4.1 + IL_0050: add + IL_0051: stloc.1 + IL_0052: ldloc.1 + IL_0053: ldloc.0 + IL_0054: blt.un.s IL_0044 + + IL_0056: ret } .method public static void f11(int16 start, @@ -764,4 +756,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 84e3fcf2417..37caa26c0de 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -538,7 +528,7 @@ IL_0018: ldc.i4.0 IL_0019: nop - IL_001a: br.s IL_003b + IL_001a: br.s IL_003d IL_001c: ldarg.2 IL_001d: ldarg.2 @@ -549,7 +539,7 @@ IL_0022: ldc.i4.1 IL_0023: add IL_0024: nop - IL_0025: br.s IL_003b + IL_0025: br.s IL_003d IL_0027: ldarg.2 IL_0028: ldarg.2 @@ -557,7 +547,7 @@ IL_002b: ldc.i4.0 IL_002c: nop - IL_002d: br.s IL_003b + IL_002d: br.s IL_003d IL_002f: ldarg.2 IL_0030: ldarg.2 @@ -571,28 +561,30 @@ IL_0038: ldc.i4.1 IL_0039: add IL_003a: nop - IL_003b: stloc.0 - IL_003c: ldc.i4.0 - IL_003d: stloc.1 - IL_003e: ldarg.2 - IL_003f: stloc.2 - IL_0040: br.s IL_0050 - - IL_0042: ldloc.2 - IL_0043: call void assembly::set_c(int16) - IL_0048: ldloc.2 - IL_0049: ldarg.1 - IL_004a: add - IL_004b: stloc.2 - IL_004c: ldloc.1 - IL_004d: ldc.i4.1 - IL_004e: add - IL_004f: stloc.1 - IL_0050: ldloc.1 - IL_0051: ldloc.0 - IL_0052: blt.un.s IL_0042 - - IL_0054: ret + IL_003b: br.s IL_003d + + IL_003d: stloc.0 + IL_003e: ldc.i4.0 + IL_003f: stloc.1 + IL_0040: ldarg.2 + IL_0041: stloc.2 + IL_0042: br.s IL_0052 + + IL_0044: ldloc.2 + IL_0045: call void assembly::set_c(int16) + IL_004a: ldloc.2 + IL_004b: ldarg.1 + IL_004c: add + IL_004d: stloc.2 + IL_004e: ldloc.1 + IL_004f: ldc.i4.1 + IL_0050: add + IL_0051: stloc.1 + IL_0052: ldloc.1 + IL_0053: ldloc.0 + IL_0054: blt.un.s IL_0044 + + IL_0056: ret } .method public static void f11(int16 start, @@ -783,4 +775,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index cf72c332d47..d28dd61882a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -483,7 +473,7 @@ IL_0018: ldc.i4.0 IL_0019: conv.i8 IL_001a: nop - IL_001b: br.s IL_003f + IL_001b: br.s IL_0041 IL_001d: ldarg.2 IL_001e: ldarg.2 @@ -495,7 +485,7 @@ IL_0024: conv.i8 IL_0025: add IL_0026: nop - IL_0027: br.s IL_003f + IL_0027: br.s IL_0041 IL_0029: ldarg.2 IL_002a: ldarg.2 @@ -504,7 +494,7 @@ IL_002d: ldc.i4.0 IL_002e: conv.i8 IL_002f: nop - IL_0030: br.s IL_003f + IL_0030: br.s IL_0041 IL_0032: ldarg.2 IL_0033: ldarg.2 @@ -519,30 +509,32 @@ IL_003c: conv.i8 IL_003d: add IL_003e: nop - IL_003f: stloc.0 - IL_0040: ldc.i4.0 - IL_0041: conv.i8 - IL_0042: stloc.1 - IL_0043: ldarg.2 - IL_0044: stloc.2 - IL_0045: br.s IL_0056 - - IL_0047: ldloc.2 - IL_0048: call void assembly::set_c(int32) - IL_004d: ldloc.2 - IL_004e: ldarg.1 - IL_004f: add - IL_0050: stloc.2 - IL_0051: ldloc.1 - IL_0052: ldc.i4.1 - IL_0053: conv.i8 - IL_0054: add - IL_0055: stloc.1 - IL_0056: ldloc.1 - IL_0057: ldloc.0 - IL_0058: blt.un.s IL_0047 - - IL_005a: ret + IL_003f: br.s IL_0041 + + IL_0041: stloc.0 + IL_0042: ldc.i4.0 + IL_0043: conv.i8 + IL_0044: stloc.1 + IL_0045: ldarg.2 + IL_0046: stloc.2 + IL_0047: br.s IL_0058 + + IL_0049: ldloc.2 + IL_004a: call void assembly::set_c(int32) + IL_004f: ldloc.2 + IL_0050: ldarg.1 + IL_0051: add + IL_0052: stloc.2 + IL_0053: ldloc.1 + IL_0054: ldc.i4.1 + IL_0055: conv.i8 + IL_0056: add + IL_0057: stloc.1 + IL_0058: ldloc.1 + IL_0059: ldloc.0 + IL_005a: blt.un.s IL_0049 + + IL_005c: ret } .method public static void f11(int32 start, @@ -722,4 +714,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 22863756af9..eddda24dbd1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -485,7 +475,7 @@ IL_0018: ldc.i4.0 IL_0019: conv.i8 IL_001a: nop - IL_001b: br.s IL_003f + IL_001b: br.s IL_0041 IL_001d: ldarg.2 IL_001e: ldarg.2 @@ -497,7 +487,7 @@ IL_0024: conv.i8 IL_0025: add IL_0026: nop - IL_0027: br.s IL_003f + IL_0027: br.s IL_0041 IL_0029: ldarg.2 IL_002a: ldarg.2 @@ -506,7 +496,7 @@ IL_002d: ldc.i4.0 IL_002e: conv.i8 IL_002f: nop - IL_0030: br.s IL_003f + IL_0030: br.s IL_0041 IL_0032: ldarg.2 IL_0033: ldarg.2 @@ -521,30 +511,32 @@ IL_003c: conv.i8 IL_003d: add IL_003e: nop - IL_003f: stloc.0 - IL_0040: ldc.i4.0 - IL_0041: conv.i8 - IL_0042: stloc.1 - IL_0043: ldarg.2 - IL_0044: stloc.2 - IL_0045: br.s IL_0056 - - IL_0047: ldloc.2 - IL_0048: call void assembly::set_c(int32) - IL_004d: ldloc.2 - IL_004e: ldarg.1 - IL_004f: add - IL_0050: stloc.2 - IL_0051: ldloc.1 - IL_0052: ldc.i4.1 - IL_0053: conv.i8 - IL_0054: add - IL_0055: stloc.1 - IL_0056: ldloc.1 - IL_0057: ldloc.0 - IL_0058: blt.un.s IL_0047 - - IL_005a: ret + IL_003f: br.s IL_0041 + + IL_0041: stloc.0 + IL_0042: ldc.i4.0 + IL_0043: conv.i8 + IL_0044: stloc.1 + IL_0045: ldarg.2 + IL_0046: stloc.2 + IL_0047: br.s IL_0058 + + IL_0049: ldloc.2 + IL_004a: call void assembly::set_c(int32) + IL_004f: ldloc.2 + IL_0050: ldarg.1 + IL_0051: add + IL_0052: stloc.2 + IL_0053: ldloc.1 + IL_0054: ldc.i4.1 + IL_0055: conv.i8 + IL_0056: add + IL_0057: stloc.1 + IL_0058: ldloc.1 + IL_0059: ldloc.0 + IL_005a: blt.un.s IL_0049 + + IL_005c: ret } .method public static void f11(int32 start, @@ -741,4 +733,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 512ae6aca0d..cc9eea50183 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -657,7 +647,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0039 + IL_001c: br.s IL_003b IL_001e: ldarg.2 IL_001f: ldarg.2 @@ -665,7 +655,7 @@ IL_0021: ldarg.1 IL_0022: div.un IL_0023: nop - IL_0024: br.s IL_0039 + IL_0024: br.s IL_003b IL_0026: ldarg.2 IL_0027: ldarg.2 @@ -674,7 +664,7 @@ IL_002a: ldc.i4.0 IL_002b: conv.i8 IL_002c: nop - IL_002d: br.s IL_0039 + IL_002d: br.s IL_003b IL_002f: ldarg.2 IL_0030: ldarg.2 @@ -686,113 +676,117 @@ IL_0036: add IL_0037: div.un IL_0038: nop - IL_0039: stloc.0 - IL_003a: ldloc.0 - IL_003b: ldc.i4.m1 - IL_003c: conv.i8 - IL_003d: bne.un.s IL_0061 - - IL_003f: ldc.i4.1 - IL_0040: stloc.1 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldarg.2 - IL_0045: stloc.3 - IL_0046: br.s IL_005d - - IL_0048: ldloc.3 - IL_0049: call void assembly::set_c(int64) - IL_004e: ldloc.3 - IL_004f: ldarg.1 - IL_0050: add - IL_0051: stloc.3 - IL_0052: ldloc.2 - IL_0053: ldc.i4.1 - IL_0054: conv.i8 - IL_0055: add - IL_0056: stloc.2 - IL_0057: ldloc.2 - IL_0058: ldc.i4.0 - IL_0059: conv.i8 - IL_005a: cgt.un - IL_005c: stloc.1 - IL_005d: ldloc.1 - IL_005e: brtrue.s IL_0048 - - IL_0060: ret - - IL_0061: ldc.i4.0 - IL_0062: conv.i8 - IL_0063: ldarg.1 - IL_0064: bge.s IL_007a - - IL_0066: ldarg.2 - IL_0067: ldarg.2 - IL_0068: bge.s IL_006f - - IL_006a: ldc.i4.0 - IL_006b: conv.i8 - IL_006c: nop - IL_006d: br.s IL_0090 - - IL_006f: ldarg.2 - IL_0070: ldarg.2 - IL_0071: sub - IL_0072: ldarg.1 - IL_0073: div.un - IL_0074: ldc.i4.1 - IL_0075: conv.i8 - IL_0076: add.ovf.un - IL_0077: nop - IL_0078: br.s IL_0090 - - IL_007a: ldarg.2 - IL_007b: ldarg.2 - IL_007c: bge.s IL_0083 - - IL_007e: ldc.i4.0 - IL_007f: conv.i8 - IL_0080: nop - IL_0081: br.s IL_0090 - - IL_0083: ldarg.2 - IL_0084: ldarg.2 - IL_0085: sub - IL_0086: ldarg.1 - IL_0087: not - IL_0088: ldc.i4.1 - IL_0089: conv.i8 - IL_008a: add - IL_008b: div.un - IL_008c: ldc.i4.1 - IL_008d: conv.i8 - IL_008e: add.ovf.un - IL_008f: nop - IL_0090: stloc.2 - IL_0091: ldc.i4.0 - IL_0092: conv.i8 - IL_0093: stloc.s V_4 - IL_0095: ldarg.2 - IL_0096: stloc.3 - IL_0097: br.s IL_00aa - - IL_0099: ldloc.3 - IL_009a: call void assembly::set_c(int64) - IL_009f: ldloc.3 - IL_00a0: ldarg.1 - IL_00a1: add - IL_00a2: stloc.3 - IL_00a3: ldloc.s V_4 - IL_00a5: ldc.i4.1 - IL_00a6: conv.i8 - IL_00a7: add - IL_00a8: stloc.s V_4 - IL_00aa: ldloc.s V_4 - IL_00ac: ldloc.2 - IL_00ad: blt.un.s IL_0099 - - IL_00af: ret + IL_0039: br.s IL_003b + + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: ldc.i4.m1 + IL_003e: conv.i8 + IL_003f: bne.un.s IL_0063 + + IL_0041: ldc.i4.1 + IL_0042: stloc.1 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.2 + IL_0047: stloc.3 + IL_0048: br.s IL_005f + + IL_004a: ldloc.3 + IL_004b: call void assembly::set_c(int64) + IL_0050: ldloc.3 + IL_0051: ldarg.1 + IL_0052: add + IL_0053: stloc.3 + IL_0054: ldloc.2 + IL_0055: ldc.i4.1 + IL_0056: conv.i8 + IL_0057: add + IL_0058: stloc.2 + IL_0059: ldloc.2 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: cgt.un + IL_005e: stloc.1 + IL_005f: ldloc.1 + IL_0060: brtrue.s IL_004a + + IL_0062: ret + + IL_0063: ldc.i4.0 + IL_0064: conv.i8 + IL_0065: ldarg.1 + IL_0066: bge.s IL_007c + + IL_0068: ldarg.2 + IL_0069: ldarg.2 + IL_006a: bge.s IL_0071 + + IL_006c: ldc.i4.0 + IL_006d: conv.i8 + IL_006e: nop + IL_006f: br.s IL_0094 + + IL_0071: ldarg.2 + IL_0072: ldarg.2 + IL_0073: sub + IL_0074: ldarg.1 + IL_0075: div.un + IL_0076: ldc.i4.1 + IL_0077: conv.i8 + IL_0078: add.ovf.un + IL_0079: nop + IL_007a: br.s IL_0094 + + IL_007c: ldarg.2 + IL_007d: ldarg.2 + IL_007e: bge.s IL_0085 + + IL_0080: ldc.i4.0 + IL_0081: conv.i8 + IL_0082: nop + IL_0083: br.s IL_0094 + + IL_0085: ldarg.2 + IL_0086: ldarg.2 + IL_0087: sub + IL_0088: ldarg.1 + IL_0089: not + IL_008a: ldc.i4.1 + IL_008b: conv.i8 + IL_008c: add + IL_008d: div.un + IL_008e: ldc.i4.1 + IL_008f: conv.i8 + IL_0090: add.ovf.un + IL_0091: nop + IL_0092: br.s IL_0094 + + IL_0094: stloc.2 + IL_0095: ldc.i4.0 + IL_0096: conv.i8 + IL_0097: stloc.s V_4 + IL_0099: ldarg.2 + IL_009a: stloc.3 + IL_009b: br.s IL_00ae + + IL_009d: ldloc.3 + IL_009e: call void assembly::set_c(int64) + IL_00a3: ldloc.3 + IL_00a4: ldarg.1 + IL_00a5: add + IL_00a6: stloc.3 + IL_00a7: ldloc.s V_4 + IL_00a9: ldc.i4.1 + IL_00aa: conv.i8 + IL_00ab: add + IL_00ac: stloc.s V_4 + IL_00ae: ldloc.s V_4 + IL_00b0: ldloc.2 + IL_00b1: blt.un.s IL_009d + + IL_00b3: ret } .method public static void f11(int64 start, @@ -990,4 +984,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 75ca4baa45c..24f7390f116 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -659,7 +649,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0039 + IL_001c: br.s IL_003b IL_001e: ldarg.2 IL_001f: ldarg.2 @@ -667,7 +657,7 @@ IL_0021: ldarg.1 IL_0022: div.un IL_0023: nop - IL_0024: br.s IL_0039 + IL_0024: br.s IL_003b IL_0026: ldarg.2 IL_0027: ldarg.2 @@ -676,7 +666,7 @@ IL_002a: ldc.i4.0 IL_002b: conv.i8 IL_002c: nop - IL_002d: br.s IL_0039 + IL_002d: br.s IL_003b IL_002f: ldarg.2 IL_0030: ldarg.2 @@ -688,113 +678,117 @@ IL_0036: add IL_0037: div.un IL_0038: nop - IL_0039: stloc.0 - IL_003a: ldloc.0 - IL_003b: ldc.i4.m1 - IL_003c: conv.i8 - IL_003d: bne.un.s IL_0061 - - IL_003f: ldc.i4.1 - IL_0040: stloc.1 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldarg.2 - IL_0045: stloc.3 - IL_0046: br.s IL_005d - - IL_0048: ldloc.3 - IL_0049: call void assembly::set_c(int64) - IL_004e: ldloc.3 - IL_004f: ldarg.1 - IL_0050: add - IL_0051: stloc.3 - IL_0052: ldloc.2 - IL_0053: ldc.i4.1 - IL_0054: conv.i8 - IL_0055: add - IL_0056: stloc.2 - IL_0057: ldloc.2 - IL_0058: ldc.i4.0 - IL_0059: conv.i8 - IL_005a: cgt.un - IL_005c: stloc.1 - IL_005d: ldloc.1 - IL_005e: brtrue.s IL_0048 - - IL_0060: ret - - IL_0061: ldc.i4.0 - IL_0062: conv.i8 - IL_0063: ldarg.1 - IL_0064: bge.s IL_007a - - IL_0066: ldarg.2 - IL_0067: ldarg.2 - IL_0068: bge.s IL_006f - - IL_006a: ldc.i4.0 - IL_006b: conv.i8 - IL_006c: nop - IL_006d: br.s IL_0090 - - IL_006f: ldarg.2 - IL_0070: ldarg.2 - IL_0071: sub - IL_0072: ldarg.1 - IL_0073: div.un - IL_0074: ldc.i4.1 - IL_0075: conv.i8 - IL_0076: add.ovf.un - IL_0077: nop - IL_0078: br.s IL_0090 - - IL_007a: ldarg.2 - IL_007b: ldarg.2 - IL_007c: bge.s IL_0083 - - IL_007e: ldc.i4.0 - IL_007f: conv.i8 - IL_0080: nop - IL_0081: br.s IL_0090 - - IL_0083: ldarg.2 - IL_0084: ldarg.2 - IL_0085: sub - IL_0086: ldarg.1 - IL_0087: not - IL_0088: ldc.i4.1 - IL_0089: conv.i8 - IL_008a: add - IL_008b: div.un - IL_008c: ldc.i4.1 - IL_008d: conv.i8 - IL_008e: add.ovf.un - IL_008f: nop - IL_0090: stloc.2 - IL_0091: ldc.i4.0 - IL_0092: conv.i8 - IL_0093: stloc.s V_4 - IL_0095: ldarg.2 - IL_0096: stloc.3 - IL_0097: br.s IL_00aa - - IL_0099: ldloc.3 - IL_009a: call void assembly::set_c(int64) - IL_009f: ldloc.3 - IL_00a0: ldarg.1 - IL_00a1: add - IL_00a2: stloc.3 - IL_00a3: ldloc.s V_4 - IL_00a5: ldc.i4.1 - IL_00a6: conv.i8 - IL_00a7: add - IL_00a8: stloc.s V_4 - IL_00aa: ldloc.s V_4 - IL_00ac: ldloc.2 - IL_00ad: blt.un.s IL_0099 - - IL_00af: ret + IL_0039: br.s IL_003b + + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: ldc.i4.m1 + IL_003e: conv.i8 + IL_003f: bne.un.s IL_0063 + + IL_0041: ldc.i4.1 + IL_0042: stloc.1 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.2 + IL_0047: stloc.3 + IL_0048: br.s IL_005f + + IL_004a: ldloc.3 + IL_004b: call void assembly::set_c(int64) + IL_0050: ldloc.3 + IL_0051: ldarg.1 + IL_0052: add + IL_0053: stloc.3 + IL_0054: ldloc.2 + IL_0055: ldc.i4.1 + IL_0056: conv.i8 + IL_0057: add + IL_0058: stloc.2 + IL_0059: ldloc.2 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: cgt.un + IL_005e: stloc.1 + IL_005f: ldloc.1 + IL_0060: brtrue.s IL_004a + + IL_0062: ret + + IL_0063: ldc.i4.0 + IL_0064: conv.i8 + IL_0065: ldarg.1 + IL_0066: bge.s IL_007c + + IL_0068: ldarg.2 + IL_0069: ldarg.2 + IL_006a: bge.s IL_0071 + + IL_006c: ldc.i4.0 + IL_006d: conv.i8 + IL_006e: nop + IL_006f: br.s IL_0094 + + IL_0071: ldarg.2 + IL_0072: ldarg.2 + IL_0073: sub + IL_0074: ldarg.1 + IL_0075: div.un + IL_0076: ldc.i4.1 + IL_0077: conv.i8 + IL_0078: add.ovf.un + IL_0079: nop + IL_007a: br.s IL_0094 + + IL_007c: ldarg.2 + IL_007d: ldarg.2 + IL_007e: bge.s IL_0085 + + IL_0080: ldc.i4.0 + IL_0081: conv.i8 + IL_0082: nop + IL_0083: br.s IL_0094 + + IL_0085: ldarg.2 + IL_0086: ldarg.2 + IL_0087: sub + IL_0088: ldarg.1 + IL_0089: not + IL_008a: ldc.i4.1 + IL_008b: conv.i8 + IL_008c: add + IL_008d: div.un + IL_008e: ldc.i4.1 + IL_008f: conv.i8 + IL_0090: add.ovf.un + IL_0091: nop + IL_0092: br.s IL_0094 + + IL_0094: stloc.2 + IL_0095: ldc.i4.0 + IL_0096: conv.i8 + IL_0097: stloc.s V_4 + IL_0099: ldarg.2 + IL_009a: stloc.3 + IL_009b: br.s IL_00ae + + IL_009d: ldloc.3 + IL_009e: call void assembly::set_c(int64) + IL_00a3: ldloc.3 + IL_00a4: ldarg.1 + IL_00a5: add + IL_00a6: stloc.3 + IL_00a7: ldloc.s V_4 + IL_00a9: ldc.i4.1 + IL_00aa: conv.i8 + IL_00ab: add + IL_00ac: stloc.s V_4 + IL_00ae: ldloc.s V_4 + IL_00b0: ldloc.2 + IL_00b1: blt.un.s IL_009d + + IL_00b3: ret } .method public static void f11(int64 start, @@ -1009,4 +1003,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 12044470181..918cad5eb21 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -683,7 +673,7 @@ IL_004f: ldc.i8 0x0 IL_0058: conv.i IL_0059: nop - IL_005a: br.s IL_00bd + IL_005a: br.s IL_00bf IL_005c: ldc.i8 0xa IL_0065: conv.i @@ -693,7 +683,7 @@ IL_0071: ldarg.0 IL_0072: div.un IL_0073: nop - IL_0074: br.s IL_00bd + IL_0074: br.s IL_00bf IL_0076: ldc.i8 0x1 IL_007f: conv.i @@ -704,7 +694,7 @@ IL_008c: ldc.i8 0x0 IL_0095: conv.i IL_0096: nop - IL_0097: br.s IL_00bd + IL_0097: br.s IL_00bf IL_0099: ldc.i8 0x1 IL_00a2: conv.i @@ -718,136 +708,140 @@ IL_00ba: add IL_00bb: div.un IL_00bc: nop - IL_00bd: stloc.0 - IL_00be: sizeof [runtime]System.IntPtr - IL_00c4: ldc.i4.4 - IL_00c5: bne.un.s IL_00d7 - - IL_00c7: ldloc.0 - IL_00c8: ldc.i8 0xffffffff - IL_00d1: conv.u - IL_00d2: ceq - IL_00d4: nop - IL_00d5: br.s IL_00e5 - - IL_00d7: ldloc.0 - IL_00d8: ldc.i8 0xffffffffffffffff - IL_00e1: conv.u - IL_00e2: ceq - IL_00e4: nop - IL_00e5: brfalse.s IL_012a - - IL_00e7: ldc.i4.1 - IL_00e8: stloc.1 - IL_00e9: ldc.i8 0x0 - IL_00f2: conv.i - IL_00f3: stloc.2 - IL_00f4: ldc.i8 0x1 - IL_00fd: conv.i - IL_00fe: stloc.3 - IL_00ff: br.s IL_0126 - - IL_0101: ldloc.3 - IL_0102: call void assembly::set_c(native int) - IL_0107: ldloc.3 - IL_0108: ldarg.0 - IL_0109: add - IL_010a: stloc.3 - IL_010b: ldloc.2 - IL_010c: ldc.i8 0x1 - IL_0115: conv.i - IL_0116: add - IL_0117: stloc.2 - IL_0118: ldloc.2 - IL_0119: ldc.i8 0x0 - IL_0122: conv.i - IL_0123: cgt.un - IL_0125: stloc.1 - IL_0126: ldloc.1 - IL_0127: brtrue.s IL_0101 - - IL_0129: ret - - IL_012a: ldc.i8 0x0 - IL_0133: conv.i - IL_0134: ldarg.0 - IL_0135: bge.s IL_0182 - - IL_0137: ldc.i8 0xa - IL_0140: conv.i - IL_0141: ldc.i8 0x1 - IL_014a: conv.i - IL_014b: bge.s IL_015d - - IL_014d: ldc.i8 0x0 - IL_0156: conv.i - IL_0157: nop - IL_0158: br IL_01d4 - - IL_015d: ldc.i8 0xa - IL_0166: conv.i - IL_0167: ldc.i8 0x1 - IL_0170: conv.i - IL_0171: sub - IL_0172: ldarg.0 - IL_0173: div.un - IL_0174: ldc.i8 0x1 - IL_017d: conv.i - IL_017e: add.ovf.un - IL_017f: nop - IL_0180: br.s IL_01d4 - - IL_0182: ldc.i8 0x1 - IL_018b: conv.i - IL_018c: ldc.i8 0xa - IL_0195: conv.i - IL_0196: bge.s IL_01a5 - - IL_0198: ldc.i8 0x0 - IL_01a1: conv.i - IL_01a2: nop - IL_01a3: br.s IL_01d4 - - IL_01a5: ldc.i8 0x1 - IL_01ae: conv.i - IL_01af: ldc.i8 0xa - IL_01b8: conv.i - IL_01b9: sub - IL_01ba: ldarg.0 - IL_01bb: not - IL_01bc: ldc.i8 0x1 - IL_01c5: conv.i - IL_01c6: add - IL_01c7: div.un - IL_01c8: ldc.i8 0x1 - IL_01d1: conv.i - IL_01d2: add.ovf.un - IL_01d3: nop - IL_01d4: stloc.2 - IL_01d5: ldc.i8 0x0 - IL_01de: conv.i - IL_01df: stloc.3 - IL_01e0: ldc.i8 0x1 - IL_01e9: conv.i - IL_01ea: stloc.s V_4 - IL_01ec: br.s IL_0208 - - IL_01ee: ldloc.s V_4 - IL_01f0: call void assembly::set_c(native int) - IL_01f5: ldloc.s V_4 - IL_01f7: ldarg.0 - IL_01f8: add - IL_01f9: stloc.s V_4 - IL_01fb: ldloc.3 - IL_01fc: ldc.i8 0x1 - IL_0205: conv.i - IL_0206: add - IL_0207: stloc.3 - IL_0208: ldloc.3 - IL_0209: ldloc.2 - IL_020a: blt.un.s IL_01ee + IL_00bd: br.s IL_00bf + + IL_00bf: stloc.0 + IL_00c0: sizeof [runtime]System.IntPtr + IL_00c6: ldc.i4.4 + IL_00c7: bne.un.s IL_00d9 + + IL_00c9: ldloc.0 + IL_00ca: ldc.i8 0xffffffff + IL_00d3: conv.u + IL_00d4: ceq + IL_00d6: nop + IL_00d7: br.s IL_00e7 + + IL_00d9: ldloc.0 + IL_00da: ldc.i8 0xffffffffffffffff + IL_00e3: conv.u + IL_00e4: ceq + IL_00e6: nop + IL_00e7: brfalse.s IL_012c + + IL_00e9: ldc.i4.1 + IL_00ea: stloc.1 + IL_00eb: ldc.i8 0x0 + IL_00f4: conv.i + IL_00f5: stloc.2 + IL_00f6: ldc.i8 0x1 + IL_00ff: conv.i + IL_0100: stloc.3 + IL_0101: br.s IL_0128 + + IL_0103: ldloc.3 + IL_0104: call void assembly::set_c(native int) + IL_0109: ldloc.3 + IL_010a: ldarg.0 + IL_010b: add + IL_010c: stloc.3 + IL_010d: ldloc.2 + IL_010e: ldc.i8 0x1 + IL_0117: conv.i + IL_0118: add + IL_0119: stloc.2 + IL_011a: ldloc.2 + IL_011b: ldc.i8 0x0 + IL_0124: conv.i + IL_0125: cgt.un + IL_0127: stloc.1 + IL_0128: ldloc.1 + IL_0129: brtrue.s IL_0103 + + IL_012b: ret + + IL_012c: ldc.i8 0x0 + IL_0135: conv.i + IL_0136: ldarg.0 + IL_0137: bge.s IL_0184 + + IL_0139: ldc.i8 0xa + IL_0142: conv.i + IL_0143: ldc.i8 0x1 + IL_014c: conv.i + IL_014d: bge.s IL_015f - IL_020c: ret + IL_014f: ldc.i8 0x0 + IL_0158: conv.i + IL_0159: nop + IL_015a: br IL_01d8 + + IL_015f: ldc.i8 0xa + IL_0168: conv.i + IL_0169: ldc.i8 0x1 + IL_0172: conv.i + IL_0173: sub + IL_0174: ldarg.0 + IL_0175: div.un + IL_0176: ldc.i8 0x1 + IL_017f: conv.i + IL_0180: add.ovf.un + IL_0181: nop + IL_0182: br.s IL_01d8 + + IL_0184: ldc.i8 0x1 + IL_018d: conv.i + IL_018e: ldc.i8 0xa + IL_0197: conv.i + IL_0198: bge.s IL_01a7 + + IL_019a: ldc.i8 0x0 + IL_01a3: conv.i + IL_01a4: nop + IL_01a5: br.s IL_01d8 + + IL_01a7: ldc.i8 0x1 + IL_01b0: conv.i + IL_01b1: ldc.i8 0xa + IL_01ba: conv.i + IL_01bb: sub + IL_01bc: ldarg.0 + IL_01bd: not + IL_01be: ldc.i8 0x1 + IL_01c7: conv.i + IL_01c8: add + IL_01c9: div.un + IL_01ca: ldc.i8 0x1 + IL_01d3: conv.i + IL_01d4: add.ovf.un + IL_01d5: nop + IL_01d6: br.s IL_01d8 + + IL_01d8: stloc.2 + IL_01d9: ldc.i8 0x0 + IL_01e2: conv.i + IL_01e3: stloc.3 + IL_01e4: ldc.i8 0x1 + IL_01ed: conv.i + IL_01ee: stloc.s V_4 + IL_01f0: br.s IL_020c + + IL_01f2: ldloc.s V_4 + IL_01f4: call void assembly::set_c(native int) + IL_01f9: ldloc.s V_4 + IL_01fb: ldarg.0 + IL_01fc: add + IL_01fd: stloc.s V_4 + IL_01ff: ldloc.3 + IL_0200: ldc.i8 0x1 + IL_0209: conv.i + IL_020a: add + IL_020b: stloc.3 + IL_020c: ldloc.3 + IL_020d: ldloc.2 + IL_020e: blt.un.s IL_01f2 + + IL_0210: ret } .method public static void f9(native int finish) cil managed @@ -947,7 +941,7 @@ IL_002b: ldc.i8 0x0 IL_0034: conv.i IL_0035: nop - IL_0036: br.s IL_0063 + IL_0036: br.s IL_0065 IL_0038: ldarg.2 IL_0039: ldarg.2 @@ -955,7 +949,7 @@ IL_003b: ldarg.1 IL_003c: div.un IL_003d: nop - IL_003e: br.s IL_0063 + IL_003e: br.s IL_0065 IL_0040: ldarg.2 IL_0041: ldarg.2 @@ -964,7 +958,7 @@ IL_0044: ldc.i8 0x0 IL_004d: conv.i IL_004e: nop - IL_004f: br.s IL_0063 + IL_004f: br.s IL_0065 IL_0051: ldarg.2 IL_0052: ldarg.2 @@ -976,126 +970,130 @@ IL_0060: add IL_0061: div.un IL_0062: nop - IL_0063: stloc.0 - IL_0064: sizeof [runtime]System.IntPtr - IL_006a: ldc.i4.4 - IL_006b: bne.un.s IL_007d - - IL_006d: ldloc.0 - IL_006e: ldc.i8 0xffffffff - IL_0077: conv.u - IL_0078: ceq - IL_007a: nop - IL_007b: br.s IL_008b - - IL_007d: ldloc.0 - IL_007e: ldc.i8 0xffffffffffffffff - IL_0087: conv.u - IL_0088: ceq - IL_008a: nop - IL_008b: brfalse.s IL_00c7 - - IL_008d: ldc.i4.1 - IL_008e: stloc.1 - IL_008f: ldc.i8 0x0 - IL_0098: conv.i - IL_0099: stloc.2 - IL_009a: ldarg.2 - IL_009b: stloc.3 - IL_009c: br.s IL_00c3 - - IL_009e: ldloc.3 - IL_009f: call void assembly::set_c(native int) - IL_00a4: ldloc.3 - IL_00a5: ldarg.1 - IL_00a6: add - IL_00a7: stloc.3 - IL_00a8: ldloc.2 - IL_00a9: ldc.i8 0x1 - IL_00b2: conv.i - IL_00b3: add - IL_00b4: stloc.2 - IL_00b5: ldloc.2 - IL_00b6: ldc.i8 0x0 - IL_00bf: conv.i - IL_00c0: cgt.un - IL_00c2: stloc.1 - IL_00c3: ldloc.1 - IL_00c4: brtrue.s IL_009e - - IL_00c6: ret + IL_0063: br.s IL_0065 + + IL_0065: stloc.0 + IL_0066: sizeof [runtime]System.IntPtr + IL_006c: ldc.i4.4 + IL_006d: bne.un.s IL_007f + + IL_006f: ldloc.0 + IL_0070: ldc.i8 0xffffffff + IL_0079: conv.u + IL_007a: ceq + IL_007c: nop + IL_007d: br.s IL_008d + + IL_007f: ldloc.0 + IL_0080: ldc.i8 0xffffffffffffffff + IL_0089: conv.u + IL_008a: ceq + IL_008c: nop + IL_008d: brfalse.s IL_00c9 + + IL_008f: ldc.i4.1 + IL_0090: stloc.1 + IL_0091: ldc.i8 0x0 + IL_009a: conv.i + IL_009b: stloc.2 + IL_009c: ldarg.2 + IL_009d: stloc.3 + IL_009e: br.s IL_00c5 + + IL_00a0: ldloc.3 + IL_00a1: call void assembly::set_c(native int) + IL_00a6: ldloc.3 + IL_00a7: ldarg.1 + IL_00a8: add + IL_00a9: stloc.3 + IL_00aa: ldloc.2 + IL_00ab: ldc.i8 0x1 + IL_00b4: conv.i + IL_00b5: add + IL_00b6: stloc.2 + IL_00b7: ldloc.2 + IL_00b8: ldc.i8 0x0 + IL_00c1: conv.i + IL_00c2: cgt.un + IL_00c4: stloc.1 + IL_00c5: ldloc.1 + IL_00c6: brtrue.s IL_00a0 - IL_00c7: ldc.i8 0x0 - IL_00d0: conv.i - IL_00d1: ldarg.1 - IL_00d2: bge.s IL_00f8 - - IL_00d4: ldarg.2 - IL_00d5: ldarg.2 - IL_00d6: bge.s IL_00e5 - - IL_00d8: ldc.i8 0x0 - IL_00e1: conv.i - IL_00e2: nop - IL_00e3: br.s IL_0126 - - IL_00e5: ldarg.2 - IL_00e6: ldarg.2 - IL_00e7: sub - IL_00e8: ldarg.1 - IL_00e9: div.un - IL_00ea: ldc.i8 0x1 - IL_00f3: conv.i - IL_00f4: add.ovf.un - IL_00f5: nop - IL_00f6: br.s IL_0126 - - IL_00f8: ldarg.2 - IL_00f9: ldarg.2 - IL_00fa: bge.s IL_0109 - - IL_00fc: ldc.i8 0x0 - IL_0105: conv.i - IL_0106: nop - IL_0107: br.s IL_0126 + IL_00c8: ret - IL_0109: ldarg.2 - IL_010a: ldarg.2 - IL_010b: sub - IL_010c: ldarg.1 - IL_010d: not - IL_010e: ldc.i8 0x1 - IL_0117: conv.i - IL_0118: add - IL_0119: div.un - IL_011a: ldc.i8 0x1 - IL_0123: conv.i - IL_0124: add.ovf.un - IL_0125: nop - IL_0126: stloc.2 - IL_0127: ldc.i8 0x0 - IL_0130: conv.i - IL_0131: stloc.3 - IL_0132: ldarg.2 - IL_0133: stloc.s V_4 - IL_0135: br.s IL_0151 - - IL_0137: ldloc.s V_4 - IL_0139: call void assembly::set_c(native int) - IL_013e: ldloc.s V_4 - IL_0140: ldarg.1 - IL_0141: add - IL_0142: stloc.s V_4 - IL_0144: ldloc.3 - IL_0145: ldc.i8 0x1 - IL_014e: conv.i - IL_014f: add - IL_0150: stloc.3 - IL_0151: ldloc.3 - IL_0152: ldloc.2 - IL_0153: blt.un.s IL_0137 - - IL_0155: ret + IL_00c9: ldc.i8 0x0 + IL_00d2: conv.i + IL_00d3: ldarg.1 + IL_00d4: bge.s IL_00fa + + IL_00d6: ldarg.2 + IL_00d7: ldarg.2 + IL_00d8: bge.s IL_00e7 + + IL_00da: ldc.i8 0x0 + IL_00e3: conv.i + IL_00e4: nop + IL_00e5: br.s IL_012a + + IL_00e7: ldarg.2 + IL_00e8: ldarg.2 + IL_00e9: sub + IL_00ea: ldarg.1 + IL_00eb: div.un + IL_00ec: ldc.i8 0x1 + IL_00f5: conv.i + IL_00f6: add.ovf.un + IL_00f7: nop + IL_00f8: br.s IL_012a + + IL_00fa: ldarg.2 + IL_00fb: ldarg.2 + IL_00fc: bge.s IL_010b + + IL_00fe: ldc.i8 0x0 + IL_0107: conv.i + IL_0108: nop + IL_0109: br.s IL_012a + + IL_010b: ldarg.2 + IL_010c: ldarg.2 + IL_010d: sub + IL_010e: ldarg.1 + IL_010f: not + IL_0110: ldc.i8 0x1 + IL_0119: conv.i + IL_011a: add + IL_011b: div.un + IL_011c: ldc.i8 0x1 + IL_0125: conv.i + IL_0126: add.ovf.un + IL_0127: nop + IL_0128: br.s IL_012a + + IL_012a: stloc.2 + IL_012b: ldc.i8 0x0 + IL_0134: conv.i + IL_0135: stloc.3 + IL_0136: ldarg.2 + IL_0137: stloc.s V_4 + IL_0139: br.s IL_0155 + + IL_013b: ldloc.s V_4 + IL_013d: call void assembly::set_c(native int) + IL_0142: ldloc.s V_4 + IL_0144: ldarg.1 + IL_0145: add + IL_0146: stloc.s V_4 + IL_0148: ldloc.3 + IL_0149: ldc.i8 0x1 + IL_0152: conv.i + IL_0153: add + IL_0154: stloc.3 + IL_0155: ldloc.3 + IL_0156: ldloc.2 + IL_0157: blt.un.s IL_013b + + IL_0159: ret } .method public static void f11(native int start, @@ -1349,189 +1347,193 @@ IL_0047: conv.i IL_0048: ldc.i8 0xfffffffffffffffe IL_0051: conv.i - IL_0052: bge.s IL_009a + IL_0052: bge.s IL_009d IL_0054: ldc.i8 0x1 IL_005d: conv.i IL_005e: ldc.i8 0xa IL_0067: conv.i - IL_0068: bge.s IL_0077 + IL_0068: bge.s IL_007a IL_006a: ldc.i8 0x0 IL_0073: conv.i IL_0074: nop - IL_0075: br.s IL_00ea - - IL_0077: ldc.i8 0x1 - IL_0080: conv.i - IL_0081: ldc.i8 0xa - IL_008a: conv.i - IL_008b: sub - IL_008c: ldc.i8 0xfffffffffffffffe - IL_0095: conv.i - IL_0096: div.un - IL_0097: nop - IL_0098: br.s IL_00ea - - IL_009a: ldc.i8 0xa - IL_00a3: conv.i - IL_00a4: ldc.i8 0x1 - IL_00ad: conv.i - IL_00ae: bge.s IL_00bd - - IL_00b0: ldc.i8 0x0 - IL_00b9: conv.i - IL_00ba: nop - IL_00bb: br.s IL_00ea - - IL_00bd: ldc.i8 0xa - IL_00c6: conv.i - IL_00c7: ldc.i8 0x1 - IL_00d0: conv.i - IL_00d1: sub - IL_00d2: ldc.i8 0xfffffffffffffffe - IL_00db: conv.i - IL_00dc: not - IL_00dd: ldc.i8 0x1 - IL_00e6: conv.i - IL_00e7: add - IL_00e8: div.un - IL_00e9: nop - IL_00ea: stloc.0 - IL_00eb: sizeof [runtime]System.IntPtr - IL_00f1: ldc.i4.4 - IL_00f2: bne.un.s IL_0104 - - IL_00f4: ldloc.0 - IL_00f5: ldc.i8 0xffffffff - IL_00fe: conv.u - IL_00ff: ceq - IL_0101: nop - IL_0102: br.s IL_0112 - - IL_0104: ldloc.0 - IL_0105: ldc.i8 0xffffffffffffffff - IL_010e: conv.u - IL_010f: ceq - IL_0111: nop - IL_0112: brfalse.s IL_0160 - - IL_0114: ldc.i4.1 - IL_0115: stloc.1 - IL_0116: ldc.i8 0x0 - IL_011f: conv.i - IL_0120: stloc.2 - IL_0121: ldc.i8 0xa - IL_012a: conv.i - IL_012b: stloc.3 - IL_012c: br.s IL_015c - - IL_012e: ldloc.3 - IL_012f: call void assembly::set_c(native int) - IL_0134: ldloc.3 - IL_0135: ldc.i8 0xfffffffffffffffe - IL_013e: conv.i - IL_013f: add - IL_0140: stloc.3 - IL_0141: ldloc.2 - IL_0142: ldc.i8 0x1 - IL_014b: conv.i - IL_014c: add - IL_014d: stloc.2 - IL_014e: ldloc.2 - IL_014f: ldc.i8 0x0 - IL_0158: conv.i - IL_0159: cgt.un - IL_015b: stloc.1 - IL_015c: ldloc.1 - IL_015d: brtrue.s IL_012e - - IL_015f: ret + IL_0075: br IL_00ef - IL_0160: ldc.i8 0x0 - IL_0169: conv.i - IL_016a: ldc.i8 0xfffffffffffffffe - IL_0173: conv.i - IL_0174: bge.s IL_01ca + IL_007a: ldc.i8 0x1 + IL_0083: conv.i + IL_0084: ldc.i8 0xa + IL_008d: conv.i + IL_008e: sub + IL_008f: ldc.i8 0xfffffffffffffffe + IL_0098: conv.i + IL_0099: div.un + IL_009a: nop + IL_009b: br.s IL_00ef + + IL_009d: ldc.i8 0xa + IL_00a6: conv.i + IL_00a7: ldc.i8 0x1 + IL_00b0: conv.i + IL_00b1: bge.s IL_00c0 + + IL_00b3: ldc.i8 0x0 + IL_00bc: conv.i + IL_00bd: nop + IL_00be: br.s IL_00ef + + IL_00c0: ldc.i8 0xa + IL_00c9: conv.i + IL_00ca: ldc.i8 0x1 + IL_00d3: conv.i + IL_00d4: sub + IL_00d5: ldc.i8 0xfffffffffffffffe + IL_00de: conv.i + IL_00df: not + IL_00e0: ldc.i8 0x1 + IL_00e9: conv.i + IL_00ea: add + IL_00eb: div.un + IL_00ec: nop + IL_00ed: br.s IL_00ef + + IL_00ef: stloc.0 + IL_00f0: sizeof [runtime]System.IntPtr + IL_00f6: ldc.i4.4 + IL_00f7: bne.un.s IL_0109 + + IL_00f9: ldloc.0 + IL_00fa: ldc.i8 0xffffffff + IL_0103: conv.u + IL_0104: ceq + IL_0106: nop + IL_0107: br.s IL_0117 + + IL_0109: ldloc.0 + IL_010a: ldc.i8 0xffffffffffffffff + IL_0113: conv.u + IL_0114: ceq + IL_0116: nop + IL_0117: brfalse.s IL_0165 + + IL_0119: ldc.i4.1 + IL_011a: stloc.1 + IL_011b: ldc.i8 0x0 + IL_0124: conv.i + IL_0125: stloc.2 + IL_0126: ldc.i8 0xa + IL_012f: conv.i + IL_0130: stloc.3 + IL_0131: br.s IL_0161 + + IL_0133: ldloc.3 + IL_0134: call void assembly::set_c(native int) + IL_0139: ldloc.3 + IL_013a: ldc.i8 0xfffffffffffffffe + IL_0143: conv.i + IL_0144: add + IL_0145: stloc.3 + IL_0146: ldloc.2 + IL_0147: ldc.i8 0x1 + IL_0150: conv.i + IL_0151: add + IL_0152: stloc.2 + IL_0153: ldloc.2 + IL_0154: ldc.i8 0x0 + IL_015d: conv.i + IL_015e: cgt.un + IL_0160: stloc.1 + IL_0161: ldloc.1 + IL_0162: brtrue.s IL_0133 + + IL_0164: ret + + IL_0165: ldc.i8 0x0 + IL_016e: conv.i + IL_016f: ldc.i8 0xfffffffffffffffe + IL_0178: conv.i + IL_0179: bge.s IL_01cf + + IL_017b: ldc.i8 0x1 + IL_0184: conv.i + IL_0185: ldc.i8 0xa + IL_018e: conv.i + IL_018f: bge.s IL_01a1 + + IL_0191: ldc.i8 0x0 + IL_019a: conv.i + IL_019b: nop + IL_019c: br IL_022c + + IL_01a1: ldc.i8 0x1 + IL_01aa: conv.i + IL_01ab: ldc.i8 0xa + IL_01b4: conv.i + IL_01b5: sub + IL_01b6: ldc.i8 0xfffffffffffffffe + IL_01bf: conv.i + IL_01c0: div.un + IL_01c1: ldc.i8 0x1 + IL_01ca: conv.i + IL_01cb: add.ovf.un + IL_01cc: nop + IL_01cd: br.s IL_022c + + IL_01cf: ldc.i8 0xa + IL_01d8: conv.i + IL_01d9: ldc.i8 0x1 + IL_01e2: conv.i + IL_01e3: bge.s IL_01f2 + + IL_01e5: ldc.i8 0x0 + IL_01ee: conv.i + IL_01ef: nop + IL_01f0: br.s IL_022c + + IL_01f2: ldc.i8 0xa + IL_01fb: conv.i + IL_01fc: ldc.i8 0x1 + IL_0205: conv.i + IL_0206: sub + IL_0207: ldc.i8 0xfffffffffffffffe + IL_0210: conv.i + IL_0211: not + IL_0212: ldc.i8 0x1 + IL_021b: conv.i + IL_021c: add + IL_021d: div.un + IL_021e: ldc.i8 0x1 + IL_0227: conv.i + IL_0228: add.ovf.un + IL_0229: nop + IL_022a: br.s IL_022c + + IL_022c: stloc.2 + IL_022d: ldc.i8 0x0 + IL_0236: conv.i + IL_0237: stloc.3 + IL_0238: ldc.i8 0xa + IL_0241: conv.i + IL_0242: stloc.s V_4 + IL_0244: br.s IL_0269 - IL_0176: ldc.i8 0x1 - IL_017f: conv.i - IL_0180: ldc.i8 0xa - IL_0189: conv.i - IL_018a: bge.s IL_019c - - IL_018c: ldc.i8 0x0 - IL_0195: conv.i - IL_0196: nop - IL_0197: br IL_0225 - - IL_019c: ldc.i8 0x1 - IL_01a5: conv.i - IL_01a6: ldc.i8 0xa - IL_01af: conv.i - IL_01b0: sub - IL_01b1: ldc.i8 0xfffffffffffffffe - IL_01ba: conv.i - IL_01bb: div.un - IL_01bc: ldc.i8 0x1 - IL_01c5: conv.i - IL_01c6: add.ovf.un - IL_01c7: nop - IL_01c8: br.s IL_0225 - - IL_01ca: ldc.i8 0xa - IL_01d3: conv.i - IL_01d4: ldc.i8 0x1 - IL_01dd: conv.i - IL_01de: bge.s IL_01ed - - IL_01e0: ldc.i8 0x0 - IL_01e9: conv.i - IL_01ea: nop - IL_01eb: br.s IL_0225 - - IL_01ed: ldc.i8 0xa - IL_01f6: conv.i - IL_01f7: ldc.i8 0x1 - IL_0200: conv.i - IL_0201: sub - IL_0202: ldc.i8 0xfffffffffffffffe - IL_020b: conv.i - IL_020c: not - IL_020d: ldc.i8 0x1 - IL_0216: conv.i - IL_0217: add - IL_0218: div.un - IL_0219: ldc.i8 0x1 - IL_0222: conv.i - IL_0223: add.ovf.un - IL_0224: nop - IL_0225: stloc.2 - IL_0226: ldc.i8 0x0 - IL_022f: conv.i - IL_0230: stloc.3 - IL_0231: ldc.i8 0xa - IL_023a: conv.i - IL_023b: stloc.s V_4 - IL_023d: br.s IL_0262 - - IL_023f: ldloc.s V_4 - IL_0241: call void assembly::set_c(native int) IL_0246: ldloc.s V_4 - IL_0248: ldc.i8 0xfffffffffffffffe - IL_0251: conv.i - IL_0252: add - IL_0253: stloc.s V_4 - IL_0255: ldloc.3 - IL_0256: ldc.i8 0x1 - IL_025f: conv.i - IL_0260: add - IL_0261: stloc.3 - IL_0262: ldloc.3 - IL_0263: ldloc.2 - IL_0264: blt.un.s IL_023f - - IL_0266: ret + IL_0248: call void assembly::set_c(native int) + IL_024d: ldloc.s V_4 + IL_024f: ldc.i8 0xfffffffffffffffe + IL_0258: conv.i + IL_0259: add + IL_025a: stloc.s V_4 + IL_025c: ldloc.3 + IL_025d: ldc.i8 0x1 + IL_0266: conv.i + IL_0267: add + IL_0268: stloc.3 + IL_0269: ldloc.3 + IL_026a: ldloc.2 + IL_026b: blt.un.s IL_0246 + + IL_026d: ret } .property native int c() @@ -1568,4 +1570,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 927c976ab40..103247d5a71 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -685,7 +675,7 @@ IL_004f: ldc.i8 0x0 IL_0058: conv.i IL_0059: nop - IL_005a: br.s IL_00bd + IL_005a: br.s IL_00bf IL_005c: ldc.i8 0xa IL_0065: conv.i @@ -695,7 +685,7 @@ IL_0071: ldarg.0 IL_0072: div.un IL_0073: nop - IL_0074: br.s IL_00bd + IL_0074: br.s IL_00bf IL_0076: ldc.i8 0x1 IL_007f: conv.i @@ -706,7 +696,7 @@ IL_008c: ldc.i8 0x0 IL_0095: conv.i IL_0096: nop - IL_0097: br.s IL_00bd + IL_0097: br.s IL_00bf IL_0099: ldc.i8 0x1 IL_00a2: conv.i @@ -720,136 +710,140 @@ IL_00ba: add IL_00bb: div.un IL_00bc: nop - IL_00bd: stloc.0 - IL_00be: sizeof [runtime]System.IntPtr - IL_00c4: ldc.i4.4 - IL_00c5: bne.un.s IL_00d7 - - IL_00c7: ldloc.0 - IL_00c8: ldc.i8 0xffffffff - IL_00d1: conv.u - IL_00d2: ceq - IL_00d4: nop - IL_00d5: br.s IL_00e5 - - IL_00d7: ldloc.0 - IL_00d8: ldc.i8 0xffffffffffffffff - IL_00e1: conv.u - IL_00e2: ceq - IL_00e4: nop - IL_00e5: brfalse.s IL_012a - - IL_00e7: ldc.i4.1 - IL_00e8: stloc.1 - IL_00e9: ldc.i8 0x0 - IL_00f2: conv.i - IL_00f3: stloc.2 - IL_00f4: ldc.i8 0x1 - IL_00fd: conv.i - IL_00fe: stloc.3 - IL_00ff: br.s IL_0126 - - IL_0101: ldloc.3 - IL_0102: call void assembly::set_c(native int) - IL_0107: ldloc.3 - IL_0108: ldarg.0 - IL_0109: add - IL_010a: stloc.3 - IL_010b: ldloc.2 - IL_010c: ldc.i8 0x1 - IL_0115: conv.i - IL_0116: add - IL_0117: stloc.2 - IL_0118: ldloc.2 - IL_0119: ldc.i8 0x0 - IL_0122: conv.i - IL_0123: cgt.un - IL_0125: stloc.1 - IL_0126: ldloc.1 - IL_0127: brtrue.s IL_0101 - - IL_0129: ret - - IL_012a: ldc.i8 0x0 - IL_0133: conv.i - IL_0134: ldarg.0 - IL_0135: bge.s IL_0182 - - IL_0137: ldc.i8 0xa - IL_0140: conv.i - IL_0141: ldc.i8 0x1 - IL_014a: conv.i - IL_014b: bge.s IL_015d - - IL_014d: ldc.i8 0x0 - IL_0156: conv.i - IL_0157: nop - IL_0158: br IL_01d4 - - IL_015d: ldc.i8 0xa - IL_0166: conv.i - IL_0167: ldc.i8 0x1 - IL_0170: conv.i - IL_0171: sub - IL_0172: ldarg.0 - IL_0173: div.un - IL_0174: ldc.i8 0x1 - IL_017d: conv.i - IL_017e: add.ovf.un - IL_017f: nop - IL_0180: br.s IL_01d4 - - IL_0182: ldc.i8 0x1 - IL_018b: conv.i - IL_018c: ldc.i8 0xa - IL_0195: conv.i - IL_0196: bge.s IL_01a5 - - IL_0198: ldc.i8 0x0 - IL_01a1: conv.i - IL_01a2: nop - IL_01a3: br.s IL_01d4 - - IL_01a5: ldc.i8 0x1 - IL_01ae: conv.i - IL_01af: ldc.i8 0xa - IL_01b8: conv.i - IL_01b9: sub - IL_01ba: ldarg.0 - IL_01bb: not - IL_01bc: ldc.i8 0x1 - IL_01c5: conv.i - IL_01c6: add - IL_01c7: div.un - IL_01c8: ldc.i8 0x1 - IL_01d1: conv.i - IL_01d2: add.ovf.un - IL_01d3: nop - IL_01d4: stloc.2 - IL_01d5: ldc.i8 0x0 - IL_01de: conv.i - IL_01df: stloc.3 - IL_01e0: ldc.i8 0x1 - IL_01e9: conv.i - IL_01ea: stloc.s V_4 - IL_01ec: br.s IL_0208 - - IL_01ee: ldloc.s V_4 - IL_01f0: call void assembly::set_c(native int) - IL_01f5: ldloc.s V_4 - IL_01f7: ldarg.0 - IL_01f8: add - IL_01f9: stloc.s V_4 - IL_01fb: ldloc.3 - IL_01fc: ldc.i8 0x1 - IL_0205: conv.i - IL_0206: add - IL_0207: stloc.3 - IL_0208: ldloc.3 - IL_0209: ldloc.2 - IL_020a: blt.un.s IL_01ee + IL_00bd: br.s IL_00bf + + IL_00bf: stloc.0 + IL_00c0: sizeof [runtime]System.IntPtr + IL_00c6: ldc.i4.4 + IL_00c7: bne.un.s IL_00d9 + + IL_00c9: ldloc.0 + IL_00ca: ldc.i8 0xffffffff + IL_00d3: conv.u + IL_00d4: ceq + IL_00d6: nop + IL_00d7: br.s IL_00e7 + + IL_00d9: ldloc.0 + IL_00da: ldc.i8 0xffffffffffffffff + IL_00e3: conv.u + IL_00e4: ceq + IL_00e6: nop + IL_00e7: brfalse.s IL_012c + + IL_00e9: ldc.i4.1 + IL_00ea: stloc.1 + IL_00eb: ldc.i8 0x0 + IL_00f4: conv.i + IL_00f5: stloc.2 + IL_00f6: ldc.i8 0x1 + IL_00ff: conv.i + IL_0100: stloc.3 + IL_0101: br.s IL_0128 + + IL_0103: ldloc.3 + IL_0104: call void assembly::set_c(native int) + IL_0109: ldloc.3 + IL_010a: ldarg.0 + IL_010b: add + IL_010c: stloc.3 + IL_010d: ldloc.2 + IL_010e: ldc.i8 0x1 + IL_0117: conv.i + IL_0118: add + IL_0119: stloc.2 + IL_011a: ldloc.2 + IL_011b: ldc.i8 0x0 + IL_0124: conv.i + IL_0125: cgt.un + IL_0127: stloc.1 + IL_0128: ldloc.1 + IL_0129: brtrue.s IL_0103 + + IL_012b: ret + + IL_012c: ldc.i8 0x0 + IL_0135: conv.i + IL_0136: ldarg.0 + IL_0137: bge.s IL_0184 + + IL_0139: ldc.i8 0xa + IL_0142: conv.i + IL_0143: ldc.i8 0x1 + IL_014c: conv.i + IL_014d: bge.s IL_015f - IL_020c: ret + IL_014f: ldc.i8 0x0 + IL_0158: conv.i + IL_0159: nop + IL_015a: br IL_01d8 + + IL_015f: ldc.i8 0xa + IL_0168: conv.i + IL_0169: ldc.i8 0x1 + IL_0172: conv.i + IL_0173: sub + IL_0174: ldarg.0 + IL_0175: div.un + IL_0176: ldc.i8 0x1 + IL_017f: conv.i + IL_0180: add.ovf.un + IL_0181: nop + IL_0182: br.s IL_01d8 + + IL_0184: ldc.i8 0x1 + IL_018d: conv.i + IL_018e: ldc.i8 0xa + IL_0197: conv.i + IL_0198: bge.s IL_01a7 + + IL_019a: ldc.i8 0x0 + IL_01a3: conv.i + IL_01a4: nop + IL_01a5: br.s IL_01d8 + + IL_01a7: ldc.i8 0x1 + IL_01b0: conv.i + IL_01b1: ldc.i8 0xa + IL_01ba: conv.i + IL_01bb: sub + IL_01bc: ldarg.0 + IL_01bd: not + IL_01be: ldc.i8 0x1 + IL_01c7: conv.i + IL_01c8: add + IL_01c9: div.un + IL_01ca: ldc.i8 0x1 + IL_01d3: conv.i + IL_01d4: add.ovf.un + IL_01d5: nop + IL_01d6: br.s IL_01d8 + + IL_01d8: stloc.2 + IL_01d9: ldc.i8 0x0 + IL_01e2: conv.i + IL_01e3: stloc.3 + IL_01e4: ldc.i8 0x1 + IL_01ed: conv.i + IL_01ee: stloc.s V_4 + IL_01f0: br.s IL_020c + + IL_01f2: ldloc.s V_4 + IL_01f4: call void assembly::set_c(native int) + IL_01f9: ldloc.s V_4 + IL_01fb: ldarg.0 + IL_01fc: add + IL_01fd: stloc.s V_4 + IL_01ff: ldloc.3 + IL_0200: ldc.i8 0x1 + IL_0209: conv.i + IL_020a: add + IL_020b: stloc.3 + IL_020c: ldloc.3 + IL_020d: ldloc.2 + IL_020e: blt.un.s IL_01f2 + + IL_0210: ret } .method public static void f9(native int finish) cil managed @@ -949,7 +943,7 @@ IL_002b: ldc.i8 0x0 IL_0034: conv.i IL_0035: nop - IL_0036: br.s IL_0063 + IL_0036: br.s IL_0065 IL_0038: ldarg.2 IL_0039: ldarg.2 @@ -957,7 +951,7 @@ IL_003b: ldarg.1 IL_003c: div.un IL_003d: nop - IL_003e: br.s IL_0063 + IL_003e: br.s IL_0065 IL_0040: ldarg.2 IL_0041: ldarg.2 @@ -966,7 +960,7 @@ IL_0044: ldc.i8 0x0 IL_004d: conv.i IL_004e: nop - IL_004f: br.s IL_0063 + IL_004f: br.s IL_0065 IL_0051: ldarg.2 IL_0052: ldarg.2 @@ -978,126 +972,130 @@ IL_0060: add IL_0061: div.un IL_0062: nop - IL_0063: stloc.0 - IL_0064: sizeof [runtime]System.IntPtr - IL_006a: ldc.i4.4 - IL_006b: bne.un.s IL_007d - - IL_006d: ldloc.0 - IL_006e: ldc.i8 0xffffffff - IL_0077: conv.u - IL_0078: ceq - IL_007a: nop - IL_007b: br.s IL_008b - - IL_007d: ldloc.0 - IL_007e: ldc.i8 0xffffffffffffffff - IL_0087: conv.u - IL_0088: ceq - IL_008a: nop - IL_008b: brfalse.s IL_00c7 - - IL_008d: ldc.i4.1 - IL_008e: stloc.1 - IL_008f: ldc.i8 0x0 - IL_0098: conv.i - IL_0099: stloc.2 - IL_009a: ldarg.2 - IL_009b: stloc.3 - IL_009c: br.s IL_00c3 - - IL_009e: ldloc.3 - IL_009f: call void assembly::set_c(native int) - IL_00a4: ldloc.3 - IL_00a5: ldarg.1 - IL_00a6: add - IL_00a7: stloc.3 - IL_00a8: ldloc.2 - IL_00a9: ldc.i8 0x1 - IL_00b2: conv.i - IL_00b3: add - IL_00b4: stloc.2 - IL_00b5: ldloc.2 - IL_00b6: ldc.i8 0x0 - IL_00bf: conv.i - IL_00c0: cgt.un - IL_00c2: stloc.1 - IL_00c3: ldloc.1 - IL_00c4: brtrue.s IL_009e - - IL_00c6: ret + IL_0063: br.s IL_0065 + + IL_0065: stloc.0 + IL_0066: sizeof [runtime]System.IntPtr + IL_006c: ldc.i4.4 + IL_006d: bne.un.s IL_007f + + IL_006f: ldloc.0 + IL_0070: ldc.i8 0xffffffff + IL_0079: conv.u + IL_007a: ceq + IL_007c: nop + IL_007d: br.s IL_008d + + IL_007f: ldloc.0 + IL_0080: ldc.i8 0xffffffffffffffff + IL_0089: conv.u + IL_008a: ceq + IL_008c: nop + IL_008d: brfalse.s IL_00c9 + + IL_008f: ldc.i4.1 + IL_0090: stloc.1 + IL_0091: ldc.i8 0x0 + IL_009a: conv.i + IL_009b: stloc.2 + IL_009c: ldarg.2 + IL_009d: stloc.3 + IL_009e: br.s IL_00c5 + + IL_00a0: ldloc.3 + IL_00a1: call void assembly::set_c(native int) + IL_00a6: ldloc.3 + IL_00a7: ldarg.1 + IL_00a8: add + IL_00a9: stloc.3 + IL_00aa: ldloc.2 + IL_00ab: ldc.i8 0x1 + IL_00b4: conv.i + IL_00b5: add + IL_00b6: stloc.2 + IL_00b7: ldloc.2 + IL_00b8: ldc.i8 0x0 + IL_00c1: conv.i + IL_00c2: cgt.un + IL_00c4: stloc.1 + IL_00c5: ldloc.1 + IL_00c6: brtrue.s IL_00a0 - IL_00c7: ldc.i8 0x0 - IL_00d0: conv.i - IL_00d1: ldarg.1 - IL_00d2: bge.s IL_00f8 - - IL_00d4: ldarg.2 - IL_00d5: ldarg.2 - IL_00d6: bge.s IL_00e5 - - IL_00d8: ldc.i8 0x0 - IL_00e1: conv.i - IL_00e2: nop - IL_00e3: br.s IL_0126 - - IL_00e5: ldarg.2 - IL_00e6: ldarg.2 - IL_00e7: sub - IL_00e8: ldarg.1 - IL_00e9: div.un - IL_00ea: ldc.i8 0x1 - IL_00f3: conv.i - IL_00f4: add.ovf.un - IL_00f5: nop - IL_00f6: br.s IL_0126 - - IL_00f8: ldarg.2 - IL_00f9: ldarg.2 - IL_00fa: bge.s IL_0109 - - IL_00fc: ldc.i8 0x0 - IL_0105: conv.i - IL_0106: nop - IL_0107: br.s IL_0126 + IL_00c8: ret - IL_0109: ldarg.2 - IL_010a: ldarg.2 - IL_010b: sub - IL_010c: ldarg.1 - IL_010d: not - IL_010e: ldc.i8 0x1 - IL_0117: conv.i - IL_0118: add - IL_0119: div.un - IL_011a: ldc.i8 0x1 - IL_0123: conv.i - IL_0124: add.ovf.un - IL_0125: nop - IL_0126: stloc.2 - IL_0127: ldc.i8 0x0 - IL_0130: conv.i - IL_0131: stloc.3 - IL_0132: ldarg.2 - IL_0133: stloc.s V_4 - IL_0135: br.s IL_0151 - - IL_0137: ldloc.s V_4 - IL_0139: call void assembly::set_c(native int) - IL_013e: ldloc.s V_4 - IL_0140: ldarg.1 - IL_0141: add - IL_0142: stloc.s V_4 - IL_0144: ldloc.3 - IL_0145: ldc.i8 0x1 - IL_014e: conv.i - IL_014f: add - IL_0150: stloc.3 - IL_0151: ldloc.3 - IL_0152: ldloc.2 - IL_0153: blt.un.s IL_0137 - - IL_0155: ret + IL_00c9: ldc.i8 0x0 + IL_00d2: conv.i + IL_00d3: ldarg.1 + IL_00d4: bge.s IL_00fa + + IL_00d6: ldarg.2 + IL_00d7: ldarg.2 + IL_00d8: bge.s IL_00e7 + + IL_00da: ldc.i8 0x0 + IL_00e3: conv.i + IL_00e4: nop + IL_00e5: br.s IL_012a + + IL_00e7: ldarg.2 + IL_00e8: ldarg.2 + IL_00e9: sub + IL_00ea: ldarg.1 + IL_00eb: div.un + IL_00ec: ldc.i8 0x1 + IL_00f5: conv.i + IL_00f6: add.ovf.un + IL_00f7: nop + IL_00f8: br.s IL_012a + + IL_00fa: ldarg.2 + IL_00fb: ldarg.2 + IL_00fc: bge.s IL_010b + + IL_00fe: ldc.i8 0x0 + IL_0107: conv.i + IL_0108: nop + IL_0109: br.s IL_012a + + IL_010b: ldarg.2 + IL_010c: ldarg.2 + IL_010d: sub + IL_010e: ldarg.1 + IL_010f: not + IL_0110: ldc.i8 0x1 + IL_0119: conv.i + IL_011a: add + IL_011b: div.un + IL_011c: ldc.i8 0x1 + IL_0125: conv.i + IL_0126: add.ovf.un + IL_0127: nop + IL_0128: br.s IL_012a + + IL_012a: stloc.2 + IL_012b: ldc.i8 0x0 + IL_0134: conv.i + IL_0135: stloc.3 + IL_0136: ldarg.2 + IL_0137: stloc.s V_4 + IL_0139: br.s IL_0155 + + IL_013b: ldloc.s V_4 + IL_013d: call void assembly::set_c(native int) + IL_0142: ldloc.s V_4 + IL_0144: ldarg.1 + IL_0145: add + IL_0146: stloc.s V_4 + IL_0148: ldloc.3 + IL_0149: ldc.i8 0x1 + IL_0152: conv.i + IL_0153: add + IL_0154: stloc.3 + IL_0155: ldloc.3 + IL_0156: ldloc.2 + IL_0157: blt.un.s IL_013b + + IL_0159: ret } .method public static void f11(native int start, @@ -1351,189 +1349,193 @@ IL_0047: conv.i IL_0048: ldc.i8 0xfffffffffffffffe IL_0051: conv.i - IL_0052: bge.s IL_009a + IL_0052: bge.s IL_009d IL_0054: ldc.i8 0x1 IL_005d: conv.i IL_005e: ldc.i8 0xa IL_0067: conv.i - IL_0068: bge.s IL_0077 + IL_0068: bge.s IL_007a IL_006a: ldc.i8 0x0 IL_0073: conv.i IL_0074: nop - IL_0075: br.s IL_00ea - - IL_0077: ldc.i8 0x1 - IL_0080: conv.i - IL_0081: ldc.i8 0xa - IL_008a: conv.i - IL_008b: sub - IL_008c: ldc.i8 0xfffffffffffffffe - IL_0095: conv.i - IL_0096: div.un - IL_0097: nop - IL_0098: br.s IL_00ea - - IL_009a: ldc.i8 0xa - IL_00a3: conv.i - IL_00a4: ldc.i8 0x1 - IL_00ad: conv.i - IL_00ae: bge.s IL_00bd - - IL_00b0: ldc.i8 0x0 - IL_00b9: conv.i - IL_00ba: nop - IL_00bb: br.s IL_00ea - - IL_00bd: ldc.i8 0xa - IL_00c6: conv.i - IL_00c7: ldc.i8 0x1 - IL_00d0: conv.i - IL_00d1: sub - IL_00d2: ldc.i8 0xfffffffffffffffe - IL_00db: conv.i - IL_00dc: not - IL_00dd: ldc.i8 0x1 - IL_00e6: conv.i - IL_00e7: add - IL_00e8: div.un - IL_00e9: nop - IL_00ea: stloc.0 - IL_00eb: sizeof [runtime]System.IntPtr - IL_00f1: ldc.i4.4 - IL_00f2: bne.un.s IL_0104 - - IL_00f4: ldloc.0 - IL_00f5: ldc.i8 0xffffffff - IL_00fe: conv.u - IL_00ff: ceq - IL_0101: nop - IL_0102: br.s IL_0112 - - IL_0104: ldloc.0 - IL_0105: ldc.i8 0xffffffffffffffff - IL_010e: conv.u - IL_010f: ceq - IL_0111: nop - IL_0112: brfalse.s IL_0160 - - IL_0114: ldc.i4.1 - IL_0115: stloc.1 - IL_0116: ldc.i8 0x0 - IL_011f: conv.i - IL_0120: stloc.2 - IL_0121: ldc.i8 0xa - IL_012a: conv.i - IL_012b: stloc.3 - IL_012c: br.s IL_015c - - IL_012e: ldloc.3 - IL_012f: call void assembly::set_c(native int) - IL_0134: ldloc.3 - IL_0135: ldc.i8 0xfffffffffffffffe - IL_013e: conv.i - IL_013f: add - IL_0140: stloc.3 - IL_0141: ldloc.2 - IL_0142: ldc.i8 0x1 - IL_014b: conv.i - IL_014c: add - IL_014d: stloc.2 - IL_014e: ldloc.2 - IL_014f: ldc.i8 0x0 - IL_0158: conv.i - IL_0159: cgt.un - IL_015b: stloc.1 - IL_015c: ldloc.1 - IL_015d: brtrue.s IL_012e - - IL_015f: ret + IL_0075: br IL_00ef - IL_0160: ldc.i8 0x0 - IL_0169: conv.i - IL_016a: ldc.i8 0xfffffffffffffffe - IL_0173: conv.i - IL_0174: bge.s IL_01ca + IL_007a: ldc.i8 0x1 + IL_0083: conv.i + IL_0084: ldc.i8 0xa + IL_008d: conv.i + IL_008e: sub + IL_008f: ldc.i8 0xfffffffffffffffe + IL_0098: conv.i + IL_0099: div.un + IL_009a: nop + IL_009b: br.s IL_00ef + + IL_009d: ldc.i8 0xa + IL_00a6: conv.i + IL_00a7: ldc.i8 0x1 + IL_00b0: conv.i + IL_00b1: bge.s IL_00c0 + + IL_00b3: ldc.i8 0x0 + IL_00bc: conv.i + IL_00bd: nop + IL_00be: br.s IL_00ef + + IL_00c0: ldc.i8 0xa + IL_00c9: conv.i + IL_00ca: ldc.i8 0x1 + IL_00d3: conv.i + IL_00d4: sub + IL_00d5: ldc.i8 0xfffffffffffffffe + IL_00de: conv.i + IL_00df: not + IL_00e0: ldc.i8 0x1 + IL_00e9: conv.i + IL_00ea: add + IL_00eb: div.un + IL_00ec: nop + IL_00ed: br.s IL_00ef + + IL_00ef: stloc.0 + IL_00f0: sizeof [runtime]System.IntPtr + IL_00f6: ldc.i4.4 + IL_00f7: bne.un.s IL_0109 + + IL_00f9: ldloc.0 + IL_00fa: ldc.i8 0xffffffff + IL_0103: conv.u + IL_0104: ceq + IL_0106: nop + IL_0107: br.s IL_0117 + + IL_0109: ldloc.0 + IL_010a: ldc.i8 0xffffffffffffffff + IL_0113: conv.u + IL_0114: ceq + IL_0116: nop + IL_0117: brfalse.s IL_0165 + + IL_0119: ldc.i4.1 + IL_011a: stloc.1 + IL_011b: ldc.i8 0x0 + IL_0124: conv.i + IL_0125: stloc.2 + IL_0126: ldc.i8 0xa + IL_012f: conv.i + IL_0130: stloc.3 + IL_0131: br.s IL_0161 + + IL_0133: ldloc.3 + IL_0134: call void assembly::set_c(native int) + IL_0139: ldloc.3 + IL_013a: ldc.i8 0xfffffffffffffffe + IL_0143: conv.i + IL_0144: add + IL_0145: stloc.3 + IL_0146: ldloc.2 + IL_0147: ldc.i8 0x1 + IL_0150: conv.i + IL_0151: add + IL_0152: stloc.2 + IL_0153: ldloc.2 + IL_0154: ldc.i8 0x0 + IL_015d: conv.i + IL_015e: cgt.un + IL_0160: stloc.1 + IL_0161: ldloc.1 + IL_0162: brtrue.s IL_0133 + + IL_0164: ret + + IL_0165: ldc.i8 0x0 + IL_016e: conv.i + IL_016f: ldc.i8 0xfffffffffffffffe + IL_0178: conv.i + IL_0179: bge.s IL_01cf + + IL_017b: ldc.i8 0x1 + IL_0184: conv.i + IL_0185: ldc.i8 0xa + IL_018e: conv.i + IL_018f: bge.s IL_01a1 + + IL_0191: ldc.i8 0x0 + IL_019a: conv.i + IL_019b: nop + IL_019c: br IL_022c + + IL_01a1: ldc.i8 0x1 + IL_01aa: conv.i + IL_01ab: ldc.i8 0xa + IL_01b4: conv.i + IL_01b5: sub + IL_01b6: ldc.i8 0xfffffffffffffffe + IL_01bf: conv.i + IL_01c0: div.un + IL_01c1: ldc.i8 0x1 + IL_01ca: conv.i + IL_01cb: add.ovf.un + IL_01cc: nop + IL_01cd: br.s IL_022c + + IL_01cf: ldc.i8 0xa + IL_01d8: conv.i + IL_01d9: ldc.i8 0x1 + IL_01e2: conv.i + IL_01e3: bge.s IL_01f2 + + IL_01e5: ldc.i8 0x0 + IL_01ee: conv.i + IL_01ef: nop + IL_01f0: br.s IL_022c + + IL_01f2: ldc.i8 0xa + IL_01fb: conv.i + IL_01fc: ldc.i8 0x1 + IL_0205: conv.i + IL_0206: sub + IL_0207: ldc.i8 0xfffffffffffffffe + IL_0210: conv.i + IL_0211: not + IL_0212: ldc.i8 0x1 + IL_021b: conv.i + IL_021c: add + IL_021d: div.un + IL_021e: ldc.i8 0x1 + IL_0227: conv.i + IL_0228: add.ovf.un + IL_0229: nop + IL_022a: br.s IL_022c + + IL_022c: stloc.2 + IL_022d: ldc.i8 0x0 + IL_0236: conv.i + IL_0237: stloc.3 + IL_0238: ldc.i8 0xa + IL_0241: conv.i + IL_0242: stloc.s V_4 + IL_0244: br.s IL_0269 - IL_0176: ldc.i8 0x1 - IL_017f: conv.i - IL_0180: ldc.i8 0xa - IL_0189: conv.i - IL_018a: bge.s IL_019c - - IL_018c: ldc.i8 0x0 - IL_0195: conv.i - IL_0196: nop - IL_0197: br IL_0225 - - IL_019c: ldc.i8 0x1 - IL_01a5: conv.i - IL_01a6: ldc.i8 0xa - IL_01af: conv.i - IL_01b0: sub - IL_01b1: ldc.i8 0xfffffffffffffffe - IL_01ba: conv.i - IL_01bb: div.un - IL_01bc: ldc.i8 0x1 - IL_01c5: conv.i - IL_01c6: add.ovf.un - IL_01c7: nop - IL_01c8: br.s IL_0225 - - IL_01ca: ldc.i8 0xa - IL_01d3: conv.i - IL_01d4: ldc.i8 0x1 - IL_01dd: conv.i - IL_01de: bge.s IL_01ed - - IL_01e0: ldc.i8 0x0 - IL_01e9: conv.i - IL_01ea: nop - IL_01eb: br.s IL_0225 - - IL_01ed: ldc.i8 0xa - IL_01f6: conv.i - IL_01f7: ldc.i8 0x1 - IL_0200: conv.i - IL_0201: sub - IL_0202: ldc.i8 0xfffffffffffffffe - IL_020b: conv.i - IL_020c: not - IL_020d: ldc.i8 0x1 - IL_0216: conv.i - IL_0217: add - IL_0218: div.un - IL_0219: ldc.i8 0x1 - IL_0222: conv.i - IL_0223: add.ovf.un - IL_0224: nop - IL_0225: stloc.2 - IL_0226: ldc.i8 0x0 - IL_022f: conv.i - IL_0230: stloc.3 - IL_0231: ldc.i8 0xa - IL_023a: conv.i - IL_023b: stloc.s V_4 - IL_023d: br.s IL_0262 - - IL_023f: ldloc.s V_4 - IL_0241: call void assembly::set_c(native int) IL_0246: ldloc.s V_4 - IL_0248: ldc.i8 0xfffffffffffffffe - IL_0251: conv.i - IL_0252: add - IL_0253: stloc.s V_4 - IL_0255: ldloc.3 - IL_0256: ldc.i8 0x1 - IL_025f: conv.i - IL_0260: add - IL_0261: stloc.3 - IL_0262: ldloc.3 - IL_0263: ldloc.2 - IL_0264: blt.un.s IL_023f - - IL_0266: ret + IL_0248: call void assembly::set_c(native int) + IL_024d: ldloc.s V_4 + IL_024f: ldc.i8 0xfffffffffffffffe + IL_0258: conv.i + IL_0259: add + IL_025a: stloc.s V_4 + IL_025c: ldloc.3 + IL_025d: ldc.i8 0x1 + IL_0266: conv.i + IL_0267: add + IL_0268: stloc.3 + IL_0269: ldloc.3 + IL_026a: ldloc.2 + IL_026b: blt.un.s IL_0246 + + IL_026d: ret } .method private specialname rtspecialname static void .cctor() cil managed @@ -1587,4 +1589,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index ef180b2502d..8e6265fa0fc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -536,7 +526,7 @@ IL_0018: ldc.i4.0 IL_0019: nop - IL_001a: br.s IL_003b + IL_001a: br.s IL_003d IL_001c: ldarg.2 IL_001d: ldarg.2 @@ -547,7 +537,7 @@ IL_0022: ldc.i4.1 IL_0023: add IL_0024: nop - IL_0025: br.s IL_003b + IL_0025: br.s IL_003d IL_0027: ldarg.2 IL_0028: ldarg.2 @@ -555,7 +545,7 @@ IL_002b: ldc.i4.0 IL_002c: nop - IL_002d: br.s IL_003b + IL_002d: br.s IL_003d IL_002f: ldarg.2 IL_0030: ldarg.2 @@ -569,28 +559,30 @@ IL_0038: ldc.i4.1 IL_0039: add IL_003a: nop - IL_003b: stloc.0 - IL_003c: ldc.i4.0 - IL_003d: stloc.1 - IL_003e: ldarg.2 - IL_003f: stloc.2 - IL_0040: br.s IL_0050 - - IL_0042: ldloc.2 - IL_0043: call void assembly::set_c(int8) - IL_0048: ldloc.2 - IL_0049: ldarg.1 - IL_004a: add - IL_004b: stloc.2 - IL_004c: ldloc.1 - IL_004d: ldc.i4.1 - IL_004e: add - IL_004f: stloc.1 - IL_0050: ldloc.1 - IL_0051: ldloc.0 - IL_0052: blt.un.s IL_0042 - - IL_0054: ret + IL_003b: br.s IL_003d + + IL_003d: stloc.0 + IL_003e: ldc.i4.0 + IL_003f: stloc.1 + IL_0040: ldarg.2 + IL_0041: stloc.2 + IL_0042: br.s IL_0052 + + IL_0044: ldloc.2 + IL_0045: call void assembly::set_c(int8) + IL_004a: ldloc.2 + IL_004b: ldarg.1 + IL_004c: add + IL_004d: stloc.2 + IL_004e: ldloc.1 + IL_004f: ldc.i4.1 + IL_0050: add + IL_0051: stloc.1 + IL_0052: ldloc.1 + IL_0053: ldloc.0 + IL_0054: blt.un.s IL_0044 + + IL_0056: ret } .method public static void f11(int8 start, @@ -764,4 +756,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index f7da45cfac5..c5d26d81dd1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -538,7 +528,7 @@ IL_0018: ldc.i4.0 IL_0019: nop - IL_001a: br.s IL_003b + IL_001a: br.s IL_003d IL_001c: ldarg.2 IL_001d: ldarg.2 @@ -549,7 +539,7 @@ IL_0022: ldc.i4.1 IL_0023: add IL_0024: nop - IL_0025: br.s IL_003b + IL_0025: br.s IL_003d IL_0027: ldarg.2 IL_0028: ldarg.2 @@ -557,7 +547,7 @@ IL_002b: ldc.i4.0 IL_002c: nop - IL_002d: br.s IL_003b + IL_002d: br.s IL_003d IL_002f: ldarg.2 IL_0030: ldarg.2 @@ -571,28 +561,30 @@ IL_0038: ldc.i4.1 IL_0039: add IL_003a: nop - IL_003b: stloc.0 - IL_003c: ldc.i4.0 - IL_003d: stloc.1 - IL_003e: ldarg.2 - IL_003f: stloc.2 - IL_0040: br.s IL_0050 - - IL_0042: ldloc.2 - IL_0043: call void assembly::set_c(int8) - IL_0048: ldloc.2 - IL_0049: ldarg.1 - IL_004a: add - IL_004b: stloc.2 - IL_004c: ldloc.1 - IL_004d: ldc.i4.1 - IL_004e: add - IL_004f: stloc.1 - IL_0050: ldloc.1 - IL_0051: ldloc.0 - IL_0052: blt.un.s IL_0042 - - IL_0054: ret + IL_003b: br.s IL_003d + + IL_003d: stloc.0 + IL_003e: ldc.i4.0 + IL_003f: stloc.1 + IL_0040: ldarg.2 + IL_0041: stloc.2 + IL_0042: br.s IL_0052 + + IL_0044: ldloc.2 + IL_0045: call void assembly::set_c(int8) + IL_004a: ldloc.2 + IL_004b: ldarg.1 + IL_004c: add + IL_004d: stloc.2 + IL_004e: ldloc.1 + IL_004f: ldc.i4.1 + IL_0050: add + IL_0051: stloc.1 + IL_0052: ldloc.1 + IL_0053: ldloc.0 + IL_0054: blt.un.s IL_0044 + + IL_0056: ret } .method public static void f11(int8 start, @@ -783,4 +775,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 82341acf6c0..16dadf5dc47 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -380,7 +370,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0039 + IL_001c: br.s IL_003b IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -388,7 +378,7 @@ IL_0021: ldarg.1 IL_0022: div.un IL_0023: nop - IL_0024: br.s IL_0039 + IL_0024: br.s IL_003b IL_0026: ldarg.0 IL_0027: ldarg.2 @@ -397,7 +387,7 @@ IL_002a: ldc.i4.0 IL_002b: conv.i8 IL_002c: nop - IL_002d: br.s IL_0039 + IL_002d: br.s IL_003b IL_002f: ldarg.0 IL_0030: ldarg.2 @@ -409,113 +399,117 @@ IL_0036: add IL_0037: div.un IL_0038: nop - IL_0039: stloc.0 - IL_003a: ldloc.0 - IL_003b: ldc.i4.m1 - IL_003c: conv.i8 - IL_003d: bne.un.s IL_0061 - - IL_003f: ldc.i4.1 - IL_0040: stloc.1 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldarg.0 - IL_0045: stloc.3 - IL_0046: br.s IL_005d - - IL_0048: ldloc.3 - IL_0049: call void assembly::set_c(int64) - IL_004e: ldloc.3 - IL_004f: ldarg.1 - IL_0050: add - IL_0051: stloc.3 - IL_0052: ldloc.2 - IL_0053: ldc.i4.1 - IL_0054: conv.i8 - IL_0055: add - IL_0056: stloc.2 - IL_0057: ldloc.2 - IL_0058: ldc.i4.0 - IL_0059: conv.i8 - IL_005a: cgt.un - IL_005c: stloc.1 - IL_005d: ldloc.1 - IL_005e: brtrue.s IL_0048 - - IL_0060: ret - - IL_0061: ldc.i4.0 - IL_0062: conv.i8 - IL_0063: ldarg.1 - IL_0064: bge.s IL_007a - - IL_0066: ldarg.2 - IL_0067: ldarg.0 - IL_0068: bge.s IL_006f - - IL_006a: ldc.i4.0 - IL_006b: conv.i8 - IL_006c: nop - IL_006d: br.s IL_0090 - - IL_006f: ldarg.2 - IL_0070: ldarg.0 - IL_0071: sub - IL_0072: ldarg.1 - IL_0073: div.un - IL_0074: ldc.i4.1 - IL_0075: conv.i8 - IL_0076: add.ovf.un - IL_0077: nop - IL_0078: br.s IL_0090 - - IL_007a: ldarg.0 - IL_007b: ldarg.2 - IL_007c: bge.s IL_0083 - - IL_007e: ldc.i4.0 - IL_007f: conv.i8 - IL_0080: nop - IL_0081: br.s IL_0090 - - IL_0083: ldarg.0 - IL_0084: ldarg.2 - IL_0085: sub - IL_0086: ldarg.1 - IL_0087: not - IL_0088: ldc.i4.1 - IL_0089: conv.i8 - IL_008a: add - IL_008b: div.un - IL_008c: ldc.i4.1 - IL_008d: conv.i8 - IL_008e: add.ovf.un - IL_008f: nop - IL_0090: stloc.2 - IL_0091: ldc.i4.0 - IL_0092: conv.i8 - IL_0093: stloc.s V_4 - IL_0095: ldarg.0 - IL_0096: stloc.3 - IL_0097: br.s IL_00aa - - IL_0099: ldloc.3 - IL_009a: call void assembly::set_c(int64) - IL_009f: ldloc.3 - IL_00a0: ldarg.1 - IL_00a1: add - IL_00a2: stloc.3 - IL_00a3: ldloc.s V_4 - IL_00a5: ldc.i4.1 - IL_00a6: conv.i8 - IL_00a7: add - IL_00a8: stloc.s V_4 - IL_00aa: ldloc.s V_4 - IL_00ac: ldloc.2 - IL_00ad: blt.un.s IL_0099 - - IL_00af: ret + IL_0039: br.s IL_003b + + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: ldc.i4.m1 + IL_003e: conv.i8 + IL_003f: bne.un.s IL_0063 + + IL_0041: ldc.i4.1 + IL_0042: stloc.1 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.0 + IL_0047: stloc.3 + IL_0048: br.s IL_005f + + IL_004a: ldloc.3 + IL_004b: call void assembly::set_c(int64) + IL_0050: ldloc.3 + IL_0051: ldarg.1 + IL_0052: add + IL_0053: stloc.3 + IL_0054: ldloc.2 + IL_0055: ldc.i4.1 + IL_0056: conv.i8 + IL_0057: add + IL_0058: stloc.2 + IL_0059: ldloc.2 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: cgt.un + IL_005e: stloc.1 + IL_005f: ldloc.1 + IL_0060: brtrue.s IL_004a + + IL_0062: ret + + IL_0063: ldc.i4.0 + IL_0064: conv.i8 + IL_0065: ldarg.1 + IL_0066: bge.s IL_007c + + IL_0068: ldarg.2 + IL_0069: ldarg.0 + IL_006a: bge.s IL_0071 + + IL_006c: ldc.i4.0 + IL_006d: conv.i8 + IL_006e: nop + IL_006f: br.s IL_0094 + + IL_0071: ldarg.2 + IL_0072: ldarg.0 + IL_0073: sub + IL_0074: ldarg.1 + IL_0075: div.un + IL_0076: ldc.i4.1 + IL_0077: conv.i8 + IL_0078: add.ovf.un + IL_0079: nop + IL_007a: br.s IL_0094 + + IL_007c: ldarg.0 + IL_007d: ldarg.2 + IL_007e: bge.s IL_0085 + + IL_0080: ldc.i4.0 + IL_0081: conv.i8 + IL_0082: nop + IL_0083: br.s IL_0094 + + IL_0085: ldarg.0 + IL_0086: ldarg.2 + IL_0087: sub + IL_0088: ldarg.1 + IL_0089: not + IL_008a: ldc.i4.1 + IL_008b: conv.i8 + IL_008c: add + IL_008d: div.un + IL_008e: ldc.i4.1 + IL_008f: conv.i8 + IL_0090: add.ovf.un + IL_0091: nop + IL_0092: br.s IL_0094 + + IL_0094: stloc.2 + IL_0095: ldc.i4.0 + IL_0096: conv.i8 + IL_0097: stloc.s V_4 + IL_0099: ldarg.0 + IL_009a: stloc.3 + IL_009b: br.s IL_00ae + + IL_009d: ldloc.3 + IL_009e: call void assembly::set_c(int64) + IL_00a3: ldloc.3 + IL_00a4: ldarg.1 + IL_00a5: add + IL_00a6: stloc.3 + IL_00a7: ldloc.s V_4 + IL_00a9: ldc.i4.1 + IL_00aa: conv.i8 + IL_00ab: add + IL_00ac: stloc.s V_4 + IL_00ae: ldloc.s V_4 + IL_00b0: ldloc.2 + IL_00b1: blt.un.s IL_009d + + IL_00b3: ret } .method public static void f8(int64 start, @@ -713,4 +707,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index f29faf3c08d..d9b37c8c314 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -382,7 +372,7 @@ IL_0019: ldc.i4.0 IL_001a: conv.i8 IL_001b: nop - IL_001c: br.s IL_0039 + IL_001c: br.s IL_003b IL_001e: ldarg.2 IL_001f: ldarg.0 @@ -390,7 +380,7 @@ IL_0021: ldarg.1 IL_0022: div.un IL_0023: nop - IL_0024: br.s IL_0039 + IL_0024: br.s IL_003b IL_0026: ldarg.0 IL_0027: ldarg.2 @@ -399,7 +389,7 @@ IL_002a: ldc.i4.0 IL_002b: conv.i8 IL_002c: nop - IL_002d: br.s IL_0039 + IL_002d: br.s IL_003b IL_002f: ldarg.0 IL_0030: ldarg.2 @@ -411,113 +401,117 @@ IL_0036: add IL_0037: div.un IL_0038: nop - IL_0039: stloc.0 - IL_003a: ldloc.0 - IL_003b: ldc.i4.m1 - IL_003c: conv.i8 - IL_003d: bne.un.s IL_0061 - - IL_003f: ldc.i4.1 - IL_0040: stloc.1 - IL_0041: ldc.i4.0 - IL_0042: conv.i8 - IL_0043: stloc.2 - IL_0044: ldarg.0 - IL_0045: stloc.3 - IL_0046: br.s IL_005d - - IL_0048: ldloc.3 - IL_0049: call void assembly::set_c(int64) - IL_004e: ldloc.3 - IL_004f: ldarg.1 - IL_0050: add - IL_0051: stloc.3 - IL_0052: ldloc.2 - IL_0053: ldc.i4.1 - IL_0054: conv.i8 - IL_0055: add - IL_0056: stloc.2 - IL_0057: ldloc.2 - IL_0058: ldc.i4.0 - IL_0059: conv.i8 - IL_005a: cgt.un - IL_005c: stloc.1 - IL_005d: ldloc.1 - IL_005e: brtrue.s IL_0048 - - IL_0060: ret - - IL_0061: ldc.i4.0 - IL_0062: conv.i8 - IL_0063: ldarg.1 - IL_0064: bge.s IL_007a - - IL_0066: ldarg.2 - IL_0067: ldarg.0 - IL_0068: bge.s IL_006f - - IL_006a: ldc.i4.0 - IL_006b: conv.i8 - IL_006c: nop - IL_006d: br.s IL_0090 - - IL_006f: ldarg.2 - IL_0070: ldarg.0 - IL_0071: sub - IL_0072: ldarg.1 - IL_0073: div.un - IL_0074: ldc.i4.1 - IL_0075: conv.i8 - IL_0076: add.ovf.un - IL_0077: nop - IL_0078: br.s IL_0090 - - IL_007a: ldarg.0 - IL_007b: ldarg.2 - IL_007c: bge.s IL_0083 - - IL_007e: ldc.i4.0 - IL_007f: conv.i8 - IL_0080: nop - IL_0081: br.s IL_0090 - - IL_0083: ldarg.0 - IL_0084: ldarg.2 - IL_0085: sub - IL_0086: ldarg.1 - IL_0087: not - IL_0088: ldc.i4.1 - IL_0089: conv.i8 - IL_008a: add - IL_008b: div.un - IL_008c: ldc.i4.1 - IL_008d: conv.i8 - IL_008e: add.ovf.un - IL_008f: nop - IL_0090: stloc.2 - IL_0091: ldc.i4.0 - IL_0092: conv.i8 - IL_0093: stloc.s V_4 - IL_0095: ldarg.0 - IL_0096: stloc.3 - IL_0097: br.s IL_00aa - - IL_0099: ldloc.3 - IL_009a: call void assembly::set_c(int64) - IL_009f: ldloc.3 - IL_00a0: ldarg.1 - IL_00a1: add - IL_00a2: stloc.3 - IL_00a3: ldloc.s V_4 - IL_00a5: ldc.i4.1 - IL_00a6: conv.i8 - IL_00a7: add - IL_00a8: stloc.s V_4 - IL_00aa: ldloc.s V_4 - IL_00ac: ldloc.2 - IL_00ad: blt.un.s IL_0099 - - IL_00af: ret + IL_0039: br.s IL_003b + + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: ldc.i4.m1 + IL_003e: conv.i8 + IL_003f: bne.un.s IL_0063 + + IL_0041: ldc.i4.1 + IL_0042: stloc.1 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.0 + IL_0047: stloc.3 + IL_0048: br.s IL_005f + + IL_004a: ldloc.3 + IL_004b: call void assembly::set_c(int64) + IL_0050: ldloc.3 + IL_0051: ldarg.1 + IL_0052: add + IL_0053: stloc.3 + IL_0054: ldloc.2 + IL_0055: ldc.i4.1 + IL_0056: conv.i8 + IL_0057: add + IL_0058: stloc.2 + IL_0059: ldloc.2 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: cgt.un + IL_005e: stloc.1 + IL_005f: ldloc.1 + IL_0060: brtrue.s IL_004a + + IL_0062: ret + + IL_0063: ldc.i4.0 + IL_0064: conv.i8 + IL_0065: ldarg.1 + IL_0066: bge.s IL_007c + + IL_0068: ldarg.2 + IL_0069: ldarg.0 + IL_006a: bge.s IL_0071 + + IL_006c: ldc.i4.0 + IL_006d: conv.i8 + IL_006e: nop + IL_006f: br.s IL_0094 + + IL_0071: ldarg.2 + IL_0072: ldarg.0 + IL_0073: sub + IL_0074: ldarg.1 + IL_0075: div.un + IL_0076: ldc.i4.1 + IL_0077: conv.i8 + IL_0078: add.ovf.un + IL_0079: nop + IL_007a: br.s IL_0094 + + IL_007c: ldarg.0 + IL_007d: ldarg.2 + IL_007e: bge.s IL_0085 + + IL_0080: ldc.i4.0 + IL_0081: conv.i8 + IL_0082: nop + IL_0083: br.s IL_0094 + + IL_0085: ldarg.0 + IL_0086: ldarg.2 + IL_0087: sub + IL_0088: ldarg.1 + IL_0089: not + IL_008a: ldc.i4.1 + IL_008b: conv.i8 + IL_008c: add + IL_008d: div.un + IL_008e: ldc.i4.1 + IL_008f: conv.i8 + IL_0090: add.ovf.un + IL_0091: nop + IL_0092: br.s IL_0094 + + IL_0094: stloc.2 + IL_0095: ldc.i4.0 + IL_0096: conv.i8 + IL_0097: stloc.s V_4 + IL_0099: ldarg.0 + IL_009a: stloc.3 + IL_009b: br.s IL_00ae + + IL_009d: ldloc.3 + IL_009e: call void assembly::set_c(int64) + IL_00a3: ldloc.3 + IL_00a4: ldarg.1 + IL_00a5: add + IL_00a6: stloc.3 + IL_00a7: ldloc.s V_4 + IL_00a9: ldc.i4.1 + IL_00aa: conv.i8 + IL_00ab: add + IL_00ac: stloc.s V_4 + IL_00ae: ldloc.s V_4 + IL_00b0: ldloc.2 + IL_00b1: blt.un.s IL_009d + + IL_00b3: ret } .method public static void f8(int64 start, @@ -732,4 +726,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare04.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare04.fsx.il.net472.bsl index 36458108dd1..ee6fbc129b0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare04.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare04.fsx.il.net472.bsl @@ -21,16 +21,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -65,7 +55,7 @@ IL_0003: nop IL_0004: ldc.i4.0 IL_0005: stloc.1 - IL_0006: br IL_0092 + IL_0006: br IL_0097 IL_000b: ldstr "5" IL_0010: ldstr "5" @@ -73,57 +63,59 @@ string) IL_001a: stloc.2 IL_001b: ldloc.2 - IL_001c: brfalse.s IL_0022 + IL_001c: brfalse.s IL_0025 IL_001e: ldloc.2 IL_001f: nop - IL_0020: br.s IL_008d - - IL_0022: ldc.r8 6.0999999999999996 - IL_002b: ldc.r8 7.0999999999999996 - IL_0034: clt - IL_0036: brfalse.s IL_003c - - IL_0038: ldc.i4.m1 - IL_0039: nop - IL_003a: br.s IL_008d - - IL_003c: ldc.r8 6.0999999999999996 - IL_0045: ldc.r8 7.0999999999999996 - IL_004e: cgt - IL_0050: brfalse.s IL_0056 - - IL_0052: ldc.i4.1 - IL_0053: nop - IL_0054: br.s IL_008d - - IL_0056: ldc.r8 6.0999999999999996 - IL_005f: ldc.r8 7.0999999999999996 - IL_0068: ceq - IL_006a: brfalse.s IL_0070 - - IL_006c: ldc.i4.0 - IL_006d: nop - IL_006e: br.s IL_008d - - IL_0070: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0075: ldc.r8 6.0999999999999996 - IL_007e: ldc.r8 7.0999999999999996 - IL_0087: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, + IL_0020: br IL_0092 + + IL_0025: ldc.r8 6.0999999999999996 + IL_002e: ldc.r8 7.0999999999999996 + IL_0037: clt + IL_0039: brfalse.s IL_003f + + IL_003b: ldc.i4.m1 + IL_003c: nop + IL_003d: br.s IL_0092 + + IL_003f: ldc.r8 6.0999999999999996 + IL_0048: ldc.r8 7.0999999999999996 + IL_0051: cgt + IL_0053: brfalse.s IL_0059 + + IL_0055: ldc.i4.1 + IL_0056: nop + IL_0057: br.s IL_0092 + + IL_0059: ldc.r8 6.0999999999999996 + IL_0062: ldc.r8 7.0999999999999996 + IL_006b: ceq + IL_006d: brfalse.s IL_0073 + + IL_006f: ldc.i4.0 + IL_0070: nop + IL_0071: br.s IL_0092 + + IL_0073: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0078: ldc.r8 6.0999999999999996 + IL_0081: ldc.r8 7.0999999999999996 + IL_008a: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, !!0, !!0) - IL_008c: nop - IL_008d: stloc.0 - IL_008e: ldloc.1 - IL_008f: ldc.i4.1 - IL_0090: add - IL_0091: stloc.1 - IL_0092: ldloc.1 - IL_0093: ldc.i4 0x989681 - IL_0098: blt IL_000b - - IL_009d: ldloc.0 - IL_009e: ret + IL_008f: nop + IL_0090: br.s IL_0092 + + IL_0092: stloc.0 + IL_0093: ldloc.1 + IL_0094: ldc.i4.1 + IL_0095: add + IL_0096: stloc.1 + IL_0097: ldloc.1 + IL_0098: ldc.i4 0x989681 + IL_009d: blt IL_000b + + IL_00a2: ldloc.0 + IL_00a3: ret } } @@ -147,4 +139,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare04.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare04.fsx.il.netcore.bsl index 3f6edd9a68f..339f592d217 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare04.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare04.fsx.il.netcore.bsl @@ -21,16 +21,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -65,7 +55,7 @@ IL_0003: nop IL_0004: ldc.i4.0 IL_0005: stloc.1 - IL_0006: br IL_0092 + IL_0006: br IL_0097 IL_000b: ldstr "5" IL_0010: ldstr "5" @@ -73,57 +63,59 @@ string) IL_001a: stloc.2 IL_001b: ldloc.2 - IL_001c: brfalse.s IL_0022 + IL_001c: brfalse.s IL_0025 IL_001e: ldloc.2 IL_001f: nop - IL_0020: br.s IL_008d - - IL_0022: ldc.r8 6.0999999999999996 - IL_002b: ldc.r8 7.0999999999999996 - IL_0034: clt - IL_0036: brfalse.s IL_003c - - IL_0038: ldc.i4.m1 - IL_0039: nop - IL_003a: br.s IL_008d - - IL_003c: ldc.r8 6.0999999999999996 - IL_0045: ldc.r8 7.0999999999999996 - IL_004e: cgt - IL_0050: brfalse.s IL_0056 - - IL_0052: ldc.i4.1 - IL_0053: nop - IL_0054: br.s IL_008d - - IL_0056: ldc.r8 6.0999999999999996 - IL_005f: ldc.r8 7.0999999999999996 - IL_0068: ceq - IL_006a: brfalse.s IL_0070 - - IL_006c: ldc.i4.0 - IL_006d: nop - IL_006e: br.s IL_008d - - IL_0070: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0075: ldc.r8 6.0999999999999996 - IL_007e: ldc.r8 7.0999999999999996 - IL_0087: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, + IL_0020: br IL_0092 + + IL_0025: ldc.r8 6.0999999999999996 + IL_002e: ldc.r8 7.0999999999999996 + IL_0037: clt + IL_0039: brfalse.s IL_003f + + IL_003b: ldc.i4.m1 + IL_003c: nop + IL_003d: br.s IL_0092 + + IL_003f: ldc.r8 6.0999999999999996 + IL_0048: ldc.r8 7.0999999999999996 + IL_0051: cgt + IL_0053: brfalse.s IL_0059 + + IL_0055: ldc.i4.1 + IL_0056: nop + IL_0057: br.s IL_0092 + + IL_0059: ldc.r8 6.0999999999999996 + IL_0062: ldc.r8 7.0999999999999996 + IL_006b: ceq + IL_006d: brfalse.s IL_0073 + + IL_006f: ldc.i4.0 + IL_0070: nop + IL_0071: br.s IL_0092 + + IL_0073: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0078: ldc.r8 6.0999999999999996 + IL_0081: ldc.r8 7.0999999999999996 + IL_008a: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, !!0, !!0) - IL_008c: nop - IL_008d: stloc.0 - IL_008e: ldloc.1 - IL_008f: ldc.i4.1 - IL_0090: add - IL_0091: stloc.1 - IL_0092: ldloc.1 - IL_0093: ldc.i4 0x989681 - IL_0098: blt IL_000b - - IL_009d: ldloc.0 - IL_009e: ret + IL_008f: nop + IL_0090: br.s IL_0092 + + IL_0092: stloc.0 + IL_0093: ldloc.1 + IL_0094: ldc.i4.1 + IL_0095: add + IL_0096: stloc.1 + IL_0097: ldloc.1 + IL_0098: ldc.i4 0x989681 + IL_009d: blt IL_000b + + IL_00a2: ldloc.0 + IL_00a3: ret } } @@ -147,4 +139,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.il.bsl index 3502e1e886d..a8aeb7f09da 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.il.bsl @@ -45,9 +45,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname - instance void .ctor(int32 pc, - class [runtime]System.Tuple`2 current) cil managed + .method public specialname rtspecialname instance void .ctor(int32 pc, class [runtime]System.Tuple`2 current) cil managed { .maxstack 8 @@ -77,47 +75,49 @@ IL_0019: br.s IL_0024 IL_001b: nop - IL_001c: br.s IL_003b + IL_001c: br.s IL_003d IL_001e: nop - IL_001f: br.s IL_0051 + IL_001f: br.s IL_0053 IL_0021: nop - IL_0022: br.s IL_0058 + IL_0022: br.s IL_005a IL_0024: nop - IL_0025: ldarg.0 - IL_0026: ldc.i4.1 - IL_0027: stfld int32 assembly/seq1@9::pc - IL_002c: ldarg.0 - IL_002d: ldc.i4.1 - IL_002e: ldc.i4.1 - IL_002f: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0034: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current - IL_0039: ldc.i4.1 - IL_003a: ret - - IL_003b: ldarg.0 - IL_003c: ldc.i4.2 - IL_003d: stfld int32 assembly/seq1@9::pc - IL_0042: ldarg.0 - IL_0043: ldc.i4.2 - IL_0044: ldc.i4.2 - IL_0045: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_004a: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current - IL_004f: ldc.i4.1 - IL_0050: ret - - IL_0051: ldarg.0 - IL_0052: ldc.i4.3 - IL_0053: stfld int32 assembly/seq1@9::pc - IL_0058: ldarg.0 - IL_0059: ldnull - IL_005a: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current - IL_005f: ldc.i4.0 - IL_0060: ret + IL_0025: br.s IL_0027 + + IL_0027: ldarg.0 + IL_0028: ldc.i4.1 + IL_0029: stfld int32 assembly/seq1@9::pc + IL_002e: ldarg.0 + IL_002f: ldc.i4.1 + IL_0030: ldc.i4.1 + IL_0031: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0036: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current + IL_003b: ldc.i4.1 + IL_003c: ret + + IL_003d: ldarg.0 + IL_003e: ldc.i4.2 + IL_003f: stfld int32 assembly/seq1@9::pc + IL_0044: ldarg.0 + IL_0045: ldc.i4.2 + IL_0046: ldc.i4.2 + IL_0047: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_004c: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current + IL_0051: ldc.i4.1 + IL_0052: ret + + IL_0053: ldarg.0 + IL_0054: ldc.i4.3 + IL_0055: stfld int32 assembly/seq1@9::pc + IL_005a: ldarg.0 + IL_005b: ldnull + IL_005c: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current + IL_0061: ldc.i4.0 + IL_0062: ret } .method public strict virtual instance void Close() cil managed @@ -144,26 +144,28 @@ IL_001b: br.s IL_0029 IL_001d: nop - IL_001e: br.s IL_002e + IL_001e: br.s IL_0030 IL_0020: nop - IL_0021: br.s IL_002c + IL_0021: br.s IL_002e IL_0023: nop - IL_0024: br.s IL_002a + IL_0024: br.s IL_002c IL_0026: nop - IL_0027: br.s IL_002e + IL_0027: br.s IL_0030 IL_0029: nop - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002a: br.s IL_002c IL_002c: ldc.i4.0 IL_002d: ret IL_002e: ldc.i4.0 IL_002f: ret + + IL_0030: ldc.i4.0 + IL_0031: ret } .method public strict virtual instance class [runtime]System.Tuple`2 get_LastGenerated() cil managed @@ -451,8 +453,8 @@ IL_005b: ldc.i4.1 IL_005c: ldc.i4.s 10 IL_005e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) + int32, + int32) IL_0063: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [runtime]System.Collections.Generic.IEnumerable`1) IL_0068: dup IL_0069: stsfld class [runtime]System.Collections.Generic.IEnumerable`1 ''.$assembly::aseq@7 @@ -460,16 +462,16 @@ IL_006f: ldc.i4.1 IL_0070: ldc.i4.1 IL_0071: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_0076: ldc.i4.2 IL_0077: ldc.i4.2 IL_0078: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_007d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::get_Empty() IL_0082: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Cons(!0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0087: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Cons(!0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_008c: dup IL_008d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$assembly::list1@8 IL_0092: stloc.3 @@ -487,14 +489,14 @@ IL_00aa: ldc.i4.1 IL_00ab: ldc.i4.1 IL_00ac: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_00b1: stelem class [runtime]System.Tuple`2 IL_00b6: dup IL_00b7: ldc.i4.1 IL_00b8: ldc.i4.2 IL_00b9: ldc.i4.2 IL_00ba: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_00bf: stelem class [runtime]System.Tuple`2 IL_00c4: dup IL_00c5: stsfld class [runtime]System.Tuple`2[] ''.$assembly::array1@10 @@ -578,9 +580,9 @@ IL_0193: call int32[0...,0...] assembly::get_a3() IL_0198: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Base2(!!0[0...,0...]) IL_019d: newobj instance void class [runtime]System.Tuple`4::.ctor(!0, - !1, - !2, - !3) + !1, + !2, + !3) IL_01a2: stloc.s V_15 IL_01a4: ldloc.s V_15 IL_01a6: stloc.s V_16 @@ -607,8 +609,8 @@ IL_01d9: call int32[0...,0...,0...] assembly::get_array3D() IL_01de: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Length3(!!0[0...,0...,0...]) IL_01e3: newobj instance void class [runtime]System.Tuple`3::.ctor(!0, - !1, - !2) + !1, + !2) IL_01e8: stloc.s V_18 IL_01ea: ldloc.s V_18 IL_01ec: stloc.s V_19 @@ -641,9 +643,9 @@ IL_022b: call int32[0...,0...,0...,0...] assembly::get_array4D() IL_0230: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length4(!!0[0...,0...,0...,0...]) IL_0235: newobj instance void class [runtime]System.Tuple`4::.ctor(!0, - !1, - !2, - !3) + !1, + !2, + !3) IL_023a: stloc.s V_21 IL_023c: ldloc.s V_21 IL_023e: stloc.s V_22 @@ -680,4 +682,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.il.bsl index 35494e25b75..3a1c51e5497 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -55,9 +45,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname - instance void .ctor(int32 pc, - class [runtime]System.Tuple`2 current) cil managed + .method public specialname rtspecialname instance void .ctor(int32 pc, class [runtime]System.Tuple`2 current) cil managed { .maxstack 8 @@ -87,47 +75,49 @@ IL_0019: br.s IL_0024 IL_001b: nop - IL_001c: br.s IL_003b + IL_001c: br.s IL_003d IL_001e: nop - IL_001f: br.s IL_0051 + IL_001f: br.s IL_0053 IL_0021: nop - IL_0022: br.s IL_0058 + IL_0022: br.s IL_005a IL_0024: nop - IL_0025: ldarg.0 - IL_0026: ldc.i4.1 - IL_0027: stfld int32 assembly/seq1@9::pc - IL_002c: ldarg.0 - IL_002d: ldc.i4.1 - IL_002e: ldc.i4.1 - IL_002f: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + IL_0025: br.s IL_0027 + + IL_0027: ldarg.0 + IL_0028: ldc.i4.1 + IL_0029: stfld int32 assembly/seq1@9::pc + IL_002e: ldarg.0 + IL_002f: ldc.i4.1 + IL_0030: ldc.i4.1 + IL_0031: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, !1) - IL_0034: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current - IL_0039: ldc.i4.1 - IL_003a: ret - - IL_003b: ldarg.0 - IL_003c: ldc.i4.2 - IL_003d: stfld int32 assembly/seq1@9::pc - IL_0042: ldarg.0 - IL_0043: ldc.i4.2 - IL_0044: ldc.i4.2 - IL_0045: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + IL_0036: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current + IL_003b: ldc.i4.1 + IL_003c: ret + + IL_003d: ldarg.0 + IL_003e: ldc.i4.2 + IL_003f: stfld int32 assembly/seq1@9::pc + IL_0044: ldarg.0 + IL_0045: ldc.i4.2 + IL_0046: ldc.i4.2 + IL_0047: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, !1) - IL_004a: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current - IL_004f: ldc.i4.1 - IL_0050: ret - - IL_0051: ldarg.0 - IL_0052: ldc.i4.3 - IL_0053: stfld int32 assembly/seq1@9::pc - IL_0058: ldarg.0 - IL_0059: ldnull - IL_005a: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current - IL_005f: ldc.i4.0 - IL_0060: ret + IL_004c: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current + IL_0051: ldc.i4.1 + IL_0052: ret + + IL_0053: ldarg.0 + IL_0054: ldc.i4.3 + IL_0055: stfld int32 assembly/seq1@9::pc + IL_005a: ldarg.0 + IL_005b: ldnull + IL_005c: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current + IL_0061: ldc.i4.0 + IL_0062: ret } .method public strict virtual instance void Close() cil managed @@ -154,26 +144,28 @@ IL_001b: br.s IL_0029 IL_001d: nop - IL_001e: br.s IL_002e + IL_001e: br.s IL_0030 IL_0020: nop - IL_0021: br.s IL_002c + IL_0021: br.s IL_002e IL_0023: nop - IL_0024: br.s IL_002a + IL_0024: br.s IL_002c IL_0026: nop - IL_0027: br.s IL_002e + IL_0027: br.s IL_0030 IL_0029: nop - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002a: br.s IL_002c IL_002c: ldc.i4.0 IL_002d: ret IL_002e: ldc.i4.0 IL_002f: ret + + IL_0030: ldc.i4.0 + IL_0031: ret } .method public strict virtual instance class [runtime]System.Tuple`2 get_LastGenerated() cil managed @@ -676,4 +668,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOff.il.bsl index aa9d8f6b28b..77539b77ff3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -59,9 +49,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname - instance void .ctor(int32 pc, - int32 current) cil managed + .method public specialname rtspecialname instance void .ctor(int32 pc, int32 current) cil managed { .maxstack 8 @@ -79,7 +67,7 @@ .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { - .maxstack 8 + .maxstack 6 IL_0000: ldarg.0 IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc IL_0006: ldc.i4.1 @@ -90,29 +78,31 @@ IL_0015: br.s IL_001d IL_0017: nop - IL_0018: br.s IL_002e + IL_0018: br.s IL_0030 IL_001a: nop - IL_001b: br.s IL_0035 + IL_001b: br.s IL_0037 IL_001d: nop - IL_001e: ldarg.0 - IL_001f: ldc.i4.1 - IL_0020: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc - IL_0025: ldarg.0 - IL_0026: ldc.i4.1 - IL_0027: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current - IL_002c: ldc.i4.1 - IL_002d: ret - - IL_002e: ldarg.0 - IL_002f: ldc.i4.2 - IL_0030: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc - IL_0035: ldarg.0 - IL_0036: ldc.i4.0 - IL_0037: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current - IL_003c: ldc.i4.0 - IL_003d: ret + IL_001e: br.s IL_0020 + + IL_0020: ldarg.0 + IL_0021: ldc.i4.1 + IL_0022: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0027: ldarg.0 + IL_0028: ldc.i4.1 + IL_0029: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current + IL_002e: ldc.i4.1 + IL_002f: ret + + IL_0030: ldarg.0 + IL_0031: ldc.i4.2 + IL_0032: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0037: ldarg.0 + IL_0038: ldc.i4.0 + IL_0039: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current + IL_003e: ldc.i4.0 + IL_003f: ret } .method public strict virtual instance void Close() cil managed @@ -138,20 +128,22 @@ IL_0017: br.s IL_0022 IL_0019: nop - IL_001a: br.s IL_0025 + IL_001a: br.s IL_0027 IL_001c: nop - IL_001d: br.s IL_0023 + IL_001d: br.s IL_0025 IL_001f: nop - IL_0020: br.s IL_0025 + IL_0020: br.s IL_0027 IL_0022: nop - IL_0023: ldc.i4.0 - IL_0024: ret + IL_0023: br.s IL_0025 IL_0025: ldc.i4.0 IL_0026: ret + + IL_0027: ldc.i4.0 + IL_0028: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -222,4 +214,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOn.il.bsl index d90f88246bc..6b031a71388 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -59,9 +49,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname - instance void .ctor(int32 pc, - int32 current) cil managed + .method public specialname rtspecialname instance void .ctor(int32 pc, int32 current) cil managed { .maxstack 8 @@ -79,7 +67,7 @@ .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { - .maxstack 8 + .maxstack 6 IL_0000: ldarg.0 IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc IL_0006: ldc.i4.1 @@ -90,29 +78,31 @@ IL_0015: br.s IL_001d IL_0017: nop - IL_0018: br.s IL_002e + IL_0018: br.s IL_0030 IL_001a: nop - IL_001b: br.s IL_0035 + IL_001b: br.s IL_0037 IL_001d: nop - IL_001e: ldarg.0 - IL_001f: ldc.i4.1 - IL_0020: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc - IL_0025: ldarg.0 - IL_0026: ldc.i4.1 - IL_0027: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current - IL_002c: ldc.i4.1 - IL_002d: ret - - IL_002e: ldarg.0 - IL_002f: ldc.i4.2 - IL_0030: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc - IL_0035: ldarg.0 - IL_0036: ldc.i4.0 - IL_0037: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current - IL_003c: ldc.i4.0 - IL_003d: ret + IL_001e: br.s IL_0020 + + IL_0020: ldarg.0 + IL_0021: ldc.i4.1 + IL_0022: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0027: ldarg.0 + IL_0028: ldc.i4.1 + IL_0029: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current + IL_002e: ldc.i4.1 + IL_002f: ret + + IL_0030: ldarg.0 + IL_0031: ldc.i4.2 + IL_0032: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0037: ldarg.0 + IL_0038: ldc.i4.0 + IL_0039: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current + IL_003e: ldc.i4.0 + IL_003f: ret } .method public strict virtual instance void Close() cil managed @@ -138,20 +128,22 @@ IL_0017: br.s IL_0022 IL_0019: nop - IL_001a: br.s IL_0025 + IL_001a: br.s IL_0027 IL_001c: nop - IL_001d: br.s IL_0023 + IL_001d: br.s IL_0025 IL_001f: nop - IL_0020: br.s IL_0025 + IL_0020: br.s IL_0027 IL_0022: nop - IL_0023: ldc.i4.0 - IL_0024: ret + IL_0023: br.s IL_0025 IL_0025: ldc.i4.0 IL_0026: ret + + IL_0027: ldc.i4.0 + IL_0028: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -260,4 +252,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOff.il.bsl index e0dbc87787d..b635c0565cf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -59,9 +49,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname - instance void .ctor(int32 pc, - int32 current) cil managed + .method public specialname rtspecialname instance void .ctor(int32 pc, int32 current) cil managed { .maxstack 8 @@ -91,49 +79,51 @@ IL_0019: br.s IL_0024 IL_001b: nop - IL_001c: br.s IL_0045 + IL_001c: br.s IL_0047 IL_001e: nop - IL_001f: br.s IL_0065 + IL_001f: br.s IL_0067 IL_0021: nop - IL_0022: br.s IL_006c + IL_0022: br.s IL_006e IL_0024: nop - IL_0025: ldstr "hello" - IL_002a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_002f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0034: pop - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc - IL_003c: ldarg.0 - IL_003d: ldc.i4.1 - IL_003e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current - IL_0043: ldc.i4.1 - IL_0044: ret - - IL_0045: ldstr "goodbye" - IL_004a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_004f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0054: pop - IL_0055: ldarg.0 - IL_0056: ldc.i4.2 - IL_0057: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc - IL_005c: ldarg.0 - IL_005d: ldc.i4.2 - IL_005e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current - IL_0063: ldc.i4.1 - IL_0064: ret - - IL_0065: ldarg.0 - IL_0066: ldc.i4.3 - IL_0067: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc - IL_006c: ldarg.0 - IL_006d: ldc.i4.0 - IL_006e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current - IL_0073: ldc.i4.0 - IL_0074: ret + IL_0025: br.s IL_0027 + + IL_0027: ldstr "hello" + IL_002c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0031: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0036: pop + IL_0037: ldarg.0 + IL_0038: ldc.i4.1 + IL_0039: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_003e: ldarg.0 + IL_003f: ldc.i4.1 + IL_0040: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_0045: ldc.i4.1 + IL_0046: ret + + IL_0047: ldstr "goodbye" + IL_004c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0051: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0056: pop + IL_0057: ldarg.0 + IL_0058: ldc.i4.2 + IL_0059: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_005e: ldarg.0 + IL_005f: ldc.i4.2 + IL_0060: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_0065: ldc.i4.1 + IL_0066: ret + + IL_0067: ldarg.0 + IL_0068: ldc.i4.3 + IL_0069: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_006e: ldarg.0 + IL_006f: ldc.i4.0 + IL_0070: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_0075: ldc.i4.0 + IL_0076: ret } .method public strict virtual instance void Close() cil managed @@ -160,26 +150,28 @@ IL_001b: br.s IL_0029 IL_001d: nop - IL_001e: br.s IL_002e + IL_001e: br.s IL_0030 IL_0020: nop - IL_0021: br.s IL_002c + IL_0021: br.s IL_002e IL_0023: nop - IL_0024: br.s IL_002a + IL_0024: br.s IL_002c IL_0026: nop - IL_0027: br.s IL_002e + IL_0027: br.s IL_0030 IL_0029: nop - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002a: br.s IL_002c IL_002c: ldc.i4.0 IL_002d: ret IL_002e: ldc.i4.0 IL_002f: ret + + IL_0030: ldc.i4.0 + IL_0031: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -250,4 +242,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOn.il.bsl index a95aef22f7f..8e3bd44980c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -59,9 +49,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname - instance void .ctor(int32 pc, - int32 current) cil managed + .method public specialname rtspecialname instance void .ctor(int32 pc, int32 current) cil managed { .maxstack 8 @@ -91,49 +79,51 @@ IL_0019: br.s IL_0024 IL_001b: nop - IL_001c: br.s IL_0045 + IL_001c: br.s IL_0047 IL_001e: nop - IL_001f: br.s IL_0065 + IL_001f: br.s IL_0067 IL_0021: nop - IL_0022: br.s IL_006c + IL_0022: br.s IL_006e IL_0024: nop - IL_0025: ldstr "hello" - IL_002a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_002f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0034: pop - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc - IL_003c: ldarg.0 - IL_003d: ldc.i4.1 - IL_003e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current - IL_0043: ldc.i4.1 - IL_0044: ret - - IL_0045: ldstr "goodbye" - IL_004a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_004f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0054: pop - IL_0055: ldarg.0 - IL_0056: ldc.i4.2 - IL_0057: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc - IL_005c: ldarg.0 - IL_005d: ldc.i4.2 - IL_005e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current - IL_0063: ldc.i4.1 - IL_0064: ret - - IL_0065: ldarg.0 - IL_0066: ldc.i4.3 - IL_0067: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc - IL_006c: ldarg.0 - IL_006d: ldc.i4.0 - IL_006e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current - IL_0073: ldc.i4.0 - IL_0074: ret + IL_0025: br.s IL_0027 + + IL_0027: ldstr "hello" + IL_002c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0031: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0036: pop + IL_0037: ldarg.0 + IL_0038: ldc.i4.1 + IL_0039: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_003e: ldarg.0 + IL_003f: ldc.i4.1 + IL_0040: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_0045: ldc.i4.1 + IL_0046: ret + + IL_0047: ldstr "goodbye" + IL_004c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0051: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0056: pop + IL_0057: ldarg.0 + IL_0058: ldc.i4.2 + IL_0059: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_005e: ldarg.0 + IL_005f: ldc.i4.2 + IL_0060: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_0065: ldc.i4.1 + IL_0066: ret + + IL_0067: ldarg.0 + IL_0068: ldc.i4.3 + IL_0069: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_006e: ldarg.0 + IL_006f: ldc.i4.0 + IL_0070: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current + IL_0075: ldc.i4.0 + IL_0076: ret } .method public strict virtual instance void Close() cil managed @@ -160,26 +150,28 @@ IL_001b: br.s IL_0029 IL_001d: nop - IL_001e: br.s IL_002e + IL_001e: br.s IL_0030 IL_0020: nop - IL_0021: br.s IL_002c + IL_0021: br.s IL_002e IL_0023: nop - IL_0024: br.s IL_002a + IL_0024: br.s IL_002c IL_0026: nop - IL_0027: br.s IL_002e + IL_0027: br.s IL_0030 IL_0029: nop - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002a: br.s IL_002c IL_002c: ldc.i4.0 IL_002d: ret IL_002e: ldc.i4.0 IL_002f: ret + + IL_0030: ldc.i4.0 + IL_0031: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -288,4 +280,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOff.il.bsl index 760daabc6ef..9c80ff3030b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -95,51 +85,53 @@ IL_0015: br.s IL_001d IL_0017: nop - IL_0018: br.s IL_0062 + IL_0018: br.s IL_0064 IL_001a: nop - IL_001b: br.s IL_0077 + IL_001b: br.s IL_0079 IL_001d: nop - IL_001e: br.s IL_0062 - - IL_0020: ldarg.0 - IL_0021: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x - IL_0026: ldarg.0 - IL_0027: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x - IL_002c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0031: ldc.i4.1 - IL_0032: add - IL_0033: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_0038: ldstr "hello" - IL_003d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0047: pop - IL_0048: ldarg.0 - IL_0049: ldc.i4.1 - IL_004a: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc - IL_004f: ldarg.0 - IL_0050: ldarg.0 - IL_0051: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x - IL_0056: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_005b: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::current - IL_0060: ldc.i4.1 - IL_0061: ret - - IL_0062: ldarg.0 - IL_0063: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x - IL_0068: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_006d: ldc.i4.4 - IL_006e: blt.s IL_0020 - - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc - IL_0077: ldarg.0 - IL_0078: ldc.i4.0 - IL_0079: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::current - IL_007e: ldc.i4.0 - IL_007f: ret + IL_001e: br.s IL_0020 + + IL_0020: br.s IL_0064 + + IL_0022: ldarg.0 + IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x + IL_0028: ldarg.0 + IL_0029: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x + IL_002e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0033: ldc.i4.1 + IL_0034: add + IL_0035: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_003a: ldstr "hello" + IL_003f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0044: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0049: pop + IL_004a: ldarg.0 + IL_004b: ldc.i4.1 + IL_004c: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc + IL_0051: ldarg.0 + IL_0052: ldarg.0 + IL_0053: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x + IL_0058: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_005d: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::current + IL_0062: ldc.i4.1 + IL_0063: ret + + IL_0064: ldarg.0 + IL_0065: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x + IL_006a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_006f: ldc.i4.4 + IL_0070: blt.s IL_0022 + + IL_0072: ldarg.0 + IL_0073: ldc.i4.2 + IL_0074: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc + IL_0079: ldarg.0 + IL_007a: ldc.i4.0 + IL_007b: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::current + IL_0080: ldc.i4.0 + IL_0081: ret } .method public strict virtual instance void Close() cil managed @@ -165,20 +157,22 @@ IL_0017: br.s IL_0022 IL_0019: nop - IL_001a: br.s IL_0025 + IL_001a: br.s IL_0027 IL_001c: nop - IL_001d: br.s IL_0023 + IL_001d: br.s IL_0025 IL_001f: nop - IL_0020: br.s IL_0025 + IL_0020: br.s IL_0027 IL_0022: nop - IL_0023: ldc.i4.0 - IL_0024: ret + IL_0023: br.s IL_0025 IL_0025: ldc.i4.0 IL_0026: ret + + IL_0027: ldc.i4.0 + IL_0028: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -258,4 +252,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOn.il.bsl index 995d0770777..253fc4d06dd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -95,51 +85,53 @@ IL_0015: br.s IL_001d IL_0017: nop - IL_0018: br.s IL_0062 + IL_0018: br.s IL_0064 IL_001a: nop - IL_001b: br.s IL_0077 + IL_001b: br.s IL_0079 IL_001d: nop - IL_001e: br.s IL_0062 - - IL_0020: ldarg.0 - IL_0021: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x - IL_0026: ldarg.0 - IL_0027: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x - IL_002c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0031: ldc.i4.1 - IL_0032: add - IL_0033: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_0038: ldstr "hello" - IL_003d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0047: pop - IL_0048: ldarg.0 - IL_0049: ldc.i4.1 - IL_004a: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc - IL_004f: ldarg.0 - IL_0050: ldarg.0 - IL_0051: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x - IL_0056: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_005b: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::current - IL_0060: ldc.i4.1 - IL_0061: ret - - IL_0062: ldarg.0 - IL_0063: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x - IL_0068: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_006d: ldc.i4.4 - IL_006e: blt.s IL_0020 - - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc - IL_0077: ldarg.0 - IL_0078: ldc.i4.0 - IL_0079: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::current - IL_007e: ldc.i4.0 - IL_007f: ret + IL_001e: br.s IL_0020 + + IL_0020: br.s IL_0064 + + IL_0022: ldarg.0 + IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x + IL_0028: ldarg.0 + IL_0029: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x + IL_002e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0033: ldc.i4.1 + IL_0034: add + IL_0035: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_003a: ldstr "hello" + IL_003f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0044: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0049: pop + IL_004a: ldarg.0 + IL_004b: ldc.i4.1 + IL_004c: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc + IL_0051: ldarg.0 + IL_0052: ldarg.0 + IL_0053: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x + IL_0058: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_005d: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::current + IL_0062: ldc.i4.1 + IL_0063: ret + + IL_0064: ldarg.0 + IL_0065: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x + IL_006a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_006f: ldc.i4.4 + IL_0070: blt.s IL_0022 + + IL_0072: ldarg.0 + IL_0073: ldc.i4.2 + IL_0074: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc + IL_0079: ldarg.0 + IL_007a: ldc.i4.0 + IL_007b: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::current + IL_0080: ldc.i4.0 + IL_0081: ret } .method public strict virtual instance void Close() cil managed @@ -165,20 +157,22 @@ IL_0017: br.s IL_0022 IL_0019: nop - IL_001a: br.s IL_0025 + IL_001a: br.s IL_0027 IL_001c: nop - IL_001d: br.s IL_0023 + IL_001d: br.s IL_0025 IL_001f: nop - IL_0020: br.s IL_0025 + IL_0020: br.s IL_0027 IL_0022: nop - IL_0023: ldc.i4.0 - IL_0024: ret + IL_0023: br.s IL_0025 IL_0025: ldc.i4.0 IL_0026: ret + + IL_0027: ldc.i4.0 + IL_0028: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -296,4 +290,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOff.il.bsl index 87cdddbc615..bb9f1dc4b7c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -102,81 +92,83 @@ IL_0019: br.s IL_002a IL_001b: nop - IL_001c: br.s IL_008d + IL_001c: br.s IL_008f IL_001e: nop - IL_001f: br IL_00b5 + IL_001f: br IL_00b7 IL_0024: nop - IL_0025: br IL_00ca + IL_0025: br IL_00cc IL_002a: nop - IL_002b: ldarg.0 - IL_002c: ldc.i4.0 - IL_002d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_0032: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_0037: ldarg.0 - IL_0038: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_003d: ldarg.0 - IL_003e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_0043: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0048: ldc.i4.1 - IL_0049: add - IL_004a: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_004f: ldarg.0 - IL_0050: ldc.i4.0 - IL_0051: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_0056: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y - IL_005b: ldarg.0 - IL_005c: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y - IL_0061: ldarg.0 - IL_0062: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y - IL_0067: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_006c: ldc.i4.1 - IL_006d: add - IL_006e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_0073: ldarg.0 - IL_0074: ldc.i4.1 - IL_0075: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc - IL_007a: ldarg.0 - IL_007b: ldarg.0 - IL_007c: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_0081: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0086: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current - IL_008b: ldc.i4.1 - IL_008c: ret - - IL_008d: ldarg.0 - IL_008e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_0093: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0098: ldarg.0 - IL_0099: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y - IL_009e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_00a3: add - IL_00a4: stloc.0 - IL_00a5: ldarg.0 - IL_00a6: ldc.i4.2 - IL_00a7: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc - IL_00ac: ldarg.0 - IL_00ad: ldloc.0 - IL_00ae: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current - IL_00b3: ldc.i4.1 - IL_00b4: ret - - IL_00b5: ldarg.0 - IL_00b6: ldnull - IL_00b7: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y - IL_00bc: ldarg.0 - IL_00bd: ldnull - IL_00be: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_00c3: ldarg.0 - IL_00c4: ldc.i4.3 - IL_00c5: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc - IL_00ca: ldarg.0 - IL_00cb: ldc.i4.0 - IL_00cc: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current - IL_00d1: ldc.i4.0 - IL_00d2: ret + IL_002b: br.s IL_002d + + IL_002d: ldarg.0 + IL_002e: ldc.i4.0 + IL_002f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0034: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_0039: ldarg.0 + IL_003a: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_003f: ldarg.0 + IL_0040: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_0045: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_004a: ldc.i4.1 + IL_004b: add + IL_004c: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0051: ldarg.0 + IL_0052: ldc.i4.0 + IL_0053: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0058: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y + IL_005d: ldarg.0 + IL_005e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y + IL_0063: ldarg.0 + IL_0064: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y + IL_0069: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_006e: ldc.i4.1 + IL_006f: add + IL_0070: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0075: ldarg.0 + IL_0076: ldc.i4.1 + IL_0077: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc + IL_007c: ldarg.0 + IL_007d: ldarg.0 + IL_007e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_0083: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0088: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current + IL_008d: ldc.i4.1 + IL_008e: ret + + IL_008f: ldarg.0 + IL_0090: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_0095: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_009a: ldarg.0 + IL_009b: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y + IL_00a0: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_00a5: add + IL_00a6: stloc.0 + IL_00a7: ldarg.0 + IL_00a8: ldc.i4.2 + IL_00a9: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc + IL_00ae: ldarg.0 + IL_00af: ldloc.0 + IL_00b0: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current + IL_00b5: ldc.i4.1 + IL_00b6: ret + + IL_00b7: ldarg.0 + IL_00b8: ldnull + IL_00b9: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y + IL_00be: ldarg.0 + IL_00bf: ldnull + IL_00c0: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_00c5: ldarg.0 + IL_00c6: ldc.i4.3 + IL_00c7: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc + IL_00cc: ldarg.0 + IL_00cd: ldc.i4.0 + IL_00ce: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current + IL_00d3: ldc.i4.0 + IL_00d4: ret } .method public strict virtual instance void Close() cil managed @@ -203,26 +195,28 @@ IL_001b: br.s IL_0029 IL_001d: nop - IL_001e: br.s IL_002e + IL_001e: br.s IL_0030 IL_0020: nop - IL_0021: br.s IL_002c + IL_0021: br.s IL_002e IL_0023: nop - IL_0024: br.s IL_002a + IL_0024: br.s IL_002c IL_0026: nop - IL_0027: br.s IL_002e + IL_0027: br.s IL_0030 IL_0029: nop - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002a: br.s IL_002c IL_002c: ldc.i4.0 IL_002d: ret IL_002e: ldc.i4.0 IL_002f: ret + + IL_0030: ldc.i4.0 + IL_0031: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -301,4 +295,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOn.il.bsl index 3942c10104b..5de2c18d227 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -102,81 +92,83 @@ IL_0019: br.s IL_002a IL_001b: nop - IL_001c: br.s IL_008d + IL_001c: br.s IL_008f IL_001e: nop - IL_001f: br IL_00b5 + IL_001f: br IL_00b7 IL_0024: nop - IL_0025: br IL_00ca + IL_0025: br IL_00cc IL_002a: nop - IL_002b: ldarg.0 - IL_002c: ldc.i4.0 - IL_002d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_0032: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_0037: ldarg.0 - IL_0038: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_003d: ldarg.0 - IL_003e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_0043: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0048: ldc.i4.1 - IL_0049: add - IL_004a: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_004f: ldarg.0 - IL_0050: ldc.i4.0 - IL_0051: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_0056: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y - IL_005b: ldarg.0 - IL_005c: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y - IL_0061: ldarg.0 - IL_0062: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y - IL_0067: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_006c: ldc.i4.1 - IL_006d: add - IL_006e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_0073: ldarg.0 - IL_0074: ldc.i4.1 - IL_0075: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc - IL_007a: ldarg.0 - IL_007b: ldarg.0 - IL_007c: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_0081: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0086: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current - IL_008b: ldc.i4.1 - IL_008c: ret - - IL_008d: ldarg.0 - IL_008e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_0093: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0098: ldarg.0 - IL_0099: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y - IL_009e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_00a3: add - IL_00a4: stloc.0 - IL_00a5: ldarg.0 - IL_00a6: ldc.i4.2 - IL_00a7: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc - IL_00ac: ldarg.0 - IL_00ad: ldloc.0 - IL_00ae: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current - IL_00b3: ldc.i4.1 - IL_00b4: ret - - IL_00b5: ldarg.0 - IL_00b6: ldnull - IL_00b7: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y - IL_00bc: ldarg.0 - IL_00bd: ldnull - IL_00be: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x - IL_00c3: ldarg.0 - IL_00c4: ldc.i4.3 - IL_00c5: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc - IL_00ca: ldarg.0 - IL_00cb: ldc.i4.0 - IL_00cc: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current - IL_00d1: ldc.i4.0 - IL_00d2: ret + IL_002b: br.s IL_002d + + IL_002d: ldarg.0 + IL_002e: ldc.i4.0 + IL_002f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0034: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_0039: ldarg.0 + IL_003a: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_003f: ldarg.0 + IL_0040: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_0045: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_004a: ldc.i4.1 + IL_004b: add + IL_004c: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0051: ldarg.0 + IL_0052: ldc.i4.0 + IL_0053: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0058: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y + IL_005d: ldarg.0 + IL_005e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y + IL_0063: ldarg.0 + IL_0064: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y + IL_0069: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_006e: ldc.i4.1 + IL_006f: add + IL_0070: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0075: ldarg.0 + IL_0076: ldc.i4.1 + IL_0077: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc + IL_007c: ldarg.0 + IL_007d: ldarg.0 + IL_007e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_0083: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0088: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current + IL_008d: ldc.i4.1 + IL_008e: ret + + IL_008f: ldarg.0 + IL_0090: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_0095: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_009a: ldarg.0 + IL_009b: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y + IL_00a0: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_00a5: add + IL_00a6: stloc.0 + IL_00a7: ldarg.0 + IL_00a8: ldc.i4.2 + IL_00a9: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc + IL_00ae: ldarg.0 + IL_00af: ldloc.0 + IL_00b0: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current + IL_00b5: ldc.i4.1 + IL_00b6: ret + + IL_00b7: ldarg.0 + IL_00b8: ldnull + IL_00b9: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::y + IL_00be: ldarg.0 + IL_00bf: ldnull + IL_00c0: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::x + IL_00c5: ldarg.0 + IL_00c6: ldc.i4.3 + IL_00c7: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc + IL_00cc: ldarg.0 + IL_00cd: ldc.i4.0 + IL_00ce: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::current + IL_00d3: ldc.i4.0 + IL_00d4: ret } .method public strict virtual instance void Close() cil managed @@ -203,26 +195,28 @@ IL_001b: br.s IL_0029 IL_001d: nop - IL_001e: br.s IL_002e + IL_001e: br.s IL_0030 IL_0020: nop - IL_0021: br.s IL_002c + IL_0021: br.s IL_002e IL_0023: nop - IL_0024: br.s IL_002a + IL_0024: br.s IL_002c IL_0026: nop - IL_0027: br.s IL_002e + IL_0027: br.s IL_0030 IL_0029: nop - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002a: br.s IL_002c IL_002c: ldc.i4.0 IL_002d: ret IL_002e: ldc.i4.0 IL_002f: ret + + IL_0030: ldc.i4.0 + IL_0031: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -339,4 +333,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOff.il.bsl index c9c71515526..18daf040acc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -103,94 +93,96 @@ IL_001d: br.s IL_0034 IL_001f: nop - IL_0020: br IL_00b5 + IL_0020: br IL_00b7 IL_0025: nop - IL_0026: br.s IL_0086 + IL_0026: br.s IL_0088 IL_0028: nop - IL_0029: br IL_00ae + IL_0029: br IL_00b0 IL_002e: nop - IL_002f: br IL_00f2 + IL_002f: br IL_00f4 IL_0034: nop - IL_0035: ldarg.0 - IL_0036: ldc.i4.0 - IL_0037: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_003c: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_0041: ldarg.0 - IL_0042: ldc.i4.1 - IL_0043: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0048: ldarg.0 - IL_0049: ldc.i4.0 - IL_004a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_004f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y - IL_0054: ldarg.0 - IL_0055: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y - IL_005a: ldarg.0 - IL_005b: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y - IL_0060: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0065: ldc.i4.1 - IL_0066: add - IL_0067: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_006c: ldarg.0 - IL_006d: ldc.i4.2 - IL_006e: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0073: ldarg.0 - IL_0074: ldarg.0 - IL_0075: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_007a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_007f: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current - IL_0084: ldc.i4.1 - IL_0085: ret - - IL_0086: ldarg.0 - IL_0087: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_008c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0091: ldarg.0 - IL_0092: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y - IL_0097: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_009c: add - IL_009d: stloc.0 - IL_009e: ldarg.0 - IL_009f: ldc.i4.3 - IL_00a0: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_00a5: ldarg.0 - IL_00a6: ldloc.0 - IL_00a7: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current - IL_00ac: ldc.i4.1 - IL_00ad: ret - - IL_00ae: ldarg.0 - IL_00af: ldnull - IL_00b0: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y - IL_00b5: ldarg.0 - IL_00b6: ldc.i4.4 - IL_00b7: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_00bc: ldarg.0 - IL_00bd: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_00c2: ldarg.0 - IL_00c3: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_00c8: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_00cd: ldc.i4.1 - IL_00ce: add - IL_00cf: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_00d4: ldstr "done" - IL_00d9: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_00de: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_00e3: pop - IL_00e4: ldarg.0 - IL_00e5: ldnull - IL_00e6: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_00eb: ldarg.0 - IL_00ec: ldc.i4.4 - IL_00ed: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_00f2: ldarg.0 - IL_00f3: ldc.i4.0 - IL_00f4: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current - IL_00f9: ldc.i4.0 - IL_00fa: ret + IL_0035: br.s IL_0037 + + IL_0037: ldarg.0 + IL_0038: ldc.i4.0 + IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_003e: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_0043: ldarg.0 + IL_0044: ldc.i4.1 + IL_0045: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_004a: ldarg.0 + IL_004b: ldc.i4.0 + IL_004c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0051: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y + IL_0056: ldarg.0 + IL_0057: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y + IL_005c: ldarg.0 + IL_005d: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y + IL_0062: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0067: ldc.i4.1 + IL_0068: add + IL_0069: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_006e: ldarg.0 + IL_006f: ldc.i4.2 + IL_0070: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0075: ldarg.0 + IL_0076: ldarg.0 + IL_0077: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_007c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0081: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current + IL_0086: ldc.i4.1 + IL_0087: ret + + IL_0088: ldarg.0 + IL_0089: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_008e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0093: ldarg.0 + IL_0094: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y + IL_0099: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_009e: add + IL_009f: stloc.0 + IL_00a0: ldarg.0 + IL_00a1: ldc.i4.3 + IL_00a2: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_00a7: ldarg.0 + IL_00a8: ldloc.0 + IL_00a9: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current + IL_00ae: ldc.i4.1 + IL_00af: ret + + IL_00b0: ldarg.0 + IL_00b1: ldnull + IL_00b2: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y + IL_00b7: ldarg.0 + IL_00b8: ldc.i4.4 + IL_00b9: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_00be: ldarg.0 + IL_00bf: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_00c4: ldarg.0 + IL_00c5: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_00ca: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_00cf: ldc.i4.1 + IL_00d0: add + IL_00d1: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_00d6: ldstr "done" + IL_00db: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00e0: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00e5: pop + IL_00e6: ldarg.0 + IL_00e7: ldnull + IL_00e8: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_00ed: ldarg.0 + IL_00ee: ldc.i4.4 + IL_00ef: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_00f4: ldarg.0 + IL_00f5: ldc.i4.0 + IL_00f6: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current + IL_00fb: ldc.i4.0 + IL_00fc: ret } .method public strict virtual instance void Close() cil managed @@ -208,7 +200,7 @@ IL_0011: br.s IL_0019 IL_0013: nop - IL_0014: br IL_009f + IL_0014: br IL_00a1 IL_0019: nop .try @@ -224,69 +216,71 @@ IL_0039: br.s IL_004a IL_003b: nop - IL_003c: br.s IL_007f + IL_003c: br.s IL_0081 IL_003e: nop - IL_003f: br.s IL_004f + IL_003f: br.s IL_0051 IL_0041: nop - IL_0042: br.s IL_004e + IL_0042: br.s IL_0050 IL_0044: nop - IL_0045: br.s IL_004b + IL_0045: br.s IL_004d IL_0047: nop - IL_0048: br.s IL_007f + IL_0048: br.s IL_0081 IL_004a: nop - IL_004b: nop - IL_004c: br.s IL_004f - - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.4 - IL_0051: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_005c: ldarg.0 - IL_005d: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_0062: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0067: ldc.i4.1 - IL_0068: add - IL_0069: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_006e: ldstr "done" - IL_0073: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0078: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_007d: pop - IL_007e: nop - IL_007f: ldarg.0 - IL_0080: ldc.i4.4 - IL_0081: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0086: ldarg.0 - IL_0087: ldc.i4.0 - IL_0088: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current - IL_008d: leave.s IL_0099 + IL_004b: br.s IL_004d + + IL_004d: nop + IL_004e: br.s IL_0051 + + IL_0050: nop + IL_0051: ldarg.0 + IL_0052: ldc.i4.4 + IL_0053: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0058: ldarg.0 + IL_0059: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_005e: ldarg.0 + IL_005f: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_0064: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0069: ldc.i4.1 + IL_006a: add + IL_006b: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0070: ldstr "done" + IL_0075: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_007a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_007f: pop + IL_0080: nop + IL_0081: ldarg.0 + IL_0082: ldc.i4.4 + IL_0083: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0088: ldarg.0 + IL_0089: ldc.i4.0 + IL_008a: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current + IL_008f: leave.s IL_009b } catch [runtime]System.Object { - IL_008f: castclass [runtime]System.Exception - IL_0094: stloc.1 - IL_0095: ldloc.1 - IL_0096: stloc.0 - IL_0097: leave.s IL_0099 + IL_0091: castclass [runtime]System.Exception + IL_0096: stloc.1 + IL_0097: ldloc.1 + IL_0098: stloc.0 + IL_0099: leave.s IL_009b } - IL_0099: nop - IL_009a: br IL_0000 + IL_009b: nop + IL_009c: br IL_0000 - IL_009f: ldloc.0 - IL_00a0: brfalse.s IL_00a4 + IL_00a1: ldloc.0 + IL_00a2: brfalse.s IL_00a6 - IL_00a2: ldloc.0 - IL_00a3: throw + IL_00a4: ldloc.0 + IL_00a5: throw - IL_00a4: ret + IL_00a6: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -304,23 +298,22 @@ IL_001f: br.s IL_0030 IL_0021: nop - IL_0022: br.s IL_0037 + IL_0022: br.s IL_0039 IL_0024: nop - IL_0025: br.s IL_0035 + IL_0025: br.s IL_0037 IL_0027: nop - IL_0028: br.s IL_0033 + IL_0028: br.s IL_0035 IL_002a: nop - IL_002b: br.s IL_0031 + IL_002b: br.s IL_0033 IL_002d: nop - IL_002e: br.s IL_0037 + IL_002e: br.s IL_0039 IL_0030: nop - IL_0031: ldc.i4.1 - IL_0032: ret + IL_0031: br.s IL_0033 IL_0033: ldc.i4.1 IL_0034: ret @@ -328,8 +321,11 @@ IL_0035: ldc.i4.1 IL_0036: ret - IL_0037: ldc.i4.0 + IL_0037: ldc.i4.1 IL_0038: ret + + IL_0039: ldc.i4.0 + IL_003a: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -408,4 +404,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOn.il.bsl index 0bc58b2d8f8..dbe53c7c861 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -103,94 +93,96 @@ IL_001d: br.s IL_0034 IL_001f: nop - IL_0020: br IL_00b5 + IL_0020: br IL_00b7 IL_0025: nop - IL_0026: br.s IL_0086 + IL_0026: br.s IL_0088 IL_0028: nop - IL_0029: br IL_00ae + IL_0029: br IL_00b0 IL_002e: nop - IL_002f: br IL_00f2 + IL_002f: br IL_00f4 IL_0034: nop - IL_0035: ldarg.0 - IL_0036: ldc.i4.0 - IL_0037: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_003c: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_0041: ldarg.0 - IL_0042: ldc.i4.1 - IL_0043: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0048: ldarg.0 - IL_0049: ldc.i4.0 - IL_004a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_004f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y - IL_0054: ldarg.0 - IL_0055: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y - IL_005a: ldarg.0 - IL_005b: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y - IL_0060: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0065: ldc.i4.1 - IL_0066: add - IL_0067: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_006c: ldarg.0 - IL_006d: ldc.i4.2 - IL_006e: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0073: ldarg.0 - IL_0074: ldarg.0 - IL_0075: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_007a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_007f: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current - IL_0084: ldc.i4.1 - IL_0085: ret - - IL_0086: ldarg.0 - IL_0087: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_008c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0091: ldarg.0 - IL_0092: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y - IL_0097: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_009c: add - IL_009d: stloc.0 - IL_009e: ldarg.0 - IL_009f: ldc.i4.3 - IL_00a0: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_00a5: ldarg.0 - IL_00a6: ldloc.0 - IL_00a7: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current - IL_00ac: ldc.i4.1 - IL_00ad: ret - - IL_00ae: ldarg.0 - IL_00af: ldnull - IL_00b0: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y - IL_00b5: ldarg.0 - IL_00b6: ldc.i4.4 - IL_00b7: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_00bc: ldarg.0 - IL_00bd: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_00c2: ldarg.0 - IL_00c3: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_00c8: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_00cd: ldc.i4.1 - IL_00ce: add - IL_00cf: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_00d4: ldstr "done" - IL_00d9: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_00de: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_00e3: pop - IL_00e4: ldarg.0 - IL_00e5: ldnull - IL_00e6: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_00eb: ldarg.0 - IL_00ec: ldc.i4.4 - IL_00ed: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_00f2: ldarg.0 - IL_00f3: ldc.i4.0 - IL_00f4: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current - IL_00f9: ldc.i4.0 - IL_00fa: ret + IL_0035: br.s IL_0037 + + IL_0037: ldarg.0 + IL_0038: ldc.i4.0 + IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_003e: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_0043: ldarg.0 + IL_0044: ldc.i4.1 + IL_0045: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_004a: ldarg.0 + IL_004b: ldc.i4.0 + IL_004c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0051: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y + IL_0056: ldarg.0 + IL_0057: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y + IL_005c: ldarg.0 + IL_005d: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y + IL_0062: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0067: ldc.i4.1 + IL_0068: add + IL_0069: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_006e: ldarg.0 + IL_006f: ldc.i4.2 + IL_0070: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0075: ldarg.0 + IL_0076: ldarg.0 + IL_0077: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_007c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0081: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current + IL_0086: ldc.i4.1 + IL_0087: ret + + IL_0088: ldarg.0 + IL_0089: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_008e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0093: ldarg.0 + IL_0094: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y + IL_0099: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_009e: add + IL_009f: stloc.0 + IL_00a0: ldarg.0 + IL_00a1: ldc.i4.3 + IL_00a2: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_00a7: ldarg.0 + IL_00a8: ldloc.0 + IL_00a9: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current + IL_00ae: ldc.i4.1 + IL_00af: ret + + IL_00b0: ldarg.0 + IL_00b1: ldnull + IL_00b2: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::y + IL_00b7: ldarg.0 + IL_00b8: ldc.i4.4 + IL_00b9: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_00be: ldarg.0 + IL_00bf: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_00c4: ldarg.0 + IL_00c5: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_00ca: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_00cf: ldc.i4.1 + IL_00d0: add + IL_00d1: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_00d6: ldstr "done" + IL_00db: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00e0: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00e5: pop + IL_00e6: ldarg.0 + IL_00e7: ldnull + IL_00e8: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_00ed: ldarg.0 + IL_00ee: ldc.i4.4 + IL_00ef: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_00f4: ldarg.0 + IL_00f5: ldc.i4.0 + IL_00f6: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current + IL_00fb: ldc.i4.0 + IL_00fc: ret } .method public strict virtual instance void Close() cil managed @@ -208,7 +200,7 @@ IL_0011: br.s IL_0019 IL_0013: nop - IL_0014: br IL_009f + IL_0014: br IL_00a1 IL_0019: nop .try @@ -224,69 +216,71 @@ IL_0039: br.s IL_004a IL_003b: nop - IL_003c: br.s IL_007f + IL_003c: br.s IL_0081 IL_003e: nop - IL_003f: br.s IL_004f + IL_003f: br.s IL_0051 IL_0041: nop - IL_0042: br.s IL_004e + IL_0042: br.s IL_0050 IL_0044: nop - IL_0045: br.s IL_004b + IL_0045: br.s IL_004d IL_0047: nop - IL_0048: br.s IL_007f + IL_0048: br.s IL_0081 IL_004a: nop - IL_004b: nop - IL_004c: br.s IL_004f - - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.4 - IL_0051: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_005c: ldarg.0 - IL_005d: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_0062: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0067: ldc.i4.1 - IL_0068: add - IL_0069: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_006e: ldstr "done" - IL_0073: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0078: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_007d: pop - IL_007e: nop - IL_007f: ldarg.0 - IL_0080: ldc.i4.4 - IL_0081: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0086: ldarg.0 - IL_0087: ldc.i4.0 - IL_0088: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current - IL_008d: leave.s IL_0099 + IL_004b: br.s IL_004d + + IL_004d: nop + IL_004e: br.s IL_0051 + + IL_0050: nop + IL_0051: ldarg.0 + IL_0052: ldc.i4.4 + IL_0053: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0058: ldarg.0 + IL_0059: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_005e: ldarg.0 + IL_005f: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_0064: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0069: ldc.i4.1 + IL_006a: add + IL_006b: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0070: ldstr "done" + IL_0075: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_007a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_007f: pop + IL_0080: nop + IL_0081: ldarg.0 + IL_0082: ldc.i4.4 + IL_0083: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0088: ldarg.0 + IL_0089: ldc.i4.0 + IL_008a: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current + IL_008f: leave.s IL_009b } catch [runtime]System.Object { - IL_008f: castclass [runtime]System.Exception - IL_0094: stloc.1 - IL_0095: ldloc.1 - IL_0096: stloc.0 - IL_0097: leave.s IL_0099 + IL_0091: castclass [runtime]System.Exception + IL_0096: stloc.1 + IL_0097: ldloc.1 + IL_0098: stloc.0 + IL_0099: leave.s IL_009b } - IL_0099: nop - IL_009a: br IL_0000 + IL_009b: nop + IL_009c: br IL_0000 - IL_009f: ldloc.0 - IL_00a0: brfalse.s IL_00a4 + IL_00a1: ldloc.0 + IL_00a2: brfalse.s IL_00a6 - IL_00a2: ldloc.0 - IL_00a3: throw + IL_00a4: ldloc.0 + IL_00a5: throw - IL_00a4: ret + IL_00a6: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -304,23 +298,22 @@ IL_001f: br.s IL_0030 IL_0021: nop - IL_0022: br.s IL_0037 + IL_0022: br.s IL_0039 IL_0024: nop - IL_0025: br.s IL_0035 + IL_0025: br.s IL_0037 IL_0027: nop - IL_0028: br.s IL_0033 + IL_0028: br.s IL_0035 IL_002a: nop - IL_002b: br.s IL_0031 + IL_002b: br.s IL_0033 IL_002d: nop - IL_002e: br.s IL_0037 + IL_002e: br.s IL_0039 IL_0030: nop - IL_0031: ldc.i4.1 - IL_0032: ret + IL_0031: br.s IL_0033 IL_0033: ldc.i4.1 IL_0034: ret @@ -328,8 +321,11 @@ IL_0035: ldc.i4.1 IL_0036: ret - IL_0037: ldc.i4.0 + IL_0037: ldc.i4.1 IL_0038: ret + + IL_0039: ldc.i4.0 + IL_003a: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -446,4 +442,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl index 3835b9fa0d5..3421e0f80dd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -111,111 +101,113 @@ IL_0021: br.s IL_003b IL_0023: nop - IL_0024: br.s IL_008e + IL_0024: br.s IL_0090 IL_0026: nop - IL_0027: br.s IL_0081 + IL_0027: br.s IL_0083 IL_0029: nop - IL_002a: br IL_00fa + IL_002a: br IL_00fc IL_002f: nop - IL_0030: br IL_00ed + IL_0030: br IL_00ef IL_0035: nop - IL_0036: br IL_011b + IL_0036: br IL_011d IL_003b: nop - IL_003c: ldarg.0 - IL_003d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() - IL_0042: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0047: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_004c: ldarg.0 - IL_004d: ldc.i4.1 - IL_004e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0053: br.s IL_0081 - - IL_0055: ldarg.0 - IL_0056: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_005b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0060: stloc.0 - IL_0061: ldstr "hello" - IL_0066: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_006b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0070: pop - IL_0071: ldarg.0 - IL_0072: ldc.i4.2 - IL_0073: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0078: ldarg.0 - IL_0079: ldloc.0 - IL_007a: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_007f: ldc.i4.1 - IL_0080: ret - - IL_0081: ldarg.0 - IL_0082: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0087: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_008c: brtrue.s IL_0055 - - IL_008e: ldarg.0 - IL_008f: ldc.i4.5 - IL_0090: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0095: ldarg.0 - IL_0096: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_009b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a0: nop - IL_00a1: ldarg.0 - IL_00a2: ldnull - IL_00a3: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_00a8: ldarg.0 - IL_00a9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() - IL_00ae: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_00b3: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00b8: ldarg.0 - IL_00b9: ldc.i4.3 - IL_00ba: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_00bf: br.s IL_00ed - - IL_00c1: ldarg.0 - IL_00c2: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00c7: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_00cc: stloc.1 - IL_00cd: ldstr "goodbye" - IL_00d2: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_00d7: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_00dc: pop - IL_00dd: ldarg.0 - IL_00de: ldc.i4.4 - IL_00df: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_00e4: ldarg.0 - IL_00e5: ldloc.1 - IL_00e6: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_00eb: ldc.i4.1 - IL_00ec: ret - - IL_00ed: ldarg.0 - IL_00ee: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00f3: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_00f8: brtrue.s IL_00c1 - - IL_00fa: ldarg.0 - IL_00fb: ldc.i4.5 - IL_00fc: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0101: ldarg.0 - IL_0102: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0107: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_010c: nop - IL_010d: ldarg.0 - IL_010e: ldnull - IL_010f: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0114: ldarg.0 - IL_0115: ldc.i4.5 - IL_0116: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_011b: ldarg.0 - IL_011c: ldc.i4.0 - IL_011d: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_0122: ldc.i4.0 - IL_0123: ret + IL_003c: br.s IL_003e + + IL_003e: ldarg.0 + IL_003f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + IL_0044: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0049: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_004e: ldarg.0 + IL_004f: ldc.i4.1 + IL_0050: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0055: br.s IL_0083 + + IL_0057: ldarg.0 + IL_0058: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_005d: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0062: stloc.0 + IL_0063: ldstr "hello" + IL_0068: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_006d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0072: pop + IL_0073: ldarg.0 + IL_0074: ldc.i4.2 + IL_0075: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_007a: ldarg.0 + IL_007b: ldloc.0 + IL_007c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0081: ldc.i4.1 + IL_0082: ret + + IL_0083: ldarg.0 + IL_0084: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0089: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_008e: brtrue.s IL_0057 + + IL_0090: ldarg.0 + IL_0091: ldc.i4.5 + IL_0092: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0097: ldarg.0 + IL_0098: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_009d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_00a2: nop + IL_00a3: ldarg.0 + IL_00a4: ldnull + IL_00a5: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_00aa: ldarg.0 + IL_00ab: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + IL_00b0: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_00b5: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00ba: ldarg.0 + IL_00bb: ldc.i4.3 + IL_00bc: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_00c1: br.s IL_00ef + + IL_00c3: ldarg.0 + IL_00c4: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00c9: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_00ce: stloc.1 + IL_00cf: ldstr "goodbye" + IL_00d4: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00d9: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00de: pop + IL_00df: ldarg.0 + IL_00e0: ldc.i4.4 + IL_00e1: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_00e6: ldarg.0 + IL_00e7: ldloc.1 + IL_00e8: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_00ed: ldc.i4.1 + IL_00ee: ret + + IL_00ef: ldarg.0 + IL_00f0: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00f5: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_00fa: brtrue.s IL_00c3 + + IL_00fc: ldarg.0 + IL_00fd: ldc.i4.5 + IL_00fe: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0103: ldarg.0 + IL_0104: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0109: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_010e: nop + IL_010f: ldarg.0 + IL_0110: ldnull + IL_0111: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0116: ldarg.0 + IL_0117: ldc.i4.5 + IL_0118: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_011d: ldarg.0 + IL_011e: ldc.i4.0 + IL_011f: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0124: ldc.i4.0 + IL_0125: ret } .method public strict virtual instance void Close() cil managed @@ -233,7 +225,7 @@ IL_0011: br.s IL_0019 IL_0013: nop - IL_0014: br IL_009e + IL_0014: br IL_00a0 IL_0019: nop .try @@ -250,72 +242,74 @@ IL_003d: br.s IL_0051 IL_003f: nop - IL_0040: br.s IL_007e + IL_0040: br.s IL_0080 IL_0042: nop - IL_0043: br.s IL_006a + IL_0043: br.s IL_006c IL_0045: nop - IL_0046: br.s IL_0069 + IL_0046: br.s IL_006b IL_0048: nop - IL_0049: br.s IL_0053 + IL_0049: br.s IL_0055 IL_004b: nop - IL_004c: br.s IL_0052 + IL_004c: br.s IL_0054 IL_004e: nop - IL_004f: br.s IL_007e + IL_004f: br.s IL_0080 IL_0051: nop - IL_0052: nop - IL_0053: ldarg.0 - IL_0054: ldc.i4.5 - IL_0055: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_005a: ldarg.0 - IL_005b: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0060: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0065: nop - IL_0066: nop - IL_0067: br.s IL_007e - - IL_0069: nop - IL_006a: ldarg.0 - IL_006b: ldc.i4.5 - IL_006c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0071: ldarg.0 - IL_0072: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: nop - IL_007e: ldarg.0 - IL_007f: ldc.i4.5 - IL_0080: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0085: ldarg.0 - IL_0086: ldc.i4.0 - IL_0087: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_008c: leave.s IL_0098 + IL_0052: br.s IL_0054 + + IL_0054: nop + IL_0055: ldarg.0 + IL_0056: ldc.i4.5 + IL_0057: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_005c: ldarg.0 + IL_005d: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0062: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0067: nop + IL_0068: nop + IL_0069: br.s IL_0080 + + IL_006b: nop + IL_006c: ldarg.0 + IL_006d: ldc.i4.5 + IL_006e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: nop + IL_0080: ldarg.0 + IL_0081: ldc.i4.5 + IL_0082: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0087: ldarg.0 + IL_0088: ldc.i4.0 + IL_0089: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_008e: leave.s IL_009a } catch [runtime]System.Object { - IL_008e: castclass [runtime]System.Exception - IL_0093: stloc.1 - IL_0094: ldloc.1 - IL_0095: stloc.0 - IL_0096: leave.s IL_0098 + IL_0090: castclass [runtime]System.Exception + IL_0095: stloc.1 + IL_0096: ldloc.1 + IL_0097: stloc.0 + IL_0098: leave.s IL_009a } - IL_0098: nop - IL_0099: br IL_0000 + IL_009a: nop + IL_009b: br IL_0000 - IL_009e: ldloc.0 - IL_009f: brfalse.s IL_00a3 + IL_00a0: ldloc.0 + IL_00a1: brfalse.s IL_00a5 - IL_00a1: ldloc.0 - IL_00a2: throw + IL_00a3: ldloc.0 + IL_00a4: throw - IL_00a3: ret + IL_00a5: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -334,26 +328,25 @@ IL_0023: br.s IL_0037 IL_0025: nop - IL_0026: br.s IL_0040 + IL_0026: br.s IL_0042 IL_0028: nop - IL_0029: br.s IL_003e + IL_0029: br.s IL_0040 IL_002b: nop - IL_002c: br.s IL_003c + IL_002c: br.s IL_003e IL_002e: nop - IL_002f: br.s IL_003a + IL_002f: br.s IL_003c IL_0031: nop - IL_0032: br.s IL_0038 + IL_0032: br.s IL_003a IL_0034: nop - IL_0035: br.s IL_0040 + IL_0035: br.s IL_0042 IL_0037: nop - IL_0038: ldc.i4.1 - IL_0039: ret + IL_0038: br.s IL_003a IL_003a: ldc.i4.1 IL_003b: ret @@ -364,8 +357,11 @@ IL_003e: ldc.i4.1 IL_003f: ret - IL_0040: ldc.i4.0 + IL_0040: ldc.i4.1 IL_0041: ret + + IL_0042: ldc.i4.0 + IL_0043: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -474,4 +470,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl index 5170c5d889c..2ab7537e07f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -111,111 +101,113 @@ IL_0021: br.s IL_003b IL_0023: nop - IL_0024: br.s IL_008e + IL_0024: br.s IL_0090 IL_0026: nop - IL_0027: br.s IL_0081 + IL_0027: br.s IL_0083 IL_0029: nop - IL_002a: br IL_00fa + IL_002a: br IL_00fc IL_002f: nop - IL_0030: br IL_00ed + IL_0030: br IL_00ef IL_0035: nop - IL_0036: br IL_011b + IL_0036: br IL_011d IL_003b: nop - IL_003c: ldarg.0 - IL_003d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() - IL_0042: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0047: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_004c: ldarg.0 - IL_004d: ldc.i4.1 - IL_004e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0053: br.s IL_0081 - - IL_0055: ldarg.0 - IL_0056: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_005b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0060: stloc.0 - IL_0061: ldstr "hello" - IL_0066: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_006b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0070: pop - IL_0071: ldarg.0 - IL_0072: ldc.i4.2 - IL_0073: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0078: ldarg.0 - IL_0079: ldloc.0 - IL_007a: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_007f: ldc.i4.1 - IL_0080: ret - - IL_0081: ldarg.0 - IL_0082: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0087: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_008c: brtrue.s IL_0055 - - IL_008e: ldarg.0 - IL_008f: ldc.i4.5 - IL_0090: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0095: ldarg.0 - IL_0096: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_009b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a0: nop - IL_00a1: ldarg.0 - IL_00a2: ldnull - IL_00a3: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_00a8: ldarg.0 - IL_00a9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() - IL_00ae: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_00b3: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00b8: ldarg.0 - IL_00b9: ldc.i4.3 - IL_00ba: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_00bf: br.s IL_00ed - - IL_00c1: ldarg.0 - IL_00c2: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00c7: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_00cc: stloc.1 - IL_00cd: ldstr "goodbye" - IL_00d2: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_00d7: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_00dc: pop - IL_00dd: ldarg.0 - IL_00de: ldc.i4.4 - IL_00df: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_00e4: ldarg.0 - IL_00e5: ldloc.1 - IL_00e6: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_00eb: ldc.i4.1 - IL_00ec: ret - - IL_00ed: ldarg.0 - IL_00ee: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00f3: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_00f8: brtrue.s IL_00c1 - - IL_00fa: ldarg.0 - IL_00fb: ldc.i4.5 - IL_00fc: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0101: ldarg.0 - IL_0102: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0107: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_010c: nop - IL_010d: ldarg.0 - IL_010e: ldnull - IL_010f: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0114: ldarg.0 - IL_0115: ldc.i4.5 - IL_0116: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_011b: ldarg.0 - IL_011c: ldc.i4.0 - IL_011d: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_0122: ldc.i4.0 - IL_0123: ret + IL_003c: br.s IL_003e + + IL_003e: ldarg.0 + IL_003f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + IL_0044: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0049: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_004e: ldarg.0 + IL_004f: ldc.i4.1 + IL_0050: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0055: br.s IL_0083 + + IL_0057: ldarg.0 + IL_0058: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_005d: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0062: stloc.0 + IL_0063: ldstr "hello" + IL_0068: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_006d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0072: pop + IL_0073: ldarg.0 + IL_0074: ldc.i4.2 + IL_0075: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_007a: ldarg.0 + IL_007b: ldloc.0 + IL_007c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0081: ldc.i4.1 + IL_0082: ret + + IL_0083: ldarg.0 + IL_0084: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0089: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_008e: brtrue.s IL_0057 + + IL_0090: ldarg.0 + IL_0091: ldc.i4.5 + IL_0092: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0097: ldarg.0 + IL_0098: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_009d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_00a2: nop + IL_00a3: ldarg.0 + IL_00a4: ldnull + IL_00a5: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_00aa: ldarg.0 + IL_00ab: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + IL_00b0: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_00b5: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00ba: ldarg.0 + IL_00bb: ldc.i4.3 + IL_00bc: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_00c1: br.s IL_00ef + + IL_00c3: ldarg.0 + IL_00c4: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00c9: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_00ce: stloc.1 + IL_00cf: ldstr "goodbye" + IL_00d4: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00d9: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00de: pop + IL_00df: ldarg.0 + IL_00e0: ldc.i4.4 + IL_00e1: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_00e6: ldarg.0 + IL_00e7: ldloc.1 + IL_00e8: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_00ed: ldc.i4.1 + IL_00ee: ret + + IL_00ef: ldarg.0 + IL_00f0: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00f5: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_00fa: brtrue.s IL_00c3 + + IL_00fc: ldarg.0 + IL_00fd: ldc.i4.5 + IL_00fe: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0103: ldarg.0 + IL_0104: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0109: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_010e: nop + IL_010f: ldarg.0 + IL_0110: ldnull + IL_0111: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0116: ldarg.0 + IL_0117: ldc.i4.5 + IL_0118: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_011d: ldarg.0 + IL_011e: ldc.i4.0 + IL_011f: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0124: ldc.i4.0 + IL_0125: ret } .method public strict virtual instance void Close() cil managed @@ -233,7 +225,7 @@ IL_0011: br.s IL_0019 IL_0013: nop - IL_0014: br IL_009e + IL_0014: br IL_00a0 IL_0019: nop .try @@ -250,72 +242,74 @@ IL_003d: br.s IL_0051 IL_003f: nop - IL_0040: br.s IL_007e + IL_0040: br.s IL_0080 IL_0042: nop - IL_0043: br.s IL_006a + IL_0043: br.s IL_006c IL_0045: nop - IL_0046: br.s IL_0069 + IL_0046: br.s IL_006b IL_0048: nop - IL_0049: br.s IL_0053 + IL_0049: br.s IL_0055 IL_004b: nop - IL_004c: br.s IL_0052 + IL_004c: br.s IL_0054 IL_004e: nop - IL_004f: br.s IL_007e + IL_004f: br.s IL_0080 IL_0051: nop - IL_0052: nop - IL_0053: ldarg.0 - IL_0054: ldc.i4.5 - IL_0055: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_005a: ldarg.0 - IL_005b: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0060: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0065: nop - IL_0066: nop - IL_0067: br.s IL_007e - - IL_0069: nop - IL_006a: ldarg.0 - IL_006b: ldc.i4.5 - IL_006c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0071: ldarg.0 - IL_0072: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: nop - IL_007e: ldarg.0 - IL_007f: ldc.i4.5 - IL_0080: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0085: ldarg.0 - IL_0086: ldc.i4.0 - IL_0087: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_008c: leave.s IL_0098 + IL_0052: br.s IL_0054 + + IL_0054: nop + IL_0055: ldarg.0 + IL_0056: ldc.i4.5 + IL_0057: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_005c: ldarg.0 + IL_005d: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0062: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0067: nop + IL_0068: nop + IL_0069: br.s IL_0080 + + IL_006b: nop + IL_006c: ldarg.0 + IL_006d: ldc.i4.5 + IL_006e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: nop + IL_0080: ldarg.0 + IL_0081: ldc.i4.5 + IL_0082: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0087: ldarg.0 + IL_0088: ldc.i4.0 + IL_0089: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_008e: leave.s IL_009a } catch [runtime]System.Object { - IL_008e: castclass [runtime]System.Exception - IL_0093: stloc.1 - IL_0094: ldloc.1 - IL_0095: stloc.0 - IL_0096: leave.s IL_0098 + IL_0090: castclass [runtime]System.Exception + IL_0095: stloc.1 + IL_0096: ldloc.1 + IL_0097: stloc.0 + IL_0098: leave.s IL_009a } - IL_0098: nop - IL_0099: br IL_0000 + IL_009a: nop + IL_009b: br IL_0000 - IL_009e: ldloc.0 - IL_009f: brfalse.s IL_00a3 + IL_00a0: ldloc.0 + IL_00a1: brfalse.s IL_00a5 - IL_00a1: ldloc.0 - IL_00a2: throw + IL_00a3: ldloc.0 + IL_00a4: throw - IL_00a3: ret + IL_00a5: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -334,26 +328,25 @@ IL_0023: br.s IL_0037 IL_0025: nop - IL_0026: br.s IL_0040 + IL_0026: br.s IL_0042 IL_0028: nop - IL_0029: br.s IL_003e + IL_0029: br.s IL_0040 IL_002b: nop - IL_002c: br.s IL_003c + IL_002c: br.s IL_003e IL_002e: nop - IL_002f: br.s IL_003a + IL_002f: br.s IL_003c IL_0031: nop - IL_0032: br.s IL_0038 + IL_0032: br.s IL_003a IL_0034: nop - IL_0035: br.s IL_0040 + IL_0035: br.s IL_0042 IL_0037: nop - IL_0038: ldc.i4.1 - IL_0039: ret + IL_0038: br.s IL_003a IL_003a: ldc.i4.1 IL_003b: ret @@ -364,8 +357,11 @@ IL_003e: ldc.i4.1 IL_003f: ret - IL_0040: ldc.i4.0 + IL_0040: ldc.i4.1 IL_0041: ret + + IL_0042: ldc.i4.0 + IL_0043: ret } .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -509,4 +505,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs.il.bsl index be85d82d286..6e1ad0568da 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -77,8 +67,7 @@ IL_001b: ret } - .method public strict virtual instance int32 - GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { .maxstack 7 @@ -93,50 +82,51 @@ IL_0019: br.s IL_0024 IL_001b: nop - IL_001c: br.s IL_003a + IL_001c: br.s IL_003c IL_001e: nop - IL_001f: br.s IL_0056 + IL_001f: br.s IL_0058 IL_0021: nop - IL_0022: br.s IL_005d + IL_0022: br.s IL_005f IL_0024: nop - IL_0025: ldarg.0 - IL_0026: ldc.i4.1 - IL_0027: stfld int32 assembly/rwalk@3::pc - IL_002c: ldarg.0 - IL_002d: ldarg.0 - IL_002e: ldfld int32 assembly/rwalk@3::x - IL_0033: stfld int32 assembly/rwalk@3::current - IL_0038: ldc.i4.1 - IL_0039: ret - - IL_003a: ldarg.0 - IL_003b: ldc.i4.2 - IL_003c: stfld int32 assembly/rwalk@3::pc - IL_0041: ldarg.1 - IL_0042: ldarg.0 - IL_0043: ldfld int32 assembly/rwalk@3::x - IL_0048: ldc.i4.1 - IL_0049: add - IL_004a: call class [runtime]System.Collections.Generic.IEnumerable`1 assembly::rwalk(int32) - IL_004f: stobj class [runtime]System.Collections.Generic.IEnumerable`1 - IL_0054: ldc.i4.2 - IL_0055: ret - - IL_0056: ldarg.0 - IL_0057: ldc.i4.3 - IL_0058: stfld int32 assembly/rwalk@3::pc - IL_005d: ldarg.0 - IL_005e: ldc.i4.0 - IL_005f: stfld int32 assembly/rwalk@3::current - IL_0064: ldc.i4.0 - IL_0065: ret + IL_0025: br.s IL_0027 + + IL_0027: ldarg.0 + IL_0028: ldc.i4.1 + IL_0029: stfld int32 assembly/rwalk@3::pc + IL_002e: ldarg.0 + IL_002f: ldarg.0 + IL_0030: ldfld int32 assembly/rwalk@3::x + IL_0035: stfld int32 assembly/rwalk@3::current + IL_003a: ldc.i4.1 + IL_003b: ret + + IL_003c: ldarg.0 + IL_003d: ldc.i4.2 + IL_003e: stfld int32 assembly/rwalk@3::pc + IL_0043: ldarg.1 + IL_0044: ldarg.0 + IL_0045: ldfld int32 assembly/rwalk@3::x + IL_004a: ldc.i4.1 + IL_004b: add + IL_004c: call class [runtime]System.Collections.Generic.IEnumerable`1 assembly::rwalk(int32) + IL_0051: stobj class [runtime]System.Collections.Generic.IEnumerable`1 + IL_0056: ldc.i4.2 + IL_0057: ret + + IL_0058: ldarg.0 + IL_0059: ldc.i4.3 + IL_005a: stfld int32 assembly/rwalk@3::pc + IL_005f: ldarg.0 + IL_0060: ldc.i4.0 + IL_0061: stfld int32 assembly/rwalk@3::current + IL_0066: ldc.i4.0 + IL_0067: ret } - .method public strict virtual instance void - Close() cil managed + .method public strict virtual instance void Close() cil managed { .maxstack 8 @@ -146,8 +136,7 @@ IL_0007: ret } - .method public strict virtual instance bool - get_CheckClose() cil managed + .method public strict virtual instance bool get_CheckClose() cil managed { .maxstack 8 @@ -161,30 +150,31 @@ IL_001b: br.s IL_0029 IL_001d: nop - IL_001e: br.s IL_002e + IL_001e: br.s IL_0030 IL_0020: nop - IL_0021: br.s IL_002c + IL_0021: br.s IL_002e IL_0023: nop - IL_0024: br.s IL_002a + IL_0024: br.s IL_002c IL_0026: nop - IL_0027: br.s IL_002e + IL_0027: br.s IL_0030 IL_0029: nop - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002a: br.s IL_002c IL_002c: ldc.i4.0 IL_002d: ret IL_002e: ldc.i4.0 IL_002f: ret + + IL_0030: ldc.i4.0 + IL_0031: ret } - .method public strict virtual instance int32 - get_LastGenerated() cil managed + .method public strict virtual instance int32 get_LastGenerated() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -195,8 +185,7 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 - GetFreshEnumerator() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -214,8 +203,7 @@ } - .method public static class [runtime]System.Collections.Generic.IEnumerable`1 - rwalk(int32 x) cil managed + .method public static class [runtime]System.Collections.Generic.IEnumerable`1 rwalk(int32 x) cil managed { .maxstack 8 @@ -247,4 +235,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs.il.bsl index f9f806854dd..42a5576afa5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -77,8 +67,7 @@ IL_001b: ret } - .method public strict virtual instance int32 - GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { .maxstack 7 @@ -93,50 +82,51 @@ IL_0019: br.s IL_0024 IL_001b: nop - IL_001c: br.s IL_003a + IL_001c: br.s IL_003c IL_001e: nop - IL_001f: br.s IL_0056 + IL_001f: br.s IL_0058 IL_0021: nop - IL_0022: br.s IL_005d + IL_0022: br.s IL_005f IL_0024: nop - IL_0025: ldarg.0 - IL_0026: ldc.i4.1 - IL_0027: stfld int32 assembly/rwalk1@5::pc - IL_002c: ldarg.0 - IL_002d: ldarg.0 - IL_002e: ldfld int32 assembly/rwalk1@5::x - IL_0033: stfld int32 assembly/rwalk1@5::current - IL_0038: ldc.i4.1 - IL_0039: ret - - IL_003a: ldarg.0 - IL_003b: ldc.i4.2 - IL_003c: stfld int32 assembly/rwalk1@5::pc - IL_0041: ldarg.1 - IL_0042: ldarg.0 - IL_0043: ldfld int32 assembly/rwalk1@5::x - IL_0048: ldc.i4.1 - IL_0049: add - IL_004a: call class [runtime]System.Collections.Generic.IEnumerable`1 assembly::rwalk2(int32) - IL_004f: stobj class [runtime]System.Collections.Generic.IEnumerable`1 - IL_0054: ldc.i4.2 - IL_0055: ret - - IL_0056: ldarg.0 - IL_0057: ldc.i4.3 - IL_0058: stfld int32 assembly/rwalk1@5::pc - IL_005d: ldarg.0 - IL_005e: ldc.i4.0 - IL_005f: stfld int32 assembly/rwalk1@5::current - IL_0064: ldc.i4.0 - IL_0065: ret + IL_0025: br.s IL_0027 + + IL_0027: ldarg.0 + IL_0028: ldc.i4.1 + IL_0029: stfld int32 assembly/rwalk1@5::pc + IL_002e: ldarg.0 + IL_002f: ldarg.0 + IL_0030: ldfld int32 assembly/rwalk1@5::x + IL_0035: stfld int32 assembly/rwalk1@5::current + IL_003a: ldc.i4.1 + IL_003b: ret + + IL_003c: ldarg.0 + IL_003d: ldc.i4.2 + IL_003e: stfld int32 assembly/rwalk1@5::pc + IL_0043: ldarg.1 + IL_0044: ldarg.0 + IL_0045: ldfld int32 assembly/rwalk1@5::x + IL_004a: ldc.i4.1 + IL_004b: add + IL_004c: call class [runtime]System.Collections.Generic.IEnumerable`1 assembly::rwalk2(int32) + IL_0051: stobj class [runtime]System.Collections.Generic.IEnumerable`1 + IL_0056: ldc.i4.2 + IL_0057: ret + + IL_0058: ldarg.0 + IL_0059: ldc.i4.3 + IL_005a: stfld int32 assembly/rwalk1@5::pc + IL_005f: ldarg.0 + IL_0060: ldc.i4.0 + IL_0061: stfld int32 assembly/rwalk1@5::current + IL_0066: ldc.i4.0 + IL_0067: ret } - .method public strict virtual instance void - Close() cil managed + .method public strict virtual instance void Close() cil managed { .maxstack 8 @@ -146,8 +136,7 @@ IL_0007: ret } - .method public strict virtual instance bool - get_CheckClose() cil managed + .method public strict virtual instance bool get_CheckClose() cil managed { .maxstack 8 @@ -161,30 +150,31 @@ IL_001b: br.s IL_0029 IL_001d: nop - IL_001e: br.s IL_002e + IL_001e: br.s IL_0030 IL_0020: nop - IL_0021: br.s IL_002c + IL_0021: br.s IL_002e IL_0023: nop - IL_0024: br.s IL_002a + IL_0024: br.s IL_002c IL_0026: nop - IL_0027: br.s IL_002e + IL_0027: br.s IL_0030 IL_0029: nop - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002a: br.s IL_002c IL_002c: ldc.i4.0 IL_002d: ret IL_002e: ldc.i4.0 IL_002f: ret + + IL_0030: ldc.i4.0 + IL_0031: ret } - .method public strict virtual instance int32 - get_LastGenerated() cil managed + .method public strict virtual instance int32 get_LastGenerated() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -195,8 +185,7 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 - GetFreshEnumerator() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -248,8 +237,7 @@ IL_001b: ret } - .method public strict virtual instance int32 - GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { .maxstack 7 @@ -264,50 +252,51 @@ IL_0019: br.s IL_0024 IL_001b: nop - IL_001c: br.s IL_003a + IL_001c: br.s IL_003c IL_001e: nop - IL_001f: br.s IL_0056 + IL_001f: br.s IL_0058 IL_0021: nop - IL_0022: br.s IL_005d + IL_0022: br.s IL_005f IL_0024: nop - IL_0025: ldarg.0 - IL_0026: ldc.i4.1 - IL_0027: stfld int32 assembly/rwalk2@6::pc - IL_002c: ldarg.0 - IL_002d: ldarg.0 - IL_002e: ldfld int32 assembly/rwalk2@6::x - IL_0033: stfld int32 assembly/rwalk2@6::current - IL_0038: ldc.i4.1 - IL_0039: ret - - IL_003a: ldarg.0 - IL_003b: ldc.i4.2 - IL_003c: stfld int32 assembly/rwalk2@6::pc - IL_0041: ldarg.1 - IL_0042: ldarg.0 - IL_0043: ldfld int32 assembly/rwalk2@6::x - IL_0048: ldc.i4.1 - IL_0049: add - IL_004a: call class [runtime]System.Collections.Generic.IEnumerable`1 assembly::rwalk1(int32) - IL_004f: stobj class [runtime]System.Collections.Generic.IEnumerable`1 - IL_0054: ldc.i4.2 - IL_0055: ret - - IL_0056: ldarg.0 - IL_0057: ldc.i4.3 - IL_0058: stfld int32 assembly/rwalk2@6::pc - IL_005d: ldarg.0 - IL_005e: ldc.i4.0 - IL_005f: stfld int32 assembly/rwalk2@6::current - IL_0064: ldc.i4.0 - IL_0065: ret + IL_0025: br.s IL_0027 + + IL_0027: ldarg.0 + IL_0028: ldc.i4.1 + IL_0029: stfld int32 assembly/rwalk2@6::pc + IL_002e: ldarg.0 + IL_002f: ldarg.0 + IL_0030: ldfld int32 assembly/rwalk2@6::x + IL_0035: stfld int32 assembly/rwalk2@6::current + IL_003a: ldc.i4.1 + IL_003b: ret + + IL_003c: ldarg.0 + IL_003d: ldc.i4.2 + IL_003e: stfld int32 assembly/rwalk2@6::pc + IL_0043: ldarg.1 + IL_0044: ldarg.0 + IL_0045: ldfld int32 assembly/rwalk2@6::x + IL_004a: ldc.i4.1 + IL_004b: add + IL_004c: call class [runtime]System.Collections.Generic.IEnumerable`1 assembly::rwalk1(int32) + IL_0051: stobj class [runtime]System.Collections.Generic.IEnumerable`1 + IL_0056: ldc.i4.2 + IL_0057: ret + + IL_0058: ldarg.0 + IL_0059: ldc.i4.3 + IL_005a: stfld int32 assembly/rwalk2@6::pc + IL_005f: ldarg.0 + IL_0060: ldc.i4.0 + IL_0061: stfld int32 assembly/rwalk2@6::current + IL_0066: ldc.i4.0 + IL_0067: ret } - .method public strict virtual instance void - Close() cil managed + .method public strict virtual instance void Close() cil managed { .maxstack 8 @@ -317,8 +306,7 @@ IL_0007: ret } - .method public strict virtual instance bool - get_CheckClose() cil managed + .method public strict virtual instance bool get_CheckClose() cil managed { .maxstack 8 @@ -332,30 +320,31 @@ IL_001b: br.s IL_0029 IL_001d: nop - IL_001e: br.s IL_002e + IL_001e: br.s IL_0030 IL_0020: nop - IL_0021: br.s IL_002c + IL_0021: br.s IL_002e IL_0023: nop - IL_0024: br.s IL_002a + IL_0024: br.s IL_002c IL_0026: nop - IL_0027: br.s IL_002e + IL_0027: br.s IL_0030 IL_0029: nop - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002a: br.s IL_002c IL_002c: ldc.i4.0 IL_002d: ret IL_002e: ldc.i4.0 IL_002f: ret + + IL_0030: ldc.i4.0 + IL_0031: ret } - .method public strict virtual instance int32 - get_LastGenerated() cil managed + .method public strict virtual instance int32 get_LastGenerated() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -366,8 +355,7 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 - GetFreshEnumerator() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -385,8 +373,7 @@ } - .method public static class [runtime]System.Collections.Generic.IEnumerable`1 - rwalk1(int32 x) cil managed + .method public static class [runtime]System.Collections.Generic.IEnumerable`1 rwalk1(int32 x) cil managed { .maxstack 8 @@ -399,8 +386,7 @@ IL_0008: ret } - .method public static class [runtime]System.Collections.Generic.IEnumerable`1 - rwalk2(int32 x) cil managed + .method public static class [runtime]System.Collections.Generic.IEnumerable`1 rwalk2(int32 x) cil managed { .maxstack 8 @@ -432,4 +418,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl index 43e2de4d4aa..7e20463bda6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -78,7 +78,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0042 + IL_0006: leave.s IL_0044 } filter @@ -93,32 +93,34 @@ IL_0018: ldc.i4.1 IL_0019: nop - IL_001a: br.s IL_001e + IL_001a: br.s IL_0020 IL_001c: ldc.i4.0 IL_001d: nop - IL_001e: endfilter + IL_001e: br.s IL_0020 + + IL_0020: endfilter } { - IL_0020: castclass [runtime]System.Exception - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: isinst [runtime]System.ArgumentException - IL_002c: stloc.3 - IL_002d: ldloc.3 - IL_002e: brfalse.s IL_0037 - - IL_0030: call void [runtime]System.Console::WriteLine() - IL_0035: leave.s IL_0042 - - IL_0037: rethrow - IL_0039: ldnull - IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_003f: pop - IL_0040: leave.s IL_0042 + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.2 + IL_0028: ldloc.2 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.3 + IL_002f: ldloc.3 + IL_0030: brfalse.s IL_0039 + + IL_0032: call void [runtime]System.Console::WriteLine() + IL_0037: leave.s IL_0044 + + IL_0039: rethrow + IL_003b: ldnull + IL_003c: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0041: pop + IL_0042: leave.s IL_0044 } - IL_0042: ret + IL_0044: ret } .method public static void test3() cil managed @@ -135,7 +137,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0051 + IL_0006: leave.s IL_0053 } filter @@ -152,36 +154,38 @@ IL_0019: stloc.2 IL_001a: ldc.i4.1 IL_001b: nop - IL_001c: br.s IL_0020 + IL_001c: br.s IL_0022 IL_001e: ldc.i4.0 IL_001f: nop - IL_0020: endfilter + IL_0020: br.s IL_0022 + + IL_0022: endfilter } { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.3 - IL_0028: ldloc.3 - IL_0029: isinst [runtime]System.ArgumentException - IL_002e: stloc.s V_4 - IL_0030: ldloc.s V_4 - IL_0032: brfalse.s IL_0046 - - IL_0034: ldloc.s V_4 - IL_0036: stloc.s V_5 - IL_0038: ldloc.s V_5 - IL_003a: callvirt instance string [runtime]System.Exception::get_Message() - IL_003f: call void [runtime]System.Console::WriteLine(string) - IL_0044: leave.s IL_0051 - - IL_0046: rethrow - IL_0048: ldnull - IL_0049: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_004e: pop - IL_004f: leave.s IL_0051 + IL_0024: castclass [runtime]System.Exception + IL_0029: stloc.3 + IL_002a: ldloc.3 + IL_002b: isinst [runtime]System.ArgumentException + IL_0030: stloc.s V_4 + IL_0032: ldloc.s V_4 + IL_0034: brfalse.s IL_0048 + + IL_0036: ldloc.s V_4 + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: callvirt instance string [runtime]System.Exception::get_Message() + IL_0041: call void [runtime]System.Console::WriteLine(string) + IL_0046: leave.s IL_0053 + + IL_0048: rethrow + IL_004a: ldnull + IL_004b: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0050: pop + IL_0051: leave.s IL_0053 } - IL_0051: ret + IL_0053: ret } .method public static void test4() cil managed @@ -198,7 +202,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_005f + IL_0006: leave.s IL_0061 } filter @@ -217,37 +221,39 @@ IL_0023: stloc.2 IL_0024: ldc.i4.1 IL_0025: nop - IL_0026: br.s IL_002a + IL_0026: br.s IL_002c IL_0028: ldc.i4.0 IL_0029: nop - IL_002a: endfilter + IL_002a: br.s IL_002c + + IL_002c: endfilter } { - IL_002c: castclass [runtime]System.Exception - IL_0031: stloc.3 - IL_0032: ldloc.3 - IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0038: stloc.s V_4 - IL_003a: ldloc.s V_4 - IL_003c: brfalse.s IL_0054 - - IL_003e: ldloc.3 - IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0049: stloc.s V_5 - IL_004b: ldloc.s V_5 - IL_004d: call void [runtime]System.Console::WriteLine(string) - IL_0052: leave.s IL_005f - - IL_0054: rethrow - IL_0056: ldnull - IL_0057: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_005c: pop - IL_005d: leave.s IL_005f + IL_002e: castclass [runtime]System.Exception + IL_0033: stloc.3 + IL_0034: ldloc.3 + IL_0035: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: stloc.s V_4 + IL_003c: ldloc.s V_4 + IL_003e: brfalse.s IL_0056 + + IL_0040: ldloc.3 + IL_0041: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0046: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_004b: stloc.s V_5 + IL_004d: ldloc.s V_5 + IL_004f: call void [runtime]System.Console::WriteLine(string) + IL_0054: leave.s IL_0061 + + IL_0056: rethrow + IL_0058: ldnull + IL_0059: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005e: pop + IL_005f: leave.s IL_0061 } - IL_005f: ret + IL_0061: ret } .method public static void test5() cil managed @@ -333,4 +339,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index 0a339bb2ae3..71829533f3d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -69,7 +69,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0042 + IL_0006: leave.s IL_0044 } filter @@ -84,32 +84,34 @@ IL_0018: ldc.i4.1 IL_0019: nop - IL_001a: br.s IL_001e + IL_001a: br.s IL_0020 IL_001c: ldc.i4.0 IL_001d: nop - IL_001e: endfilter + IL_001e: br.s IL_0020 + + IL_0020: endfilter } { - IL_0020: castclass [runtime]System.Exception - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: isinst [runtime]System.ArgumentException - IL_002c: stloc.3 - IL_002d: ldloc.3 - IL_002e: brfalse.s IL_0037 - - IL_0030: call void [runtime]System.Console::WriteLine() - IL_0035: leave.s IL_0042 - - IL_0037: rethrow - IL_0039: ldnull - IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_003f: pop - IL_0040: leave.s IL_0042 + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.2 + IL_0028: ldloc.2 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.3 + IL_002f: ldloc.3 + IL_0030: brfalse.s IL_0039 + + IL_0032: call void [runtime]System.Console::WriteLine() + IL_0037: leave.s IL_0044 + + IL_0039: rethrow + IL_003b: ldnull + IL_003c: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0041: pop + IL_0042: leave.s IL_0044 } - IL_0042: ret + IL_0044: ret } .method public static void test3() cil managed @@ -126,7 +128,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0051 + IL_0006: leave.s IL_0053 } filter @@ -143,36 +145,38 @@ IL_0019: stloc.2 IL_001a: ldc.i4.1 IL_001b: nop - IL_001c: br.s IL_0020 + IL_001c: br.s IL_0022 IL_001e: ldc.i4.0 IL_001f: nop - IL_0020: endfilter + IL_0020: br.s IL_0022 + + IL_0022: endfilter } { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.3 - IL_0028: ldloc.3 - IL_0029: isinst [runtime]System.ArgumentException - IL_002e: stloc.s V_4 - IL_0030: ldloc.s V_4 - IL_0032: brfalse.s IL_0046 - - IL_0034: ldloc.s V_4 - IL_0036: stloc.s V_5 - IL_0038: ldloc.s V_5 - IL_003a: callvirt instance string [runtime]System.Exception::get_Message() - IL_003f: call void [runtime]System.Console::WriteLine(string) - IL_0044: leave.s IL_0051 - - IL_0046: rethrow - IL_0048: ldnull - IL_0049: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_004e: pop - IL_004f: leave.s IL_0051 + IL_0024: castclass [runtime]System.Exception + IL_0029: stloc.3 + IL_002a: ldloc.3 + IL_002b: isinst [runtime]System.ArgumentException + IL_0030: stloc.s V_4 + IL_0032: ldloc.s V_4 + IL_0034: brfalse.s IL_0048 + + IL_0036: ldloc.s V_4 + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: callvirt instance string [runtime]System.Exception::get_Message() + IL_0041: call void [runtime]System.Console::WriteLine(string) + IL_0046: leave.s IL_0053 + + IL_0048: rethrow + IL_004a: ldnull + IL_004b: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0050: pop + IL_0051: leave.s IL_0053 } - IL_0051: ret + IL_0053: ret } .method public static void test4() cil managed @@ -189,7 +193,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_005f + IL_0006: leave.s IL_0061 } filter @@ -208,37 +212,39 @@ IL_0023: stloc.2 IL_0024: ldc.i4.1 IL_0025: nop - IL_0026: br.s IL_002a + IL_0026: br.s IL_002c IL_0028: ldc.i4.0 IL_0029: nop - IL_002a: endfilter + IL_002a: br.s IL_002c + + IL_002c: endfilter } { - IL_002c: castclass [runtime]System.Exception - IL_0031: stloc.3 - IL_0032: ldloc.3 - IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0038: stloc.s V_4 - IL_003a: ldloc.s V_4 - IL_003c: brfalse.s IL_0054 - - IL_003e: ldloc.3 - IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0049: stloc.s V_5 - IL_004b: ldloc.s V_5 - IL_004d: call void [runtime]System.Console::WriteLine(string) - IL_0052: leave.s IL_005f - - IL_0054: rethrow - IL_0056: ldnull - IL_0057: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_005c: pop - IL_005d: leave.s IL_005f + IL_002e: castclass [runtime]System.Exception + IL_0033: stloc.3 + IL_0034: ldloc.3 + IL_0035: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: stloc.s V_4 + IL_003c: ldloc.s V_4 + IL_003e: brfalse.s IL_0056 + + IL_0040: ldloc.3 + IL_0041: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0046: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_004b: stloc.s V_5 + IL_004d: ldloc.s V_5 + IL_004f: call void [runtime]System.Console::WriteLine(string) + IL_0054: leave.s IL_0061 + + IL_0056: rethrow + IL_0058: ldnull + IL_0059: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005e: pop + IL_005f: leave.s IL_0061 } - IL_005f: ret + IL_0061: ret } .method public static void test5() cil managed @@ -324,4 +330,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl index c85c72152d8..156dd7d35f3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl @@ -67,7 +67,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0042 + IL_0006: leave.s IL_0044 } filter @@ -82,32 +82,34 @@ IL_0018: ldc.i4.1 IL_0019: nop - IL_001a: br.s IL_001e + IL_001a: br.s IL_0020 IL_001c: ldc.i4.0 IL_001d: nop - IL_001e: endfilter + IL_001e: br.s IL_0020 + + IL_0020: endfilter } { - IL_0020: castclass [runtime]System.Exception - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: isinst [runtime]System.ArgumentException - IL_002c: stloc.1 - IL_002d: ldloc.1 - IL_002e: brfalse.s IL_0037 - - IL_0030: call void [runtime]System.Console::WriteLine() - IL_0035: leave.s IL_0042 - - IL_0037: rethrow - IL_0039: ldnull - IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_003f: pop - IL_0040: leave.s IL_0042 + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.2 + IL_0028: ldloc.2 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: brfalse.s IL_0039 + + IL_0032: call void [runtime]System.Console::WriteLine() + IL_0037: leave.s IL_0044 + + IL_0039: rethrow + IL_003b: ldnull + IL_003c: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0041: pop + IL_0042: leave.s IL_0044 } - IL_0042: ret + IL_0044: ret } .method public static void test3() cil managed @@ -122,7 +124,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_004c + IL_0006: leave.s IL_004e } filter @@ -139,36 +141,38 @@ IL_0019: stloc.2 IL_001a: ldc.i4.1 IL_001b: nop - IL_001c: br.s IL_0020 + IL_001c: br.s IL_0022 IL_001e: ldc.i4.0 IL_001f: nop - IL_0020: endfilter + IL_0020: br.s IL_0022 + + IL_0022: endfilter } { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.3 - IL_0028: ldloc.3 - IL_0029: isinst [runtime]System.ArgumentException - IL_002e: stloc.1 - IL_002f: ldloc.1 - IL_0030: brfalse.s IL_0041 - - IL_0032: ldloc.1 - IL_0033: stloc.2 - IL_0034: ldloc.2 - IL_0035: callvirt instance string [runtime]System.Exception::get_Message() - IL_003a: call void [runtime]System.Console::WriteLine(string) - IL_003f: leave.s IL_004c - - IL_0041: rethrow - IL_0043: ldnull - IL_0044: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0049: pop - IL_004a: leave.s IL_004c + IL_0024: castclass [runtime]System.Exception + IL_0029: stloc.3 + IL_002a: ldloc.3 + IL_002b: isinst [runtime]System.ArgumentException + IL_0030: stloc.1 + IL_0031: ldloc.1 + IL_0032: brfalse.s IL_0043 + + IL_0034: ldloc.1 + IL_0035: stloc.2 + IL_0036: ldloc.2 + IL_0037: callvirt instance string [runtime]System.Exception::get_Message() + IL_003c: call void [runtime]System.Console::WriteLine(string) + IL_0041: leave.s IL_004e + + IL_0043: rethrow + IL_0045: ldnull + IL_0046: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_004b: pop + IL_004c: leave.s IL_004e } - IL_004c: ret + IL_004e: ret } .method public static void test4() cil managed @@ -183,7 +187,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_005b + IL_0006: leave.s IL_005d } filter @@ -202,37 +206,39 @@ IL_0023: stloc.2 IL_0024: ldc.i4.1 IL_0025: nop - IL_0026: br.s IL_002a + IL_0026: br.s IL_002c IL_0028: ldc.i4.0 IL_0029: nop - IL_002a: endfilter + IL_002a: br.s IL_002c + + IL_002c: endfilter } { - IL_002c: castclass [runtime]System.Exception - IL_0031: stloc.3 - IL_0032: ldloc.3 - IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0038: stloc.1 - IL_0039: ldloc.1 - IL_003a: brfalse.s IL_0050 - - IL_003c: ldloc.3 - IL_003d: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0042: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0047: stloc.2 - IL_0048: ldloc.2 - IL_0049: call void [runtime]System.Console::WriteLine(string) - IL_004e: leave.s IL_005b - - IL_0050: rethrow - IL_0052: ldnull - IL_0053: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0058: pop - IL_0059: leave.s IL_005b + IL_002e: castclass [runtime]System.Exception + IL_0033: stloc.3 + IL_0034: ldloc.3 + IL_0035: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: stloc.1 + IL_003b: ldloc.1 + IL_003c: brfalse.s IL_0052 + + IL_003e: ldloc.3 + IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0049: stloc.2 + IL_004a: ldloc.2 + IL_004b: call void [runtime]System.Console::WriteLine(string) + IL_0050: leave.s IL_005d + + IL_0052: rethrow + IL_0054: ldnull + IL_0055: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005a: pop + IL_005b: leave.s IL_005d } - IL_005b: ret + IL_005d: ret } .method public static void test5() cil managed @@ -305,4 +311,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl index a73fda88e58..13cebba8063 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl @@ -68,7 +68,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0042 + IL_0006: leave.s IL_0044 } filter @@ -83,32 +83,34 @@ IL_0018: ldc.i4.1 IL_0019: nop - IL_001a: br.s IL_001e + IL_001a: br.s IL_0020 IL_001c: ldc.i4.0 IL_001d: nop - IL_001e: endfilter + IL_001e: br.s IL_0020 + + IL_0020: endfilter } { - IL_0020: castclass [runtime]System.Exception - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: isinst [runtime]System.ArgumentException - IL_002c: stloc.1 - IL_002d: ldloc.1 - IL_002e: brfalse.s IL_0037 - - IL_0030: call void [runtime]System.Console::WriteLine() - IL_0035: leave.s IL_0042 - - IL_0037: rethrow - IL_0039: ldnull - IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_003f: pop - IL_0040: leave.s IL_0042 + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.2 + IL_0028: ldloc.2 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: brfalse.s IL_0039 + + IL_0032: call void [runtime]System.Console::WriteLine() + IL_0037: leave.s IL_0044 + + IL_0039: rethrow + IL_003b: ldnull + IL_003c: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0041: pop + IL_0042: leave.s IL_0044 } - IL_0042: ret + IL_0044: ret } .method public static void test3() cil managed @@ -123,7 +125,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_004c + IL_0006: leave.s IL_004e } filter @@ -140,36 +142,38 @@ IL_0019: stloc.2 IL_001a: ldc.i4.1 IL_001b: nop - IL_001c: br.s IL_0020 + IL_001c: br.s IL_0022 IL_001e: ldc.i4.0 IL_001f: nop - IL_0020: endfilter + IL_0020: br.s IL_0022 + + IL_0022: endfilter } { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.3 - IL_0028: ldloc.3 - IL_0029: isinst [runtime]System.ArgumentException - IL_002e: stloc.1 - IL_002f: ldloc.1 - IL_0030: brfalse.s IL_0041 - - IL_0032: ldloc.1 - IL_0033: stloc.2 - IL_0034: ldloc.2 - IL_0035: callvirt instance string [runtime]System.Exception::get_Message() - IL_003a: call void [runtime]System.Console::WriteLine(string) - IL_003f: leave.s IL_004c - - IL_0041: rethrow - IL_0043: ldnull - IL_0044: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0049: pop - IL_004a: leave.s IL_004c + IL_0024: castclass [runtime]System.Exception + IL_0029: stloc.3 + IL_002a: ldloc.3 + IL_002b: isinst [runtime]System.ArgumentException + IL_0030: stloc.1 + IL_0031: ldloc.1 + IL_0032: brfalse.s IL_0043 + + IL_0034: ldloc.1 + IL_0035: stloc.2 + IL_0036: ldloc.2 + IL_0037: callvirt instance string [runtime]System.Exception::get_Message() + IL_003c: call void [runtime]System.Console::WriteLine(string) + IL_0041: leave.s IL_004e + + IL_0043: rethrow + IL_0045: ldnull + IL_0046: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_004b: pop + IL_004c: leave.s IL_004e } - IL_004c: ret + IL_004e: ret } .method public static void test4() cil managed @@ -184,7 +188,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_005b + IL_0006: leave.s IL_005d } filter @@ -203,37 +207,39 @@ IL_0023: stloc.2 IL_0024: ldc.i4.1 IL_0025: nop - IL_0026: br.s IL_002a + IL_0026: br.s IL_002c IL_0028: ldc.i4.0 IL_0029: nop - IL_002a: endfilter + IL_002a: br.s IL_002c + + IL_002c: endfilter } { - IL_002c: castclass [runtime]System.Exception - IL_0031: stloc.3 - IL_0032: ldloc.3 - IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0038: stloc.1 - IL_0039: ldloc.1 - IL_003a: brfalse.s IL_0050 - - IL_003c: ldloc.3 - IL_003d: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0042: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0047: stloc.2 - IL_0048: ldloc.2 - IL_0049: call void [runtime]System.Console::WriteLine(string) - IL_004e: leave.s IL_005b - - IL_0050: rethrow - IL_0052: ldnull - IL_0053: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0058: pop - IL_0059: leave.s IL_005b + IL_002e: castclass [runtime]System.Exception + IL_0033: stloc.3 + IL_0034: ldloc.3 + IL_0035: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: stloc.1 + IL_003b: ldloc.1 + IL_003c: brfalse.s IL_0052 + + IL_003e: ldloc.3 + IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0049: stloc.2 + IL_004a: ldloc.2 + IL_004b: call void [runtime]System.Console::WriteLine(string) + IL_0050: leave.s IL_005d + + IL_0052: rethrow + IL_0054: ldnull + IL_0055: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005a: pop + IL_005b: leave.s IL_005d } - IL_005b: ret + IL_005d: ret } .method public static void test5() cil managed @@ -306,4 +312,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl index 433c9858f45..39189748dac 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl @@ -68,7 +68,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0042 + IL_0006: leave.s IL_0044 } filter @@ -83,32 +83,34 @@ IL_0018: ldc.i4.1 IL_0019: nop - IL_001a: br.s IL_001e + IL_001a: br.s IL_0020 IL_001c: ldc.i4.0 IL_001d: nop - IL_001e: endfilter + IL_001e: br.s IL_0020 + + IL_0020: endfilter } { - IL_0020: castclass [runtime]System.Exception - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: isinst [runtime]System.ArgumentException - IL_002c: stloc.3 - IL_002d: ldloc.3 - IL_002e: brfalse.s IL_0037 - - IL_0030: call void [runtime]System.Console::WriteLine() - IL_0035: leave.s IL_0042 - - IL_0037: rethrow - IL_0039: ldnull - IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_003f: pop - IL_0040: leave.s IL_0042 + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.2 + IL_0028: ldloc.2 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.3 + IL_002f: ldloc.3 + IL_0030: brfalse.s IL_0039 + + IL_0032: call void [runtime]System.Console::WriteLine() + IL_0037: leave.s IL_0044 + + IL_0039: rethrow + IL_003b: ldnull + IL_003c: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0041: pop + IL_0042: leave.s IL_0044 } - IL_0042: ret + IL_0044: ret } .method public static void test3() cil managed @@ -125,7 +127,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0051 + IL_0006: leave.s IL_0053 } filter @@ -142,36 +144,38 @@ IL_0019: stloc.2 IL_001a: ldc.i4.1 IL_001b: nop - IL_001c: br.s IL_0020 + IL_001c: br.s IL_0022 IL_001e: ldc.i4.0 IL_001f: nop - IL_0020: endfilter + IL_0020: br.s IL_0022 + + IL_0022: endfilter } { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.3 - IL_0028: ldloc.3 - IL_0029: isinst [runtime]System.ArgumentException - IL_002e: stloc.s V_4 - IL_0030: ldloc.s V_4 - IL_0032: brfalse.s IL_0046 - - IL_0034: ldloc.s V_4 - IL_0036: stloc.s V_5 - IL_0038: ldloc.s V_5 - IL_003a: callvirt instance string [runtime]System.Exception::get_Message() - IL_003f: call void [runtime]System.Console::WriteLine(string) - IL_0044: leave.s IL_0051 - - IL_0046: rethrow - IL_0048: ldnull - IL_0049: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_004e: pop - IL_004f: leave.s IL_0051 + IL_0024: castclass [runtime]System.Exception + IL_0029: stloc.3 + IL_002a: ldloc.3 + IL_002b: isinst [runtime]System.ArgumentException + IL_0030: stloc.s V_4 + IL_0032: ldloc.s V_4 + IL_0034: brfalse.s IL_0048 + + IL_0036: ldloc.s V_4 + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: callvirt instance string [runtime]System.Exception::get_Message() + IL_0041: call void [runtime]System.Console::WriteLine(string) + IL_0046: leave.s IL_0053 + + IL_0048: rethrow + IL_004a: ldnull + IL_004b: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0050: pop + IL_0051: leave.s IL_0053 } - IL_0051: ret + IL_0053: ret } .method public static void test4() cil managed @@ -188,7 +192,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_005f + IL_0006: leave.s IL_0061 } filter @@ -207,37 +211,39 @@ IL_0023: stloc.2 IL_0024: ldc.i4.1 IL_0025: nop - IL_0026: br.s IL_002a + IL_0026: br.s IL_002c IL_0028: ldc.i4.0 IL_0029: nop - IL_002a: endfilter + IL_002a: br.s IL_002c + + IL_002c: endfilter } { - IL_002c: castclass [runtime]System.Exception - IL_0031: stloc.3 - IL_0032: ldloc.3 - IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0038: stloc.s V_4 - IL_003a: ldloc.s V_4 - IL_003c: brfalse.s IL_0054 - - IL_003e: ldloc.3 - IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0049: stloc.s V_5 - IL_004b: ldloc.s V_5 - IL_004d: call void [runtime]System.Console::WriteLine(string) - IL_0052: leave.s IL_005f - - IL_0054: rethrow - IL_0056: ldnull - IL_0057: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_005c: pop - IL_005d: leave.s IL_005f + IL_002e: castclass [runtime]System.Exception + IL_0033: stloc.3 + IL_0034: ldloc.3 + IL_0035: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: stloc.s V_4 + IL_003c: ldloc.s V_4 + IL_003e: brfalse.s IL_0056 + + IL_0040: ldloc.3 + IL_0041: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0046: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_004b: stloc.s V_5 + IL_004d: ldloc.s V_5 + IL_004f: call void [runtime]System.Console::WriteLine(string) + IL_0054: leave.s IL_0061 + + IL_0056: rethrow + IL_0058: ldnull + IL_0059: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005e: pop + IL_005f: leave.s IL_0061 } - IL_005f: ret + IL_0061: ret } .method public static void test5() cil managed @@ -323,4 +329,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl index 0a339bb2ae3..71829533f3d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -69,7 +69,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0042 + IL_0006: leave.s IL_0044 } filter @@ -84,32 +84,34 @@ IL_0018: ldc.i4.1 IL_0019: nop - IL_001a: br.s IL_001e + IL_001a: br.s IL_0020 IL_001c: ldc.i4.0 IL_001d: nop - IL_001e: endfilter + IL_001e: br.s IL_0020 + + IL_0020: endfilter } { - IL_0020: castclass [runtime]System.Exception - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: isinst [runtime]System.ArgumentException - IL_002c: stloc.3 - IL_002d: ldloc.3 - IL_002e: brfalse.s IL_0037 - - IL_0030: call void [runtime]System.Console::WriteLine() - IL_0035: leave.s IL_0042 - - IL_0037: rethrow - IL_0039: ldnull - IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_003f: pop - IL_0040: leave.s IL_0042 + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.2 + IL_0028: ldloc.2 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.3 + IL_002f: ldloc.3 + IL_0030: brfalse.s IL_0039 + + IL_0032: call void [runtime]System.Console::WriteLine() + IL_0037: leave.s IL_0044 + + IL_0039: rethrow + IL_003b: ldnull + IL_003c: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0041: pop + IL_0042: leave.s IL_0044 } - IL_0042: ret + IL_0044: ret } .method public static void test3() cil managed @@ -126,7 +128,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0051 + IL_0006: leave.s IL_0053 } filter @@ -143,36 +145,38 @@ IL_0019: stloc.2 IL_001a: ldc.i4.1 IL_001b: nop - IL_001c: br.s IL_0020 + IL_001c: br.s IL_0022 IL_001e: ldc.i4.0 IL_001f: nop - IL_0020: endfilter + IL_0020: br.s IL_0022 + + IL_0022: endfilter } { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.3 - IL_0028: ldloc.3 - IL_0029: isinst [runtime]System.ArgumentException - IL_002e: stloc.s V_4 - IL_0030: ldloc.s V_4 - IL_0032: brfalse.s IL_0046 - - IL_0034: ldloc.s V_4 - IL_0036: stloc.s V_5 - IL_0038: ldloc.s V_5 - IL_003a: callvirt instance string [runtime]System.Exception::get_Message() - IL_003f: call void [runtime]System.Console::WriteLine(string) - IL_0044: leave.s IL_0051 - - IL_0046: rethrow - IL_0048: ldnull - IL_0049: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_004e: pop - IL_004f: leave.s IL_0051 + IL_0024: castclass [runtime]System.Exception + IL_0029: stloc.3 + IL_002a: ldloc.3 + IL_002b: isinst [runtime]System.ArgumentException + IL_0030: stloc.s V_4 + IL_0032: ldloc.s V_4 + IL_0034: brfalse.s IL_0048 + + IL_0036: ldloc.s V_4 + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: callvirt instance string [runtime]System.Exception::get_Message() + IL_0041: call void [runtime]System.Console::WriteLine(string) + IL_0046: leave.s IL_0053 + + IL_0048: rethrow + IL_004a: ldnull + IL_004b: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0050: pop + IL_0051: leave.s IL_0053 } - IL_0051: ret + IL_0053: ret } .method public static void test4() cil managed @@ -189,7 +193,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_005f + IL_0006: leave.s IL_0061 } filter @@ -208,37 +212,39 @@ IL_0023: stloc.2 IL_0024: ldc.i4.1 IL_0025: nop - IL_0026: br.s IL_002a + IL_0026: br.s IL_002c IL_0028: ldc.i4.0 IL_0029: nop - IL_002a: endfilter + IL_002a: br.s IL_002c + + IL_002c: endfilter } { - IL_002c: castclass [runtime]System.Exception - IL_0031: stloc.3 - IL_0032: ldloc.3 - IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0038: stloc.s V_4 - IL_003a: ldloc.s V_4 - IL_003c: brfalse.s IL_0054 - - IL_003e: ldloc.3 - IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0049: stloc.s V_5 - IL_004b: ldloc.s V_5 - IL_004d: call void [runtime]System.Console::WriteLine(string) - IL_0052: leave.s IL_005f - - IL_0054: rethrow - IL_0056: ldnull - IL_0057: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_005c: pop - IL_005d: leave.s IL_005f + IL_002e: castclass [runtime]System.Exception + IL_0033: stloc.3 + IL_0034: ldloc.3 + IL_0035: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: stloc.s V_4 + IL_003c: ldloc.s V_4 + IL_003e: brfalse.s IL_0056 + + IL_0040: ldloc.3 + IL_0041: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0046: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_004b: stloc.s V_5 + IL_004d: ldloc.s V_5 + IL_004f: call void [runtime]System.Console::WriteLine(string) + IL_0054: leave.s IL_0061 + + IL_0056: rethrow + IL_0058: ldnull + IL_0059: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005e: pop + IL_005f: leave.s IL_0061 } - IL_005f: ret + IL_0061: ret } .method public static void test5() cil managed @@ -324,4 +330,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl index c85c72152d8..156dd7d35f3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl @@ -67,7 +67,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0042 + IL_0006: leave.s IL_0044 } filter @@ -82,32 +82,34 @@ IL_0018: ldc.i4.1 IL_0019: nop - IL_001a: br.s IL_001e + IL_001a: br.s IL_0020 IL_001c: ldc.i4.0 IL_001d: nop - IL_001e: endfilter + IL_001e: br.s IL_0020 + + IL_0020: endfilter } { - IL_0020: castclass [runtime]System.Exception - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: isinst [runtime]System.ArgumentException - IL_002c: stloc.1 - IL_002d: ldloc.1 - IL_002e: brfalse.s IL_0037 - - IL_0030: call void [runtime]System.Console::WriteLine() - IL_0035: leave.s IL_0042 - - IL_0037: rethrow - IL_0039: ldnull - IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_003f: pop - IL_0040: leave.s IL_0042 + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.2 + IL_0028: ldloc.2 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: brfalse.s IL_0039 + + IL_0032: call void [runtime]System.Console::WriteLine() + IL_0037: leave.s IL_0044 + + IL_0039: rethrow + IL_003b: ldnull + IL_003c: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0041: pop + IL_0042: leave.s IL_0044 } - IL_0042: ret + IL_0044: ret } .method public static void test3() cil managed @@ -122,7 +124,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_004c + IL_0006: leave.s IL_004e } filter @@ -139,36 +141,38 @@ IL_0019: stloc.2 IL_001a: ldc.i4.1 IL_001b: nop - IL_001c: br.s IL_0020 + IL_001c: br.s IL_0022 IL_001e: ldc.i4.0 IL_001f: nop - IL_0020: endfilter + IL_0020: br.s IL_0022 + + IL_0022: endfilter } { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.3 - IL_0028: ldloc.3 - IL_0029: isinst [runtime]System.ArgumentException - IL_002e: stloc.1 - IL_002f: ldloc.1 - IL_0030: brfalse.s IL_0041 - - IL_0032: ldloc.1 - IL_0033: stloc.2 - IL_0034: ldloc.2 - IL_0035: callvirt instance string [runtime]System.Exception::get_Message() - IL_003a: call void [runtime]System.Console::WriteLine(string) - IL_003f: leave.s IL_004c - - IL_0041: rethrow - IL_0043: ldnull - IL_0044: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0049: pop - IL_004a: leave.s IL_004c + IL_0024: castclass [runtime]System.Exception + IL_0029: stloc.3 + IL_002a: ldloc.3 + IL_002b: isinst [runtime]System.ArgumentException + IL_0030: stloc.1 + IL_0031: ldloc.1 + IL_0032: brfalse.s IL_0043 + + IL_0034: ldloc.1 + IL_0035: stloc.2 + IL_0036: ldloc.2 + IL_0037: callvirt instance string [runtime]System.Exception::get_Message() + IL_003c: call void [runtime]System.Console::WriteLine(string) + IL_0041: leave.s IL_004e + + IL_0043: rethrow + IL_0045: ldnull + IL_0046: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_004b: pop + IL_004c: leave.s IL_004e } - IL_004c: ret + IL_004e: ret } .method public static void test4() cil managed @@ -183,7 +187,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_005b + IL_0006: leave.s IL_005d } filter @@ -202,37 +206,39 @@ IL_0023: stloc.2 IL_0024: ldc.i4.1 IL_0025: nop - IL_0026: br.s IL_002a + IL_0026: br.s IL_002c IL_0028: ldc.i4.0 IL_0029: nop - IL_002a: endfilter + IL_002a: br.s IL_002c + + IL_002c: endfilter } { - IL_002c: castclass [runtime]System.Exception - IL_0031: stloc.3 - IL_0032: ldloc.3 - IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0038: stloc.1 - IL_0039: ldloc.1 - IL_003a: brfalse.s IL_0050 - - IL_003c: ldloc.3 - IL_003d: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0042: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0047: stloc.2 - IL_0048: ldloc.2 - IL_0049: call void [runtime]System.Console::WriteLine(string) - IL_004e: leave.s IL_005b - - IL_0050: rethrow - IL_0052: ldnull - IL_0053: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0058: pop - IL_0059: leave.s IL_005b + IL_002e: castclass [runtime]System.Exception + IL_0033: stloc.3 + IL_0034: ldloc.3 + IL_0035: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: stloc.1 + IL_003b: ldloc.1 + IL_003c: brfalse.s IL_0052 + + IL_003e: ldloc.3 + IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0049: stloc.2 + IL_004a: ldloc.2 + IL_004b: call void [runtime]System.Console::WriteLine(string) + IL_0050: leave.s IL_005d + + IL_0052: rethrow + IL_0054: ldnull + IL_0055: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005a: pop + IL_005b: leave.s IL_005d } - IL_005b: ret + IL_005d: ret } .method public static void test5() cil managed @@ -305,4 +311,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl index a73fda88e58..13cebba8063 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl @@ -68,7 +68,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_0042 + IL_0006: leave.s IL_0044 } filter @@ -83,32 +83,34 @@ IL_0018: ldc.i4.1 IL_0019: nop - IL_001a: br.s IL_001e + IL_001a: br.s IL_0020 IL_001c: ldc.i4.0 IL_001d: nop - IL_001e: endfilter + IL_001e: br.s IL_0020 + + IL_0020: endfilter } { - IL_0020: castclass [runtime]System.Exception - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: isinst [runtime]System.ArgumentException - IL_002c: stloc.1 - IL_002d: ldloc.1 - IL_002e: brfalse.s IL_0037 - - IL_0030: call void [runtime]System.Console::WriteLine() - IL_0035: leave.s IL_0042 - - IL_0037: rethrow - IL_0039: ldnull - IL_003a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_003f: pop - IL_0040: leave.s IL_0042 + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.2 + IL_0028: ldloc.2 + IL_0029: isinst [runtime]System.ArgumentException + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: brfalse.s IL_0039 + + IL_0032: call void [runtime]System.Console::WriteLine() + IL_0037: leave.s IL_0044 + + IL_0039: rethrow + IL_003b: ldnull + IL_003c: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0041: pop + IL_0042: leave.s IL_0044 } - IL_0042: ret + IL_0044: ret } .method public static void test3() cil managed @@ -123,7 +125,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_004c + IL_0006: leave.s IL_004e } filter @@ -140,36 +142,38 @@ IL_0019: stloc.2 IL_001a: ldc.i4.1 IL_001b: nop - IL_001c: br.s IL_0020 + IL_001c: br.s IL_0022 IL_001e: ldc.i4.0 IL_001f: nop - IL_0020: endfilter + IL_0020: br.s IL_0022 + + IL_0022: endfilter } { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.3 - IL_0028: ldloc.3 - IL_0029: isinst [runtime]System.ArgumentException - IL_002e: stloc.1 - IL_002f: ldloc.1 - IL_0030: brfalse.s IL_0041 - - IL_0032: ldloc.1 - IL_0033: stloc.2 - IL_0034: ldloc.2 - IL_0035: callvirt instance string [runtime]System.Exception::get_Message() - IL_003a: call void [runtime]System.Console::WriteLine(string) - IL_003f: leave.s IL_004c - - IL_0041: rethrow - IL_0043: ldnull - IL_0044: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0049: pop - IL_004a: leave.s IL_004c + IL_0024: castclass [runtime]System.Exception + IL_0029: stloc.3 + IL_002a: ldloc.3 + IL_002b: isinst [runtime]System.ArgumentException + IL_0030: stloc.1 + IL_0031: ldloc.1 + IL_0032: brfalse.s IL_0043 + + IL_0034: ldloc.1 + IL_0035: stloc.2 + IL_0036: ldloc.2 + IL_0037: callvirt instance string [runtime]System.Exception::get_Message() + IL_003c: call void [runtime]System.Console::WriteLine(string) + IL_0041: leave.s IL_004e + + IL_0043: rethrow + IL_0045: ldnull + IL_0046: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_004b: pop + IL_004c: leave.s IL_004e } - IL_004c: ret + IL_004e: ret } .method public static void test4() cil managed @@ -184,7 +188,7 @@ { IL_0000: nop IL_0001: call void [runtime]System.Console::WriteLine() - IL_0006: leave.s IL_005b + IL_0006: leave.s IL_005d } filter @@ -203,37 +207,39 @@ IL_0023: stloc.2 IL_0024: ldc.i4.1 IL_0025: nop - IL_0026: br.s IL_002a + IL_0026: br.s IL_002c IL_0028: ldc.i4.0 IL_0029: nop - IL_002a: endfilter + IL_002a: br.s IL_002c + + IL_002c: endfilter } { - IL_002c: castclass [runtime]System.Exception - IL_0031: stloc.3 - IL_0032: ldloc.3 - IL_0033: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0038: stloc.1 - IL_0039: ldloc.1 - IL_003a: brfalse.s IL_0050 - - IL_003c: ldloc.3 - IL_003d: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0042: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0047: stloc.2 - IL_0048: ldloc.2 - IL_0049: call void [runtime]System.Console::WriteLine(string) - IL_004e: leave.s IL_005b - - IL_0050: rethrow - IL_0052: ldnull - IL_0053: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0058: pop - IL_0059: leave.s IL_005b + IL_002e: castclass [runtime]System.Exception + IL_0033: stloc.3 + IL_0034: ldloc.3 + IL_0035: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_003a: stloc.1 + IL_003b: ldloc.1 + IL_003c: brfalse.s IL_0052 + + IL_003e: ldloc.3 + IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0049: stloc.2 + IL_004a: ldloc.2 + IL_004b: call void [runtime]System.Console::WriteLine(string) + IL_0050: leave.s IL_005d + + IL_0052: rethrow + IL_0054: ldnull + IL_0055: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005a: pop + IL_005b: leave.s IL_005d } - IL_005b: ret + IL_005d: ret } .method public static void test5() cil managed @@ -306,4 +312,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 63150ad3a7d..82a62c09ec4 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -327,7 +327,11 @@ + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/FindReferences.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/FindReferences.fs index 4b22719c2eb..e3b47139aa2 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/FindReferences.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/FindReferences.fs @@ -21,28 +21,19 @@ let deriveOccurrence (su:FSharpSymbolUse) = then Use else failwith $"Unexpected type of occurrence (for this test), symbolUse = {su}" -// ============================================================================= -// Test Helpers - Reduce boilerplate in single-file find-references tests -// ============================================================================= - -/// Finds all references to a symbol in source code using singleFileChecker. -/// Returns a list of (fileName, line, startCol, endCol) tuples. let findRefsInSource source symbolName = let fileName, options, checker = singleFileChecker source let symbolUse = getSymbolUse fileName source symbolName options checker |> Async.RunSynchronously checker.FindBackgroundReferencesInFile(fileName, options, symbolUse.Symbol) |> Async.RunSynchronously -/// Runs a complete find-references test: finds symbol and asserts expected ranges. let testFindRefsInSource source symbolName expectedRanges = findRefsInSource source symbolName |> expectToFind expectedRanges -/// Asserts that the given ranges contain exactly the expected line numbers. let expectLines expectedLines (ranges: range seq) = let actualLines = ranges |> Seq.map (fun r -> r.StartLine) |> Seq.sort |> Seq.distinct |> Seq.toList Assert.Equal(expectedLines, actualLines) -/// Asserts that the given ranges match the expected (line, startCol, endCol) tuples. let expectRanges expected (ranges: range seq) = let actual = ranges @@ -51,17 +42,14 @@ let expectRanges expected (ranges: range seq) = |> Seq.toArray Assert.Equal<(int * int * int) array>(expected, actual) -/// Asserts that ranges include references at all specified line numbers. let expectLinesInclude expectedLines (ranges: range list) = let actualLines = ranges |> List.map (fun r -> r.StartLine) |> Set.ofList for line in expectedLines do Assert.True(actualLines.Contains(line), $"Expected reference on line {line}. Ranges: {ranges}") -/// Asserts a minimum number of references. let expectMinRefs minCount (ranges: range list) = Assert.True(ranges.Length >= minCount, $"Expected at least {minCount} references, got {ranges.Length}") -/// Shorthand for simple find-all-references tests with SyntheticProject. let testFindAllRefs source symbolName assertion = SyntheticProject.Create({ sourceFile "Source" [] with Source = source }) .Workflow { @@ -69,7 +57,6 @@ let testFindAllRefs source symbolName assertion = findAllReferences assertion } -/// Shorthand for find-all-references tests expecting minimum count. let testFindAllRefsMin source symbolName minCount = testFindAllRefs source symbolName (expectMinRefs minCount) @@ -608,8 +595,7 @@ match 2 with | Even -> () | Odd -> () ]) } - /// Fix for bug: https://github.com/dotnet/fsharp/issues/19173 - /// Ensures active pattern cases are correctly distinguished in signature files + /// https://github.com/dotnet/fsharp/issues/19173 [] let ``Active pattern cases are correctly distinguished in signature files`` () = SyntheticProject.Create( @@ -617,12 +603,11 @@ match 2 with | Even -> () | Odd -> () Source = "let (|Even|Odd|) v = if v % 2 = 0 then Even else Odd" SignatureFile = AutoGenerated } ).Workflow { - // When looking for Odd, should not find Even placeCursor "First" "Odd" findAllReferences (expectToFind [ - "FileFirst.fs", 2, 11, 14 // Odd in definition - "FileFirst.fs", 2, 49, 52 // Odd in body - "FileFirst.fsi", 4, 11, 14 // Odd in signature + "FileFirst.fs", 2, 11, 14 + "FileFirst.fs", 2, 49, 52 + "FileFirst.fsi", 4, 11, 14 ]) } @@ -732,9 +717,7 @@ let y = MyType.Three module Properties = - /// Related to bug: https://github.com/dotnet/fsharp/issues/18270 - /// Documents compiler service behavior: returns property def, getter, setter, and usage references. - /// VS layer filters out 'get'/'set' keywords using Tokenizer.tryFixupSpan. + /// https://github.com/dotnet/fsharp/issues/18270 [] let ``We find all references for property with get and set accessors`` () = let source = """ @@ -752,19 +735,17 @@ let test () = state.MyProperty <- true state.MyProperty """ - // Compiler returns all refs including get/set; VS layer filters appropriately testFindRefsInSource source "MyProperty" [ - "test.fs", 7, 16, 26 // Definition - "test.fs", 8, 13, 16 // Getter at 'get' keyword - "test.fs", 9, 12, 15 // Setter at 'set' keyword - "test.fs", 13, 4, 20 // Usage with qualifier - "test.fs", 14, 4, 20 // Usage with qualifier + "test.fs", 7, 16, 26 + "test.fs", 8, 13, 16 + "test.fs", 9, 12, 15 + "test.fs", 13, 4, 20 + "test.fs", 14, 4, 20 ] -/// Test for single-line interface syntax (related to #15399) +/// https://github.com/dotnet/fsharp/issues/15399 module SingleLineInterfaceSyntax = - /// Issue: https://github.com/dotnet/fsharp/issues/15399 [] let ``We find interface members with single-line interface syntax`` () = let source = """ @@ -846,9 +827,6 @@ module LineDirectives = fileName, snapshot, checker /// https://github.com/dotnet/fsharp/issues/9928 - /// Find All References should work correctly with #line directives. - /// When #line is used, the returned ranges should be the remapped ranges - /// (the "fake" file name and line numbers from the directive). [] let ``Find references works with #line directives`` () = let source = """ @@ -875,8 +853,6 @@ let use1 = Thing + 1 module OrPatternSymbolResolution = /// https://github.com/dotnet/fsharp/issues/5546 - /// In SynPat.Or patterns (e.g., | x | x), both bindings were incorrectly marked - /// as Binding occurrences. The second (and subsequent) occurrences should be Use. [] let ``Or pattern second binding is classified as Use not Binding`` () = SyntheticProject.Create( @@ -884,31 +860,22 @@ module OrPatternSymbolResolution = ExtraSource = "let test input = match input with | x | x -> x" }) .Workflow { checkFile "OrPattern" (fun (typeCheckResult: FSharpCheckFileResults) -> - // Get all symbol uses for the variable 'x' let allSymbols = typeCheckResult.GetAllUsesOfAllSymbolsInFile() - // Find the uses of 'x' in the pattern let xUses = allSymbols |> Seq.filter (fun su -> su.Symbol.DisplayName = "x") |> Seq.sortBy (fun su -> su.Range.StartLine, su.Range.StartColumn) |> Seq.toArray - // Should have 3 occurrences: first binding (Def), second binding (Use), and usage in body (Use) Assert.True(xUses.Length >= 2, $"Expected at least 2 uses of 'x', got {xUses.Length}") - - // First occurrence should be definition Assert.True(xUses.[0].IsFromDefinition, "First 'x' in Or pattern should be a definition") - - // Second occurrence should be use, not definition (#5546) Assert.True(xUses.[1].IsFromUse, "Second 'x' in Or pattern should be a use, not a definition")) } module EventHandlerSyntheticSymbols = /// https://github.com/dotnet/fsharp/issues/4136 - /// Events with [] generate synthetic 'handler' values that should not - /// appear in GetAllUsesOfAllSymbolsInFile results. [] let ``Event handler synthetic symbols are filtered from references`` () = SyntheticProject.Create( @@ -918,13 +885,11 @@ module EventHandlerSyntheticSymbols = checkFile "EventTest" (fun (typeCheckResult: FSharpCheckFileResults) -> let allSymbols = typeCheckResult.GetAllUsesOfAllSymbolsInFile() - // Check that no synthetic 'handler' values are exposed let handlerUses = allSymbols |> Seq.filter (fun su -> su.Symbol.DisplayName = "handler") |> Seq.toArray - // The synthetic 'handler' argument should be filtered out Assert.True(handlerUses.Length = 0, $"Expected no 'handler' symbols (synthetic event handler values should be filtered), got {handlerUses.Length}")) } @@ -1023,7 +988,7 @@ let b = MyClass(5) module ExternalDllOptimization = - /// Issue #10227: Optimize Find All References for external DLL symbols + /// https://github.com/dotnet/fsharp/issues/10227 [] let ``Find references to external DLL symbol works correctly`` () = let source = """ diff --git a/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs b/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs index f6ae556d7f8..96440e49485 100644 --- a/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs @@ -2456,8 +2456,8 @@ let ``Test Project15 all symbols`` () = [|("val x", "x", "file1", ((4, 6), (4, 7)), ["defn"]); ("val x", "x", "file1", ((5, 10), (5, 11)), []); ("val h", "h", "file1", ((6, 7), (6, 8)), ["defn"]); - ("val h", "h", "file1", ((7, 10), (7, 11)), []); // Or pattern secondary binding -> Use - ("val h", "h", "file1", ((8, 13), (8, 14)), []); // Or pattern secondary binding -> Use + ("val h", "h", "file1", ((7, 10), (7, 11)), []); + ("val h", "h", "file1", ((8, 13), (8, 14)), []); ("val h", "h", "file1", ((8, 19), (8, 20)), []); ("val f", "f", "file1", ((4, 4), (4, 5)), ["defn"]); ("UnionPatterns", "UnionPatterns", "file1", ((2, 7), (2, 20)), ["defn"])|] diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index b93dea8fd1c..48d33c13af3 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -1472,6 +1472,8 @@ Actual: type PdbVerificationOption = | VerifyImportScopes of ImportScope list list | VerifySequencePoints of (Line * Col * Line * Col) list + | VerifyMethodSequencePoints of methodName: string * expectedPoints: (Line * Col * Line * Col) list + | VerifyMethodSequencePointsInRange of methodName: string * startLine: Line * endLine: Line | VerifyDocuments of string list | Dummy of unit @@ -1526,6 +1528,49 @@ Actual: if expectedScope <> imports then failwith $"Expected imports are different from PDB.\nExpected:\n%A{expectedScope}\nActual:%A{imports}" + let private getMethodSequencePoints (assemblyPath: string) (pdbReader: MetadataReader) (methodName: string) = + use peStream = File.OpenRead(assemblyPath) + use peReader = new PEReader(peStream) + let assemblyReader = peReader.GetMetadataReader() + + let methodHandles = + [ for typeDef in assemblyReader.TypeDefinitions do + let td = assemblyReader.GetTypeDefinition(typeDef) + for methodHandle in td.GetMethods() do + let md = assemblyReader.GetMethodDefinition(methodHandle) + let name = assemblyReader.GetString(md.Name) + if name = methodName then + yield methodHandle ] + + if methodHandles.IsEmpty then + failwith (sprintf "Method '%s' not found in assembly '%s'" methodName assemblyPath) + + [ for methodHandle in methodHandles do + let rowNumber = System.Reflection.Metadata.Ecma335.MetadataTokens.GetRowNumber(methodHandle) + let debugInfoHandle = System.Reflection.Metadata.Ecma335.MetadataTokens.MethodDebugInformationHandle(rowNumber) + let debugInfo = pdbReader.GetMethodDebugInformation(debugInfoHandle) + yield! + debugInfo.GetSequencePoints() + |> Seq.filter (fun sp -> not sp.IsHidden) + |> Seq.sortBy (fun sp -> sp.Offset) + |> Seq.map (fun sp -> (Line sp.StartLine, Col sp.StartColumn, Line sp.EndLine, Col sp.EndColumn)) + |> Seq.toList ] + + let private verifyMethodSequencePoints (assemblyPath: string) (reader: MetadataReader) (methodName: string) (expectedSequencePoints: (Line * Col * Line * Col) list) = + let actualPoints = getMethodSequencePoints assemblyPath reader methodName + if actualPoints <> expectedSequencePoints then + failwith (sprintf "Expected method '%s' sequence points are different from PDB.\nExpected: %A\nActual: %A" methodName expectedSequencePoints actualPoints) + + let private verifyMethodSequencePointsInRange (assemblyPath: string) (reader: MetadataReader) (methodName: string) (Line startLine) (Line endLine) = + let actualPoints = getMethodSequencePoints assemblyPath reader methodName + let outOfRange = + actualPoints + |> List.filter (fun (Line sl, _, Line el, _) -> sl < startLine || el > endLine) + if not outOfRange.IsEmpty then + failwith (sprintf "Method '%s' has sequence points outside range [%d-%d]:\n%A\nAll points: %A" methodName startLine endLine outOfRange actualPoints) + if actualPoints.IsEmpty then + failwith (sprintf "Method '%s' has no non-hidden sequence points" methodName) + let private verifySequencePoints (reader: MetadataReader) expectedSequencePoints = let sequencePoints = [ for sp in reader.MethodDebugInformation do @@ -1559,6 +1604,10 @@ Actual: match option with | VerifyImportScopes scopes -> verifyPdbImportTables reader scopes | VerifySequencePoints sp -> verifySequencePoints reader sp + | VerifyMethodSequencePoints(methodName, sp) -> + verifyMethodSequencePoints (optOutputPath |> Option.defaultValue "") reader methodName sp + | VerifyMethodSequencePointsInRange(methodName, startLine, endLine) -> + verifyMethodSequencePointsInRange (optOutputPath |> Option.defaultValue "") reader methodName startLine endLine | VerifyDocuments docs -> verifyDocuments reader (docs |> List.map(fun doc -> Path.Combine(outputPath, doc))) | _ -> failwith $"Unknown verification option: {option.ToString()}" diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComplexShadowingFunction.debuginfo.expected b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComplexShadowingFunction.debuginfo.expected index d4290843220..ab338199141 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComplexShadowingFunction.debuginfo.expected +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComplexShadowingFunction.debuginfo.expected @@ -33,6 +33,7 @@ METHODS - Doc: 0 Offset:71 [23:12]-[23-24] - Doc: 0 Offset:78 [24:12]-[24-22] - Doc: 0 Offset:81 [25:12]-[25-14] + - Doc: 0 Offset:84 [16707566:0]-[16707566-0] Scopes: - [0-84] - [1-15] diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs index d4f5c692e05..04c97034dbf 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace FSharp.Compiler.UnitTests.CodeGen.EmittedIL @@ -228,139 +228,143 @@ let testTask(t: Task) = task { let! res = t in return res+1 } IL_0013: br.s IL_0018 IL_0015: nop - IL_0016: br.s IL_0019 + IL_0016: br.s IL_001b IL_0018: nop + IL_0019: br.s IL_001b + .try { - IL_0019: ldloc.0 - IL_001a: ldc.i4.1 - IL_001b: sub - IL_001c: switch ( - IL_0027) - IL_0025: br.s IL_002a + IL_001b: ldloc.0 + IL_001c: ldc.i4.1 + IL_001d: sub + IL_001e: switch ( + IL_0029) + IL_0027: br.s IL_002c - IL_0027: nop - IL_0028: br.s IL_0053 + IL_0029: nop + IL_002a: br.s IL_0057 - IL_002a: nop - IL_002b: ldarg.0 - IL_002c: ldfld class [runtime]System.Threading.Tasks.Task`1 Test/testTask@4::t - IL_0031: stloc.3 - IL_0032: ldarg.0 - IL_0033: ldloc.3 - IL_0034: callvirt instance valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1 class [netstandard]System.Threading.Tasks.Task`1::GetAwaiter() - IL_0039: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 Test/testTask@4::awaiter - IL_003e: ldc.i4.1 - IL_003f: stloc.s V_4 - IL_0041: ldarg.0 - IL_0042: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 Test/testTask@4::awaiter - IL_0047: call instance bool valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() - IL_004c: brfalse.s IL_0050 + IL_002c: nop + IL_002d: br.s IL_002f - IL_004e: br.s IL_0069 + IL_002f: ldarg.0 + IL_0030: ldfld class [runtime]System.Threading.Tasks.Task`1 Test/testTask@4::t + IL_0035: stloc.3 + IL_0036: ldarg.0 + IL_0037: ldloc.3 + IL_0038: callvirt instance valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1 class [netstandard]System.Threading.Tasks.Task`1::GetAwaiter() + IL_003d: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 Test/testTask@4::awaiter + IL_0042: ldc.i4.1 + IL_0043: stloc.s V_4 + IL_0045: ldarg.0 + IL_0046: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 Test/testTask@4::awaiter + IL_004b: call instance bool valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() + IL_0050: brfalse.s IL_0054 - IL_0050: ldc.i4.0 - IL_0051: brfalse.s IL_0057 + IL_0052: br.s IL_006d - IL_0053: ldc.i4.1 - IL_0054: nop - IL_0055: br.s IL_0060 + IL_0054: ldc.i4.0 + IL_0055: brfalse.s IL_005b - IL_0057: ldarg.0 - IL_0058: ldc.i4.1 - IL_0059: stfld int32 Test/testTask@4::ResumptionPoint - IL_005e: ldc.i4.0 - IL_005f: nop - IL_0060: stloc.s V_5 - IL_0062: ldloc.s V_5 - IL_0064: stloc.s V_4 - IL_0066: nop - IL_0067: br.s IL_006a + IL_0057: ldc.i4.1 + IL_0058: nop + IL_0059: br.s IL_0064 - IL_0069: nop - IL_006a: ldloc.s V_4 - IL_006c: brfalse.s IL_009a + IL_005b: ldarg.0 + IL_005c: ldc.i4.1 + IL_005d: stfld int32 Test/testTask@4::ResumptionPoint + IL_0062: ldc.i4.0 + IL_0063: nop + IL_0064: stloc.s V_5 + IL_0066: ldloc.s V_5 + IL_0068: stloc.s V_4 + IL_006a: nop + IL_006b: br.s IL_006e - IL_006e: ldarg.0 - IL_006f: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 Test/testTask@4::awaiter - IL_0074: call instance !0 valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() - IL_0079: stloc.s V_6 - IL_007b: ldloc.s V_6 - IL_007d: stloc.s V_7 - IL_007f: ldloc.s V_7 - IL_0081: stloc.s V_8 - IL_0083: ldloc.s V_8 - IL_0085: ldc.i4.1 - IL_0086: add - IL_0087: stloc.s V_9 - IL_0089: ldarg.0 - IL_008a: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_008f: ldloc.s V_9 - IL_0091: stfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_0096: ldc.i4.1 - IL_0097: nop - IL_0098: br.s IL_00b3 + IL_006d: nop + IL_006e: ldloc.s V_4 + IL_0070: brfalse.s IL_009e - IL_009a: ldarg.0 - IL_009b: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_00a0: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_00a5: ldarg.0 - IL_00a6: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 Test/testTask@4::awaiter - IL_00ab: ldarg.0 - IL_00ac: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::AwaitUnsafeOnCompleted,valuetype Test/testTask@4>(!!0&, - !!1&) - IL_00b1: ldc.i4.0 - IL_00b2: nop - IL_00b3: brfalse.s IL_00c1 + IL_0072: ldarg.0 + IL_0073: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 Test/testTask@4::awaiter + IL_0078: call instance !0 valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() + IL_007d: stloc.s V_6 + IL_007f: ldloc.s V_6 + IL_0081: stloc.s V_7 + IL_0083: ldloc.s V_7 + IL_0085: stloc.s V_8 + IL_0087: ldloc.s V_8 + IL_0089: ldc.i4.1 + IL_008a: add + IL_008b: stloc.s V_9 + IL_008d: ldarg.0 + IL_008e: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0093: ldloc.s V_9 + IL_0095: stfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_009a: ldc.i4.1 + IL_009b: nop + IL_009c: br.s IL_00b7 - IL_00b5: ldarg.0 - IL_00b6: ldloc.s V_10 - IL_00b8: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 Test/testTask@4::awaiter - IL_00bd: ldc.i4.1 - IL_00be: nop - IL_00bf: br.s IL_00c3 + IL_009e: ldarg.0 + IL_009f: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_00a4: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_00a9: ldarg.0 + IL_00aa: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 Test/testTask@4::awaiter + IL_00af: ldarg.0 + IL_00b0: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::AwaitUnsafeOnCompleted,valuetype Test/testTask@4>(!!0&, + !!1&) + IL_00b5: ldc.i4.0 + IL_00b6: nop + IL_00b7: brfalse.s IL_00c5 - IL_00c1: ldc.i4.0 + IL_00b9: ldarg.0 + IL_00ba: ldloc.s V_10 + IL_00bc: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 Test/testTask@4::awaiter + IL_00c1: ldc.i4.1 IL_00c2: nop - IL_00c3: stloc.2 - IL_00c4: ldloc.2 - IL_00c5: brfalse.s IL_00e4 + IL_00c3: br.s IL_00c7 + + IL_00c5: ldc.i4.0 + IL_00c6: nop + IL_00c7: stloc.2 + IL_00c8: ldloc.2 + IL_00c9: brfalse.s IL_00e8 - IL_00c7: ldarg.0 - IL_00c8: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_00cd: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_00d2: ldarg.0 - IL_00d3: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_00d8: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_00dd: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_00e2: leave.s IL_00f2 + IL_00cb: ldarg.0 + IL_00cc: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_00d1: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_00d6: ldarg.0 + IL_00d7: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_00dc: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_00e1: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_00e6: leave.s IL_00f6 - IL_00e4: leave.s IL_00f2 + IL_00e8: leave.s IL_00f6 } catch [runtime]System.Object { - IL_00e6: castclass [runtime]System.Exception - IL_00eb: stloc.s V_11 - IL_00ed: ldloc.s V_11 - IL_00ef: stloc.1 - IL_00f0: leave.s IL_00f2 + IL_00ea: castclass [runtime]System.Exception + IL_00ef: stloc.s V_11 + IL_00f1: ldloc.s V_11 + IL_00f3: stloc.1 + IL_00f4: leave.s IL_00f6 } - IL_00f2: ldloc.1 - IL_00f3: stloc.s V_12 - IL_00f5: ldloc.s V_12 - IL_00f7: brtrue.s IL_00fa + IL_00f6: ldloc.1 + IL_00f7: stloc.s V_12 + IL_00f9: ldloc.s V_12 + IL_00fb: brtrue.s IL_00fe - IL_00f9: ret + IL_00fd: ret - IL_00fa: ldarg.0 - IL_00fb: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0100: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0105: ldloc.s V_12 - IL_0107: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_010c: ret + IL_00fe: ldarg.0 + IL_00ff: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0104: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0109: ldloc.s V_12 + IL_010b: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_0110: ret } """ ])) @@ -1142,137 +1146,141 @@ type Generic1InGeneric1<'T>() = IL_0013: br.s IL_0018 IL_0015: nop - IL_0016: br.s IL_001b + IL_0016: br.s IL_001d IL_0018: nop - IL_0019: ldnull - IL_001a: stloc.1 + IL_0019: br.s IL_001b + + IL_001b: ldnull + IL_001c: stloc.1 .try { - IL_001b: ldloc.0 - IL_001c: ldc.i4.1 - IL_001d: sub - IL_001e: switch ( - IL_0029) - IL_0027: br.s IL_002c - - IL_0029: nop - IL_002a: br.s IL_0055 - - IL_002c: nop - IL_002d: ldarg.0 - IL_002e: ldfld class [runtime]System.Threading.Tasks.Task`1 valuetype Test/Generic1InGeneric1`1/clo@7::computation - IL_0033: stloc.3 - IL_0034: ldarg.0 - IL_0035: ldloc.3 - IL_0036: callvirt instance valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1 class [netstandard]System.Threading.Tasks.Task`1::GetAwaiter() - IL_003b: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter - IL_0040: ldc.i4.1 - IL_0041: stloc.s V_4 - IL_0043: ldarg.0 - IL_0044: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter - IL_0049: call instance bool valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() - IL_004e: brfalse.s IL_0052 - - IL_0050: br.s IL_006b - - IL_0052: ldc.i4.0 - IL_0053: brfalse.s IL_0059 - - IL_0055: ldc.i4.1 - IL_0056: nop - IL_0057: br.s IL_0062 - - IL_0059: ldarg.0 - IL_005a: ldc.i4.1 - IL_005b: stfld int32 valuetype Test/Generic1InGeneric1`1/clo@7::ResumptionPoint - IL_0060: ldc.i4.0 - IL_0061: nop - IL_0062: stloc.s V_5 - IL_0064: ldloc.s V_5 - IL_0066: stloc.s V_4 - IL_0068: nop - IL_0069: br.s IL_006c - - IL_006b: nop - IL_006c: ldloc.s V_4 - IL_006e: brfalse.s IL_0092 - - IL_0070: ldarg.0 - IL_0071: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter - IL_0076: call instance !0 valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() - IL_007b: stloc.s V_6 - IL_007d: ldloc.s V_6 - IL_007f: stloc.s V_7 - IL_0081: ldarg.0 - IL_0082: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data - IL_0087: ldloc.s V_7 - IL_0089: stfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_008e: ldc.i4.1 - IL_008f: nop - IL_0090: br.s IL_00ab - - IL_0092: ldarg.0 - IL_0093: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data - IL_0098: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_009d: ldarg.0 - IL_009e: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter - IL_00a3: ldarg.0 - IL_00a4: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::AwaitUnsafeOnCompleted,valuetype Test/Generic1InGeneric1`1/clo@7>(!!0&, - !!1&) - IL_00a9: ldc.i4.0 - IL_00aa: nop - IL_00ab: brfalse.s IL_00c1 - - IL_00ad: ldarg.0 - IL_00ae: ldloca.s V_8 - IL_00b0: initobj valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 - IL_00b6: ldloc.s V_8 - IL_00b8: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter - IL_00bd: ldc.i4.1 - IL_00be: nop - IL_00bf: br.s IL_00c3 - - IL_00c1: ldc.i4.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.1 + IL_001f: sub + IL_0020: switch ( + IL_002b) + IL_0029: br.s IL_002e + + IL_002b: nop + IL_002c: br.s IL_0059 + + IL_002e: nop + IL_002f: br.s IL_0031 + + IL_0031: ldarg.0 + IL_0032: ldfld class [runtime]System.Threading.Tasks.Task`1 valuetype Test/Generic1InGeneric1`1/clo@7::computation + IL_0037: stloc.3 + IL_0038: ldarg.0 + IL_0039: ldloc.3 + IL_003a: callvirt instance valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1 class [netstandard]System.Threading.Tasks.Task`1::GetAwaiter() + IL_003f: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter + IL_0044: ldc.i4.1 + IL_0045: stloc.s V_4 + IL_0047: ldarg.0 + IL_0048: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter + IL_004d: call instance bool valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted() + IL_0052: brfalse.s IL_0056 + + IL_0054: br.s IL_006f + + IL_0056: ldc.i4.0 + IL_0057: brfalse.s IL_005d + + IL_0059: ldc.i4.1 + IL_005a: nop + IL_005b: br.s IL_0066 + + IL_005d: ldarg.0 + IL_005e: ldc.i4.1 + IL_005f: stfld int32 valuetype Test/Generic1InGeneric1`1/clo@7::ResumptionPoint + IL_0064: ldc.i4.0 + IL_0065: nop + IL_0066: stloc.s V_5 + IL_0068: ldloc.s V_5 + IL_006a: stloc.s V_4 + IL_006c: nop + IL_006d: br.s IL_0070 + + IL_006f: nop + IL_0070: ldloc.s V_4 + IL_0072: brfalse.s IL_0096 + + IL_0074: ldarg.0 + IL_0075: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter + IL_007a: call instance !0 valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult() + IL_007f: stloc.s V_6 + IL_0081: ldloc.s V_6 + IL_0083: stloc.s V_7 + IL_0085: ldarg.0 + IL_0086: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_008b: ldloc.s V_7 + IL_008d: stfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_0092: ldc.i4.1 + IL_0093: nop + IL_0094: br.s IL_00af + + IL_0096: ldarg.0 + IL_0097: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_009c: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_00a1: ldarg.0 + IL_00a2: ldflda valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter + IL_00a7: ldarg.0 + IL_00a8: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::AwaitUnsafeOnCompleted,valuetype Test/Generic1InGeneric1`1/clo@7>(!!0&, + !!1&) + IL_00ad: ldc.i4.0 + IL_00ae: nop + IL_00af: brfalse.s IL_00c5 + + IL_00b1: ldarg.0 + IL_00b2: ldloca.s V_8 + IL_00b4: initobj valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 + IL_00ba: ldloc.s V_8 + IL_00bc: stfld valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1 valuetype Test/Generic1InGeneric1`1/clo@7::awaiter + IL_00c1: ldc.i4.1 IL_00c2: nop - IL_00c3: stloc.2 - IL_00c4: ldloc.2 - IL_00c5: brfalse.s IL_00e4 + IL_00c3: br.s IL_00c7 + + IL_00c5: ldc.i4.0 + IL_00c6: nop + IL_00c7: stloc.2 + IL_00c8: ldloc.2 + IL_00c9: brfalse.s IL_00e8 - IL_00c7: ldarg.0 - IL_00c8: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data - IL_00cd: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_00d2: ldarg.0 - IL_00d3: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data - IL_00d8: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_00dd: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_00e2: leave.s IL_00f2 + IL_00cb: ldarg.0 + IL_00cc: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_00d1: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_00d6: ldarg.0 + IL_00d7: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_00dc: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_00e1: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_00e6: leave.s IL_00f6 - IL_00e4: leave.s IL_00f2 + IL_00e8: leave.s IL_00f6 } catch [runtime]System.Object { - IL_00e6: castclass [runtime]System.Exception - IL_00eb: stloc.s V_9 - IL_00ed: ldloc.s V_9 - IL_00ef: stloc.1 - IL_00f0: leave.s IL_00f2 + IL_00ea: castclass [runtime]System.Exception + IL_00ef: stloc.s V_9 + IL_00f1: ldloc.s V_9 + IL_00f3: stloc.1 + IL_00f4: leave.s IL_00f6 } - IL_00f2: ldloc.1 - IL_00f3: stloc.s V_10 - IL_00f5: ldloc.s V_10 - IL_00f7: brtrue.s IL_00fa - - IL_00f9: ret - - IL_00fa: ldarg.0 - IL_00fb: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data - IL_0100: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0105: ldloc.s V_10 - IL_0107: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_010c: ret + IL_00f6: ldloc.1 + IL_00f7: stloc.s V_10 + IL_00f9: ldloc.s V_10 + IL_00fb: brtrue.s IL_00fe + + IL_00fd: ret + + IL_00fe: ldarg.0 + IL_00ff: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/Generic1InGeneric1`1/clo@7::Data + IL_0104: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0109: ldloc.s V_10 + IL_010b: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_0110: ret } .method public strict virtual instance void SetStateMachine(class [runtime]System.Runtime.CompilerServices.IAsyncStateMachine state) cil managed diff --git a/vsintegration/src/FSharp.Editor/Classification/ClassificationService.fs b/vsintegration/src/FSharp.Editor/Classification/ClassificationService.fs index fb2715debd3..2f885880f2e 100644 --- a/vsintegration/src/FSharp.Editor/Classification/ClassificationService.fs +++ b/vsintegration/src/FSharp.Editor/Classification/ClassificationService.fs @@ -84,7 +84,7 @@ type internal FSharpClassificationService [] () = match RoslynHelpers.TryFSharpRangeToTextSpan(sourceText, item.Range) with | ValueNone -> () | ValueSome span -> - // Use fixupSpan (not tryFixupSpan) for syntax coloring + // Use fixupSpan (not FixedSpan) for syntax coloring - don't filter phantom accessors let span = match item.Type with | SemanticClassificationType.Printf -> span diff --git a/vsintegration/src/FSharp.Editor/Common/Pervasive.fs b/vsintegration/src/FSharp.Editor/Common/Pervasive.fs index b55f62cc721..298608d043c 100644 --- a/vsintegration/src/FSharp.Editor/Common/Pervasive.fs +++ b/vsintegration/src/FSharp.Editor/Common/Pervasive.fs @@ -23,8 +23,7 @@ let inline isScriptFile (filePath: string) = String.Equals(ext, ".fsx", StringComparison.OrdinalIgnoreCase) || String.Equals(ext, ".fsscript", StringComparison.OrdinalIgnoreCase) -/// (#16394) Checks if the file path ends with an F# source file extension ('.fs', '.fsi', '.fsx', or '.fsscript') -/// Used to filter non-F# files (e.g., .cshtml) from Find All References to prevent crashes. +/// https://github.com/dotnet/fsharp/issues/16394 let inline isFSharpSourceFile (filePath: string) = let ext = Path.GetExtension filePath diff --git a/vsintegration/src/FSharp.Editor/LanguageService/ProjectFiltering.fs b/vsintegration/src/FSharp.Editor/LanguageService/ProjectFiltering.fs index c43588bf50b..b5432ec057c 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/ProjectFiltering.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/ProjectFiltering.fs @@ -8,8 +8,7 @@ open Microsoft.CodeAnalysis module internal ProjectFiltering = - /// #10227: Filters projects to those referencing a specific assembly file. - /// Used to optimize Find All References for external DLL symbols. + /// https://github.com/dotnet/fsharp/issues/10227 let getProjectsReferencingAssembly (assemblyFilePath: string) (solution: Solution) = let assemblyFileName = Path.GetFileName(assemblyFilePath) diff --git a/vsintegration/src/FSharp.Editor/LanguageService/SymbolHelpers.fs b/vsintegration/src/FSharp.Editor/LanguageService/SymbolHelpers.fs index 468298978e1..ec3db65c11f 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/SymbolHelpers.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/SymbolHelpers.fs @@ -143,9 +143,7 @@ module internal SymbolHelpers = let projectsToCheck = match scope with | Some(SymbolScope.CurrentDocument) - | Some(SymbolScope.SignatureAndImplementation) -> - // For current document or signature/implementation, just search current project - [ currentDocument.Project ] + | Some(SymbolScope.SignatureAndImplementation) -> [ currentDocument.Project ] | Some(SymbolScope.Projects(scopeProjects, false)) -> [ for scopeProject in scopeProjects do diff --git a/vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs b/vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs index 49ac6a4ad8b..f4d99883611 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs @@ -1011,10 +1011,7 @@ module internal Tokenizer = let text = sourceText.GetSubText(span).ToString() (text = "get" || text = "set") && text <> symbolName - /// #18270: Parameterized active pattern that applies fixupSpan and filters out - /// phantom property accessor references from rename/find-references. - /// The symbolName parameter ensures identifiers genuinely named "get"/"set" are kept. - /// Usage: match textSpan with FixedSpan sourceText symbolName fixedSpan -> ... + /// (#18270) Applies fixupSpan and filters out phantom property accessor references. let (|FixedSpan|_|) (sourceText: SourceText) (symbolName: string) (span: TextSpan) : TextSpan voption = let fixedSpan = fixupSpan (sourceText, span) @@ -1023,9 +1020,7 @@ module internal Tokenizer = else ValueSome fixedSpan - /// #18270: Converts F# range to Roslyn TextSpan with editor-specific filtering. - /// Filters out phantom property accessor references that should not appear in - /// Find All References or Rename operations. + /// (#18270) Converts F# range to Roslyn TextSpan, filtering out phantom property accessor references. let TryFSharpRangeToTextSpanForEditor (sourceText: SourceText, range: range, symbolName: string) : TextSpan voption = match RoslynHelpers.TryFSharpRangeToTextSpan(sourceText, range) with | ValueSome textSpan -> diff --git a/vsintegration/tests/FSharp.Editor.Tests/FindReferencesTests.fs b/vsintegration/tests/FSharp.Editor.Tests/FindReferencesTests.fs index 5519fdd337b..6b74fb290c2 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/FindReferencesTests.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/FindReferencesTests.fs @@ -163,9 +163,7 @@ module FindReferences = if foundReferences.Count <> 2 then failwith $"Expected 2 reference but found {foundReferences.Count}" - /// Fix for bug: https://github.com/dotnet/fsharp/issues/18270 - /// Tests that find references for properties with get/set accessors correctly - /// excludes the 'get' and 'set' keywords from the results. + /// https://github.com/dotnet/fsharp/issues/18270 [] let ``Find references for property with get set accessors`` () = @@ -202,18 +200,13 @@ module FindReferences = findUsagesService.FindReferencesAsync(document, getPositionOf "MyProperty" documentPath, context).Wait() - // Should find 1 definition (the property declaration) if foundDefinitions.Count <> 1 then failwith $"Expected 1 definition but found {foundDefinitions.Count}" - // Should find 2 references (the two uses in Second file) - // The 'get' and 'set' keywords are filtered out by Tokenizer.tryFixupSpan - // in FindUsagesService.onSymbolFound if foundReferences.Count <> 2 then failwith $"Expected 2 references but found {foundReferences.Count}" - /// Ensures identifiers genuinely named "get" are not incorrectly filtered out - /// by the phantom property accessor filter (#18270 fix). + /// https://github.com/dotnet/fsharp/issues/18270 [] let ``Find references for identifier named get`` () = @@ -237,10 +230,8 @@ module FindReferences = findUsagesService.FindReferencesAsync(document, getPositionOf "get x" documentPath, context).Wait() - // Should find 1 definition if foundDefinitions.Count <> 1 then failwith $"Expected 1 definition but found {foundDefinitions.Count}" - // Should find 1 reference (the call site) - the identifier "get" must NOT be filtered if foundReferences.Count <> 1 then failwith $"Expected 1 reference but found {foundReferences.Count}"