From 17f0e02d1ca8c7d7fc0cabd33156987cca219b19 Mon Sep 17 00:00:00 2001 From: Copilot Date: Thu, 6 Aug 2026 15:28:16 +0200 Subject: [PATCH 1/3] Fix InvalidProgramException from Seq.collect/yield! over struct seq materialised with List.ofSeq/Seq.toList/Seq.toArray (#20203) Two codegen defects in LowerComputedListOrArraySeqExpr only manifested when the inner sub-collection is a value type implementing seq<'T> (e.g. ImmutableArray<_>), since a struct is never implicitly upcast: 1. The arbitrary sub-collection was passed to ListCollector.AddMany/AddManyAndClose(seq<'T>) with no coercion, emitting invalid IL (value type where a ref IEnumerable is expected). Now coerced to the collector's seq<'T> element type (GenCoerce emits box; unbox.any for structs, nothing for reference upcasts). 2. SeqUsing/SeqForEach/SeqTryFinally built mkTryFinally with the original (possibly struct) body type as the try/finally result type instead of unit, so the optimizer emitted ldnull; stloc - invalid IL. Now uses g.unit_ty. Adds hermetic execution regression tests under optimizations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Optimize/LowerComputedCollections.fs | 23 ++- .../Language/RegressionTests.fs | 151 ++++++++++++++++++ 2 files changed, 171 insertions(+), 3 deletions(-) diff --git a/src/Compiler/Optimize/LowerComputedCollections.fs b/src/Compiler/Optimize/LowerComputedCollections.fs index 1dabf4fb142..c2c0d03d58a 100644 --- a/src/Compiler/Optimize/LowerComputedCollections.fs +++ b/src/Compiler/Optimize/LowerComputedCollections.fs @@ -64,6 +64,10 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = let infoReader = InfoReader(g, amap) let collVal, collExpr = mkMutableCompGenLocal m "@collector" collectorTy //let collExpr = mkValAddr m false (mkLocalValRef collVal) + // The 'seq<'T>' parameter type of AddMany/AddManyAndClose, derived from the + // ListCollector<'T>/ArrayCollector<'T> element type. A struct sub-collection must be + // coerced (boxed) to this so the AddMany call site emits valid IL. + let collectorSeqTy = mkSeqTy g (List.head (argsOfAppTy g collectorTy)) let rec ConvertSeqExprCode isUninteresting isTailcall expr = match expr with | SeqYield g (e, m) -> @@ -98,7 +102,7 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = let cleanupE = BuildDisposableCleanup tcVal g infoReader m v let exprR = mkLet spBind m v resource - (mkTryFinally g (bodyExprR, cleanupE, m, tyOfExpr g bodyExpr, DebugPointAtTry.No, DebugPointAtFinally.No)) + (mkTryFinally g (bodyExprR, cleanupE, m, g.unit_ty, DebugPointAtTry.No, DebugPointAtFinally.No)) Result.Ok (false, exprR) | Result.Error msg -> Result.Error msg @@ -126,7 +130,10 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = (callNonOverloadedILMethod g amap mIn "get_Current" inpEnumTy [enumve])) bodyExprR, mIn), cleanupE, - mFor, tyOfExpr g bodyExpr, DebugPointAtTry.No, DebugPointAtFinally.No)) + // The lowered body is a unit-typed collector call, so the try/finally result + // type is unit; using the original (possibly struct) body type made the optimizer + // emit 'ldnull; stloc ' - invalid IL. + mFor, g.unit_ty, DebugPointAtTry.No, DebugPointAtFinally.No)) |> addForDebugPoint Result.Ok (false, exprR) | Result.Error msg -> Result.Error msg @@ -136,7 +143,7 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = match resBody with | Result.Ok (_, bodyExprR) -> let exprR = - mkTryFinally g (bodyExprR, compensation, m, tyOfExpr g bodyExpr, spTry, spFinally) + mkTryFinally g (bodyExprR, compensation, m, g.unit_ty, spTry, spFinally) Result.Ok (false, exprR) | Result.Error msg -> Result.Error msg @@ -201,6 +208,16 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = // printfn "FAILED - not worth compiling an unrecognized Seq.toList at %s " (stringOfRange m) Result.Error () else + // A struct sub-collection (a value-type seq<'T>, e.g. ImmutableArray<_>) is never + // implicitly upcast, so coerce it to the collector's seq<'T> param type. GenCoerce emits + // nothing for reference upcasts and 'box; unbox.any' for structs (matching the yield! path); + // without this, AddMany/AddManyAndClose receive a value type where a ref IEnumerable is + // expected, producing invalid IL. + let srcTy = tyOfExpr g arbitrarySeqExpr + let arbitrarySeqExpr = + if typeEquiv g srcTy collectorSeqTy then arbitrarySeqExpr + else mkCoerceExpr (arbitrarySeqExpr, collectorSeqTy, m, srcTy) + // If we're the final in a sequential chain then we can AddMany, Close and return if isTailcall then let exprR = mkCallCollectorAddManyAndClose tcVal (g: TcGlobals) infoReader m collExpr arbitrarySeqExpr diff --git a/tests/FSharp.Compiler.ComponentTests/Language/RegressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/RegressionTests.fs index 3b7d1a2b3a5..e56f2392094 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/RegressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/RegressionTests.fs @@ -82,3 +82,154 @@ dosmth x |> asLibrary |> typecheck |> shouldSucceed + + // https://github.com/dotnet/fsharp/issues/20203 + // Shared hermetic struct seq so tests do not depend on System.Collections.Immutable. + let private structSeqPrelude = """ +open System.Collections +open System.Collections.Generic + +[] +type StructSeq(items: int[]) = + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = (items :> IEnumerable).GetEnumerator() + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = items.GetEnumerator() +""" + + let private runsUnderOptimize source = + FSharp source |> withOptimize |> compileExeAndRun |> shouldSucceed |> ignore + + [] + [] + [] + [] + let ``Issue 20203 - Seq.collect over struct seq materialised is valid IL under optimize`` (materialize: string) (expectedLen: string) = + runsUnderOptimize (sprintf """ +module Test%s + +[] +let main _ = + let result = [ StructSeq [|1;2|] ] |> Seq.collect id |> %s + let len = Seq.length result + if len <> %s then eprintfn "expected %s got %%d" len; 1 else 0 +""" structSeqPrelude materialize expectedLen expectedLen) + + [] + let ``Issue 20203 - multiple struct sub-collections preserve order`` () = + runsUnderOptimize (sprintf """ +module Test%s + +[] +let main _ = + let result = [ StructSeq [|1;2|]; StructSeq [|3;4;5|] ] |> Seq.collect id |> List.ofSeq + if result = [1;2;3;4;5] then 0 else eprintfn "got %%A" result; 1 +""" structSeqPrelude) + + [] + let ``Issue 20203 - yield! comprehension over struct seq stays valid`` () = + runsUnderOptimize (sprintf """ +module Test%s + +[] +let main _ = + let l = [ for a in [ StructSeq [|1;2|] ] do yield! a ] |> List.ofSeq + let a = [| for a in [ StructSeq [|1;2|] ] do yield! a |] + if List.length l = 2 && Array.length a = 2 then 0 else eprintfn "l=%%A a=%%A" l a; 1 +""" structSeqPrelude) + + [] + let ``Issue 20203 - non-identity collect mapping over struct seq`` () = + runsUnderOptimize (sprintf """ +module Test%s + +[] +let main _ = + let result = [ StructSeq [|1;2|] ] |> Seq.collect (fun s -> s) |> List.ofSeq + if List.length result = 2 then 0 else eprintfn "got %%A" result; 1 +""" structSeqPrelude) + + [] + let ``Issue 20203 - generic struct seq element types`` () = + runsUnderOptimize """ +module Test +open System.Collections +open System.Collections.Generic + +[] +type StructSeqT<'T>(items: 'T[]) = + interface IEnumerable<'T> with + member _.GetEnumerator() : IEnumerator<'T> = (items :> IEnumerable<'T>).GetEnumerator() + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = items.GetEnumerator() + +[] +let main _ = + let s = [ StructSeqT [|"a";"b"|] ] |> Seq.collect id |> List.ofSeq + let i = [ StructSeqT [|1L;2L;3L|] ] |> Seq.collect id |> List.ofSeq + if s = ["a";"b"] && i = [1L;2L;3L] then 0 else eprintfn "s=%A i=%A" s i; 1 +""" + + [] + let ``Issue 20203 - dispose runs on struct seq collect (try-finally path)`` () = + runsUnderOptimize """ +module Test +open System.Collections +open System.Collections.Generic + +let mutable disposeCount = 0 + +type Enum(items: int[]) = + let inner = (items :> IEnumerable).GetEnumerator() + interface IEnumerator with + member _.Current = inner.Current + interface IEnumerator with + member _.Current = box inner.Current + member _.MoveNext() = inner.MoveNext() + member _.Reset() = inner.Reset() + interface System.IDisposable with + member _.Dispose() = disposeCount <- disposeCount + 1; inner.Dispose() + +[] +type DisposingStructSeq(items: int[]) = + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = new Enum(items) :> IEnumerator + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = new Enum(items) :> IEnumerator + +[] +let main _ = + let result = [ DisposingStructSeq [|1;2|] ] |> Seq.collect id |> List.ofSeq + if List.length result = 2 && disposeCount >= 1 then 0 + else eprintfn "len=%d disposeCount=%d" (List.length result) disposeCount; 1 +""" + + [] + let ``Issue 20203 - reference inner collections and non-lowered paths still work`` () = + runsUnderOptimize (sprintf """ +module Test%s + +[] +let main _ = + let a = [ [1;2] ] |> Seq.collect id |> List.ofSeq + let b = [ ResizeArray [1;2] ] |> Seq.collect id |> List.ofSeq + let c = [ StructSeq [|1;2|] ] |> Seq.collect id |> Array.ofSeq + let d = [ StructSeq [|1;2|] ] |> Seq.map id |> List.ofSeq + if List.length a = 2 && List.length b = 2 && Array.length c = 2 && List.length d = 1 then 0 + else eprintfn "a=%%d b=%%d c=%%d d=%%d" (List.length a) (List.length b) (Array.length c) (List.length d); 1 +""" structSeqPrelude) + + [] + let ``Issue 20203 - empty single and large boundaries`` () = + runsUnderOptimize (sprintf """ +module Test%s + +[] +let main _ = + let empty = ([] : int list list) |> Seq.collect id |> List.ofSeq + let emptyStruct = [ StructSeq [||] ] |> Seq.collect id |> List.ofSeq + let single = [ StructSeq [|1|] ] |> Seq.collect id |> List.ofSeq + let large = [ StructSeq [| 1 .. 1000 |] ] |> Seq.collect id |> List.ofSeq |> List.length + if empty = [] && emptyStruct = [] && single = [1] && large = 1000 then 0 + else eprintfn "empty=%%A emptyStruct=%%A single=%%A large=%%d" empty emptyStruct single large; 1 +""" structSeqPrelude) From d2c6f1ee75beaae9c1e79989231aa19295e953e3 Mon Sep 17 00:00:00 2001 From: Copilot Date: Thu, 6 Aug 2026 16:23:06 +0200 Subject: [PATCH 2/3] Regenerate EmittedIL baselines for dead-IL removal + pin struct box/unbox.any for #20203 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ComputedCollections.fs | 6 + .../ForNInRangeArrays.fs.il.bsl | 136 +- .../ForNInRangeLists.fs.il.bsl | 136 +- .../ForXInArray_ToArray.fs.il.bsl | 97 +- .../ForXInArray_ToList.fs.il.bsl | 1387 ++++++++--------- .../ForXInList_ToArray.fs.il.bsl | 1387 ++++++++--------- .../ForXInList_ToList.fs.il.bsl | 97 +- .../ForXInSeq_ToArray.fs.il.bsl | 1387 ++++++++--------- .../ForXInSeq_ToList.fs.il.bsl | 1387 ++++++++--------- .../StructSeqCollectToList.fs | 13 + ...RealInternalSignatureOff.OptimizeOn.il.bsl | 318 ++++ ....RealInternalSignatureOn.OptimizeOn.il.bsl | 318 ++++ ...ay - Comprehensions - ActivePattern 01.bsl | 56 +- .../Array - Comprehensions - Arrow 01.bsl | 50 +- .../Array - Comprehensions - Tuple 01.bsl | 50 +- .../Array - Comprehensions - Tuple 02.bsl | 58 +- .../Array - Comprehensions - Value 02.bsl | 50 +- 17 files changed, 3559 insertions(+), 3374 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs.RealInternalSignatureOff.OptimizeOn.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs index 828a92e2953..6c4f01442ee 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs @@ -85,3 +85,9 @@ module ComputedCollections = compilation |> getCompilation |> verifyCompilation + + [] + let ``StructSeqCollectToList_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation 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 cf3b1b294fe..a2198d7f3ea 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl @@ -523,9 +523,8 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldc.i4.1 IL_0002: ldc.i4.1 @@ -541,17 +540,17 @@ IL_0012: ldloc.1 IL_0013: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0018: stloc.3 + IL_0018: stloc.2 IL_0019: ldarg.0 IL_001a: ldnull IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0020: pop IL_0021: ldloca.s V_0 - IL_0023: ldloc.3 + IL_0023: ldloc.2 IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) IL_0029: nop IL_002a: ldloca.s V_0 - IL_002c: ldloc.3 + IL_002c: ldloc.2 IL_002d: ldc.i4.1 IL_002e: add IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) @@ -560,29 +559,25 @@ IL_0036: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_003b: brtrue.s IL_0012 - IL_003d: ldnull - IL_003e: stloc.2 - IL_003f: leave.s IL_0056 + IL_003d: leave.s IL_0051 } finally { - IL_0041: ldloc.1 - IL_0042: isinst [runtime]System.IDisposable - IL_0047: stloc.s V_4 - IL_0049: ldloc.s V_4 - IL_004b: brfalse.s IL_0055 - - IL_004d: ldloc.s V_4 - IL_004f: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0054: endfinally - IL_0055: endfinally + IL_003f: ldloc.1 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.3 + IL_0046: ldloc.3 + IL_0047: brfalse.s IL_0050 + + IL_0049: ldloc.3 + IL_004a: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004f: endfinally + IL_0050: endfinally } - IL_0056: ldloc.2 - IL_0057: pop - IL_0058: ldloca.s V_0 - IL_005a: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005f: ret + IL_0051: ldloca.s V_0 + IL_0053: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0058: ret } .method public static int32[] f0000() cil managed @@ -1024,12 +1019,11 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldc.i4.1 IL_0002: ldc.i4.1 @@ -1041,60 +1035,56 @@ IL_000f: stloc.1 .try { - IL_0010: br.s IL_004c + IL_0010: br.s IL_004a IL_0012: ldloc.1 IL_0013: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0018: stloc.3 + IL_0018: stloc.2 IL_0019: ldloca.s V_0 - IL_001b: stloc.s V_4 - IL_001d: ldloc.s V_4 - IL_001f: ldarg.0 - IL_0020: ldnull - IL_0021: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002b: nop - IL_002c: ldloca.s V_0 - IL_002e: stloc.s V_5 - IL_0030: ldloc.s V_5 - IL_0032: ldarg.1 - IL_0033: ldnull - IL_0034: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_003e: nop - IL_003f: ldloca.s V_0 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_6 - IL_0045: ldloc.3 - IL_0046: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_004b: nop - IL_004c: ldloc.1 - IL_004d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0052: brtrue.s IL_0012 - - IL_0054: ldnull - IL_0055: stloc.2 - IL_0056: leave.s IL_006d + IL_001b: stloc.3 + IL_001c: ldloc.3 + IL_001d: ldarg.0 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloca.s V_0 + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0037: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_003c: nop + IL_003d: ldloca.s V_0 + IL_003f: stloc.s V_5 + IL_0041: ldloc.s V_5 + IL_0043: ldloc.2 + IL_0044: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0049: nop + IL_004a: ldloc.1 + IL_004b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0050: brtrue.s IL_0012 + + IL_0052: leave.s IL_0069 } finally { - IL_0058: ldloc.1 - IL_0059: isinst [runtime]System.IDisposable - IL_005e: stloc.s V_7 - IL_0060: ldloc.s V_7 - IL_0062: brfalse.s IL_006c - - IL_0064: ldloc.s V_7 - IL_0066: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_006b: endfinally - IL_006c: endfinally + IL_0054: ldloc.1 + IL_0055: isinst [runtime]System.IDisposable + IL_005a: stloc.s V_6 + IL_005c: ldloc.s V_6 + IL_005e: brfalse.s IL_0068 + + IL_0060: ldloc.s V_6 + IL_0062: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0067: endfinally + IL_0068: endfinally } - IL_006d: ldloc.2 - IL_006e: pop - IL_006f: ldloca.s V_0 - IL_0071: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0076: ret + IL_0069: ldloca.s V_0 + IL_006b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0070: ret } .method public static int32[] f1() cil managed 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 ad894d338e0..afb770b7acc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl @@ -512,9 +512,8 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldc.i4.1 IL_0002: ldc.i4.1 @@ -530,17 +529,17 @@ IL_0012: ldloc.1 IL_0013: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0018: stloc.3 + IL_0018: stloc.2 IL_0019: ldarg.0 IL_001a: ldnull IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0020: pop IL_0021: ldloca.s V_0 - IL_0023: ldloc.3 + IL_0023: ldloc.2 IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0029: nop IL_002a: ldloca.s V_0 - IL_002c: ldloc.3 + IL_002c: ldloc.2 IL_002d: ldc.i4.1 IL_002e: add IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) @@ -549,29 +548,25 @@ IL_0036: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_003b: brtrue.s IL_0012 - IL_003d: ldnull - IL_003e: stloc.2 - IL_003f: leave.s IL_0056 + IL_003d: leave.s IL_0051 } finally { - IL_0041: ldloc.1 - IL_0042: isinst [runtime]System.IDisposable - IL_0047: stloc.s V_4 - IL_0049: ldloc.s V_4 - IL_004b: brfalse.s IL_0055 - - IL_004d: ldloc.s V_4 - IL_004f: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0054: endfinally - IL_0055: endfinally + IL_003f: ldloc.1 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.3 + IL_0046: ldloc.3 + IL_0047: brfalse.s IL_0050 + + IL_0049: ldloc.3 + IL_004a: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004f: endfinally + IL_0050: endfinally } - IL_0056: ldloc.2 - IL_0057: pop - IL_0058: ldloca.s V_0 - IL_005a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005f: ret + IL_0051: ldloca.s V_0 + IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0058: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0000() cil managed @@ -930,12 +925,11 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldc.i4.1 IL_0002: ldc.i4.1 @@ -947,60 +941,56 @@ IL_000f: stloc.1 .try { - IL_0010: br.s IL_004c + IL_0010: br.s IL_004a IL_0012: ldloc.1 IL_0013: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0018: stloc.3 + IL_0018: stloc.2 IL_0019: ldloca.s V_0 - IL_001b: stloc.s V_4 - IL_001d: ldloc.s V_4 - IL_001f: ldarg.0 - IL_0020: ldnull - IL_0021: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002b: nop - IL_002c: ldloca.s V_0 - IL_002e: stloc.s V_5 - IL_0030: ldloc.s V_5 - IL_0032: ldarg.1 - IL_0033: ldnull - IL_0034: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_003e: nop - IL_003f: ldloca.s V_0 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_6 - IL_0045: ldloc.3 - IL_0046: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_004b: nop - IL_004c: ldloc.1 - IL_004d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0052: brtrue.s IL_0012 - - IL_0054: ldnull - IL_0055: stloc.2 - IL_0056: leave.s IL_006d + IL_001b: stloc.3 + IL_001c: ldloc.3 + IL_001d: ldarg.0 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloca.s V_0 + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0037: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003c: nop + IL_003d: ldloca.s V_0 + IL_003f: stloc.s V_5 + IL_0041: ldloc.s V_5 + IL_0043: ldloc.2 + IL_0044: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0049: nop + IL_004a: ldloc.1 + IL_004b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0050: brtrue.s IL_0012 + + IL_0052: leave.s IL_0069 } finally { - IL_0058: ldloc.1 - IL_0059: isinst [runtime]System.IDisposable - IL_005e: stloc.s V_7 - IL_0060: ldloc.s V_7 - IL_0062: brfalse.s IL_006c - - IL_0064: ldloc.s V_7 - IL_0066: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_006b: endfinally - IL_006c: endfinally + IL_0054: ldloc.1 + IL_0055: isinst [runtime]System.IDisposable + IL_005a: stloc.s V_6 + IL_005c: ldloc.s V_6 + IL_005e: brfalse.s IL_0068 + + IL_0060: ldloc.s V_6 + IL_0062: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0067: endfinally + IL_0068: endfinally } - IL_006d: ldloc.2 - IL_006e: pop - IL_006f: ldloca.s V_0 - IL_0071: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0076: ret + IL_0069: ldloca.s V_0 + 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 f1() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl index a844dfe257e..77796169490 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl @@ -826,77 +826,72 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_7, - class [runtime]System.IDisposable V_8) + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0041 + IL_0008: br.s IL_003f IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloca.s V_0 - IL_0030: stloc.s V_7 - IL_0032: ldloc.s V_7 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.3 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: ldarg.1 + IL_0021: ldnull + IL_0022: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloca.s V_0 + IL_002f: stloc.s V_6 + IL_0031: ldloc.s V_6 + IL_0033: ldloc.2 IL_0034: ldloc.3 - IL_0035: ldloc.s V_4 - IL_0037: add - IL_0038: ldloc.s V_5 - IL_003a: add - IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0040: nop - IL_0041: ldloc.1 - IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0047: brtrue.s IL_000a - - IL_0049: ldnull - IL_004a: stloc.2 - IL_004b: leave.s IL_0062 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: add + IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_003e: nop + IL_003f: ldloc.1 + IL_0040: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0045: brtrue.s IL_000a + + IL_0047: leave.s IL_005e } finally { - IL_004d: ldloc.1 - IL_004e: isinst [runtime]System.IDisposable - IL_0053: stloc.s V_8 - IL_0055: ldloc.s V_8 - IL_0057: brfalse.s IL_0061 - - IL_0059: ldloc.s V_8 - IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0060: endfinally - IL_0061: endfinally + IL_0049: ldloc.1 + IL_004a: isinst [runtime]System.IDisposable + IL_004f: stloc.s V_7 + IL_0051: ldloc.s V_7 + IL_0053: brfalse.s IL_005d + + IL_0055: ldloc.s V_7 + IL_0057: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_005c: endfinally + IL_005d: endfinally } - IL_0062: ldloc.2 - IL_0063: pop - IL_0064: ldloca.s V_0 - IL_0066: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_006b: ret + IL_005e: ldloca.s V_0 + IL_0060: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0065: ret } .method public static int32[] f1(int32[] 'array') cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl index de1fc32050b..ab17cc29c8f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl @@ -39,54 +39,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0042: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f00(int32[] 'array') cil managed @@ -95,54 +90,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0042: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f000(int32[] 'array') cil managed @@ -151,9 +141,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -164,39 +153,35 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: nop IL_0012: ldloca.s V_0 - IL_0014: ldloc.3 + IL_0014: ldloc.2 IL_0015: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_001a: nop IL_001b: ldloc.1 IL_001c: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0021: brtrue.s IL_000a - IL_0023: ldnull - IL_0024: stloc.2 - IL_0025: leave.s IL_003c + IL_0023: leave.s IL_0037 } finally { - IL_0027: ldloc.1 - IL_0028: isinst [runtime]System.IDisposable - IL_002d: stloc.s V_4 - IL_002f: ldloc.s V_4 - IL_0031: brfalse.s IL_003b - - IL_0033: ldloc.s V_4 - IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003a: endfinally - IL_003b: endfinally + IL_0025: ldloc.1 + IL_0026: isinst [runtime]System.IDisposable + IL_002b: stloc.3 + IL_002c: ldloc.3 + IL_002d: brfalse.s IL_0036 + + IL_002f: ldloc.3 + IL_0030: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0035: endfinally + IL_0036: endfinally } - IL_003c: ldloc.2 - IL_003d: pop - IL_003e: ldloca.s V_0 - IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0045: ret + IL_0037: ldloca.s V_0 + IL_0039: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003e: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0000(int32[] 'array') cil managed @@ -205,54 +190,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0042: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -266,65 +246,60 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - class [runtime]System.IDisposable V_6) + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0028 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.1 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.2 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.2 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: ldloc.2 IL_001d: ldloc.3 - IL_001e: ldloc.s V_4 - IL_0020: add - IL_0021: ldloc.s V_5 - IL_0023: add - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_001e: add + IL_001f: ldloc.s V_4 + IL_0021: add + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.1 + IL_0029: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002e: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0030: leave.s IL_0047 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0032: ldloc.1 + IL_0033: isinst [runtime]System.IDisposable + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: brfalse.s IL_0046 + + IL_003e: ldloc.s V_5 + IL_0040: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0045: endfinally + IL_0046: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0054: ret + IL_0047: ldloca.s V_0 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004e: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -338,68 +313,63 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002e + IL_0008: br.s IL_002c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.1 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.2 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.2 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: ldloc.2 IL_0021: ldloc.3 - IL_0022: ldloc.s V_4 - IL_0024: add - IL_0025: ldloc.s V_5 - IL_0027: add - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloc.1 - IL_002f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0034: brtrue.s IL_000a - - IL_0036: ldnull - IL_0037: stloc.2 - IL_0038: leave.s IL_004f + IL_0022: add + IL_0023: ldloc.s V_4 + IL_0025: add + IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002b: nop + IL_002c: ldloc.1 + IL_002d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0032: brtrue.s IL_000a + + IL_0034: leave.s IL_004b } finally { - IL_003a: ldloc.1 - IL_003b: isinst [runtime]System.IDisposable - IL_0040: stloc.s V_7 - IL_0042: ldloc.s V_7 - IL_0044: brfalse.s IL_004e - - IL_0046: ldloc.s V_7 - IL_0048: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004d: endfinally - IL_004e: endfinally + IL_0036: ldloc.1 + IL_0037: isinst [runtime]System.IDisposable + IL_003c: stloc.s V_6 + IL_003e: ldloc.s V_6 + IL_0040: brfalse.s IL_004a + + IL_0042: ldloc.s V_6 + IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0049: endfinally + IL_004a: endfinally } - IL_004f: ldloc.2 - IL_0050: pop - IL_0051: ldloca.s V_0 - IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0058: ret + IL_004b: ldloca.s V_0 + IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0052: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -414,72 +384,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.1 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0018: pop - IL_0019: ldloc.3 + IL_0019: ldloc.2 IL_001a: ldarg.2 IL_001b: add - IL_001c: stloc.s V_4 - IL_001e: ldloc.3 - IL_001f: ldarg.3 - IL_0020: add - IL_0021: stloc.s V_5 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_001c: stloc.3 + IL_001d: ldloc.2 + IL_001e: ldarg.3 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -494,72 +459,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldarg.1 - IL_0017: ldnull - IL_0018: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001d: pop - IL_001e: ldloc.3 - IL_001f: ldarg.3 - IL_0020: add - IL_0021: stloc.s V_5 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldarg.1 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: ldloc.2 + IL_001e: ldarg.3 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -574,72 +534,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldarg.1 - IL_001c: ldnull - IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0022: pop - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.3 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldarg.1 + IL_001b: ldnull + IL_001c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0021: pop + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -654,77 +609,72 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, - class [runtime]System.IDisposable V_8) + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0041 + IL_0008: br.s IL_003f IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloca.s V_0 - IL_0030: stloc.s V_7 - IL_0032: ldloc.s V_7 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.3 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: ldarg.1 + IL_0021: ldnull + IL_0022: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloca.s V_0 + IL_002f: stloc.s V_6 + IL_0031: ldloc.s V_6 + IL_0033: ldloc.2 IL_0034: ldloc.3 - IL_0035: ldloc.s V_4 - IL_0037: add - IL_0038: ldloc.s V_5 - IL_003a: add - IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0040: nop - IL_0041: ldloc.1 - IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0047: brtrue.s IL_000a - - IL_0049: ldnull - IL_004a: stloc.2 - IL_004b: leave.s IL_0062 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: add + IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003e: nop + IL_003f: ldloc.1 + IL_0040: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0045: brtrue.s IL_000a + + IL_0047: leave.s IL_005e } finally { - IL_004d: ldloc.1 - IL_004e: isinst [runtime]System.IDisposable - IL_0053: stloc.s V_8 - IL_0055: ldloc.s V_8 - IL_0057: brfalse.s IL_0061 - - IL_0059: ldloc.s V_8 - IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0060: endfinally - IL_0061: endfinally + IL_0049: ldloc.1 + IL_004a: isinst [runtime]System.IDisposable + IL_004f: stloc.s V_7 + IL_0051: ldloc.s V_7 + IL_0053: brfalse.s IL_005d + + IL_0055: ldloc.s V_7 + IL_0057: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_005c: endfinally + IL_005d: endfinally } - IL_0062: ldloc.2 - IL_0063: pop - IL_0064: ldloca.s V_0 - 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 + IL_005e: ldloca.s V_0 + 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 } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f1(int32[] 'array') cil managed @@ -733,54 +683,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0042: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, int32[] 'array') cil managed @@ -790,56 +735,51 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0024 + IL_0008: br.s IL_0022 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldloc.3 - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.1 - IL_0025: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_002a: brtrue.s IL_000a - - IL_002c: ldnull - IL_002d: stloc.2 - IL_002e: leave.s IL_0045 + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldloc.2 + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0021: nop + IL_0022: ldloc.1 + IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0028: brtrue.s IL_000a + + IL_002a: leave.s IL_0041 } finally { - IL_0030: ldloc.1 - IL_0031: isinst [runtime]System.IDisposable - IL_0036: stloc.s V_5 - IL_0038: ldloc.s V_5 - IL_003a: brfalse.s IL_0044 - - IL_003c: ldloc.s V_5 - IL_003e: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0043: endfinally - IL_0044: endfinally + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.s V_4 + IL_0034: ldloc.s V_4 + IL_0036: brfalse.s IL_0040 + + IL_0038: ldloc.s V_4 + IL_003a: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003f: endfinally + IL_0040: endfinally } - IL_0045: ldloc.2 - IL_0046: pop - IL_0047: ldloca.s V_0 - IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004e: ret + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, int32[] 'array') cil managed @@ -849,61 +789,56 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - class [runtime]System.IDisposable V_6) + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0028 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldnull - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: pop - IL_001f: stloc.s V_5 - IL_0021: ldloc.s V_5 - IL_0023: ldloc.3 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a - - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: stloc.s V_4 + IL_001f: ldloc.s V_4 + IL_0021: ldloc.2 + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.1 + IL_0029: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002e: brtrue.s IL_000a + + IL_0030: leave.s IL_0047 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0032: ldloc.1 + IL_0033: isinst [runtime]System.IDisposable + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: brfalse.s IL_0046 + + IL_003e: ldloc.s V_5 + IL_0040: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0045: endfinally + IL_0046: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0054: ret + IL_0047: ldloca.s V_0 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004e: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -917,68 +852,63 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldnull - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: pop - IL_001f: stloc.s V_5 - IL_0021: ldloc.s V_5 - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002a: pop - IL_002b: stloc.s V_6 - IL_002d: ldloc.s V_6 - IL_002f: ldloc.3 - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: stloc.s V_4 + IL_001f: ldloc.s V_4 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: pop + IL_0029: stloc.s V_5 + IL_002b: ldloc.s V_5 + IL_002d: ldloc.2 + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5(int32[] 'array') cil managed @@ -987,54 +917,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0042: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, int32[] 'array') cil managed @@ -1044,9 +969,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -1057,42 +981,38 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.0 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0018: pop IL_0019: ldloca.s V_0 - IL_001b: ldloc.3 + IL_001b: ldloc.2 IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0021: nop IL_0022: ldloc.1 IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0028: brtrue.s IL_000a - IL_002a: ldnull - IL_002b: stloc.2 - IL_002c: leave.s IL_0043 + IL_002a: leave.s IL_003e } finally { - IL_002e: ldloc.1 - IL_002f: isinst [runtime]System.IDisposable - IL_0034: stloc.s V_4 - IL_0036: ldloc.s V_4 - IL_0038: brfalse.s IL_0042 - - IL_003a: ldloc.s V_4 - IL_003c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0041: endfinally - IL_0042: endfinally + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.3 + IL_0033: ldloc.3 + IL_0034: brfalse.s IL_003d + + IL_0036: ldloc.3 + IL_0037: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003c: endfinally + IL_003d: endfinally } - IL_0043: ldloc.2 - IL_0044: pop - IL_0045: ldloca.s V_0 - IL_0047: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004c: ret + IL_003e: ldloca.s V_0 + IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0045: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1106,9 +1026,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -1119,7 +1038,7 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.0 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -1129,36 +1048,32 @@ IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0020: pop IL_0021: ldloca.s V_0 - IL_0023: ldloc.3 + IL_0023: ldloc.2 IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0029: nop IL_002a: ldloc.1 IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0030: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0032: leave.s IL_0046 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_4 - IL_003e: ldloc.s V_4 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_4 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0034: ldloc.1 + IL_0035: isinst [runtime]System.IDisposable + IL_003a: stloc.3 + IL_003b: ldloc.3 + IL_003c: brfalse.s IL_0045 + + IL_003e: ldloc.3 + IL_003f: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0044: endfinally + IL_0045: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0054: ret + IL_0046: ldloca.s V_0 + IL_0048: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004d: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1174,10 +1089,9 @@ int32 V_1, int32 V_2, class [runtime]System.Collections.Generic.IEnumerator`1 V_3, - class [runtime]System.Collections.Generic.IEnumerable`1 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1197,11 +1111,11 @@ IL_001b: ldloc.3 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_5 + IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 - IL_0029: ldloc.s V_5 + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 IL_002b: ldloc.1 IL_002c: add IL_002d: ldloc.2 @@ -1212,29 +1126,25 @@ IL_0036: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_003b: brtrue.s IL_001b - IL_003d: ldnull - IL_003e: stloc.s V_4 - IL_0040: leave.s IL_0057 + IL_003d: leave.s IL_0054 } finally { - IL_0042: ldloc.3 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003f: ldloc.3 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0057: ldloc.s V_4 - IL_0059: pop - IL_005a: ldloca.s V_0 - IL_005c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0061: ret + IL_0054: ldloca.s V_0 + IL_0056: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1249,10 +1159,9 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, int32 V_1, class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - class [runtime]System.IDisposable V_6) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1268,46 +1177,42 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_0033 + IL_0019: br.s IL_0031 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: ldloc.1 + IL_002a: add + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0037: brtrue.s IL_001b - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 + IL_0039: leave.s IL_0050 } finally { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 + IL_003b: ldloc.2 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005d: ret + IL_0050: ldloca.s V_0 + IL_0052: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0057: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1321,10 +1226,9 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1340,44 +1244,40 @@ IL_0018: stloc.1 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_002d IL_001b: ldloc.1 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.3 + IL_0021: stloc.2 IL_0022: ldloca.s V_0 - IL_0024: stloc.s V_4 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.3 - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.1 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b - - IL_0037: ldnull - IL_0038: stloc.2 - IL_0039: leave.s IL_0050 + IL_0024: stloc.3 + IL_0025: ldloc.3 + IL_0026: ldloc.2 + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloc.1 + IL_002e: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0033: brtrue.s IL_001b + + IL_0035: leave.s IL_004c } finally { - IL_003b: ldloc.1 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_0037: ldloc.1 + IL_0038: isinst [runtime]System.IDisposable + IL_003d: stloc.s V_4 + IL_003f: ldloc.s V_4 + IL_0041: brfalse.s IL_004b + + IL_0043: ldloc.s V_4 + IL_0045: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004a: endfinally + IL_004b: endfinally } - IL_0050: ldloc.2 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0059: ret + IL_004c: ldloca.s V_0 + IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0053: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1392,10 +1292,9 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, int32 V_1, class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - class [runtime]System.IDisposable V_6) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1411,46 +1310,42 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_0033 + IL_0019: br.s IL_0031 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: ldloc.1 + IL_002a: add + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0037: brtrue.s IL_001b - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 + IL_0039: leave.s IL_0050 } finally { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 + IL_003b: ldloc.2 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005d: ret + IL_0050: ldloca.s V_0 + IL_0052: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0057: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl index 7708c761a93..c399823184d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl @@ -39,54 +39,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0042: ret } .method public static int32[] f00(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -95,54 +90,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0042: ret } .method public static int32[] f000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -151,9 +141,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -164,39 +153,35 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: nop IL_0012: ldloca.s V_0 - IL_0014: ldloc.3 + IL_0014: ldloc.2 IL_0015: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) IL_001a: nop IL_001b: ldloc.1 IL_001c: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0021: brtrue.s IL_000a - IL_0023: ldnull - IL_0024: stloc.2 - IL_0025: leave.s IL_003c + IL_0023: leave.s IL_0037 } finally { - IL_0027: ldloc.1 - IL_0028: isinst [runtime]System.IDisposable - IL_002d: stloc.s V_4 - IL_002f: ldloc.s V_4 - IL_0031: brfalse.s IL_003b - - IL_0033: ldloc.s V_4 - IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003a: endfinally - IL_003b: endfinally + IL_0025: ldloc.1 + IL_0026: isinst [runtime]System.IDisposable + IL_002b: stloc.3 + IL_002c: ldloc.3 + IL_002d: brfalse.s IL_0036 + + IL_002f: ldloc.3 + IL_0030: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0035: endfinally + IL_0036: endfinally } - IL_003c: ldloc.2 - IL_003d: pop - IL_003e: ldloca.s V_0 - IL_0040: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0045: ret + IL_0037: ldloca.s V_0 + IL_0039: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_003e: ret } .method public static int32[] f0000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -205,54 +190,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0042: ret } .method public static int32[] f00000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -265,65 +245,60 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - class [runtime]System.IDisposable V_6) + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0028 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.1 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.2 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.2 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: ldloc.2 IL_001d: ldloc.3 - IL_001e: ldloc.s V_4 - IL_0020: add - IL_0021: ldloc.s V_5 - IL_0023: add - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_001e: add + IL_001f: ldloc.s V_4 + IL_0021: add + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.1 + IL_0029: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002e: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0030: leave.s IL_0047 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0032: ldloc.1 + IL_0033: isinst [runtime]System.IDisposable + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: brfalse.s IL_0046 + + IL_003e: ldloc.s V_5 + IL_0040: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0045: endfinally + IL_0046: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0054: ret + IL_0047: ldloca.s V_0 + IL_0049: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_004e: ret } .method public static int32[] f000000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -336,68 +311,63 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002e + IL_0008: br.s IL_002c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.1 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.2 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.2 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: ldloc.2 IL_0021: ldloc.3 - IL_0022: ldloc.s V_4 - IL_0024: add - IL_0025: ldloc.s V_5 - IL_0027: add - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloc.1 - IL_002f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0034: brtrue.s IL_000a - - IL_0036: ldnull - IL_0037: stloc.2 - IL_0038: leave.s IL_004f + IL_0022: add + IL_0023: ldloc.s V_4 + IL_0025: add + IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002b: nop + IL_002c: ldloc.1 + IL_002d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0032: brtrue.s IL_000a + + IL_0034: leave.s IL_004b } finally { - IL_003a: ldloc.1 - IL_003b: isinst [runtime]System.IDisposable - IL_0040: stloc.s V_7 - IL_0042: ldloc.s V_7 - IL_0044: brfalse.s IL_004e - - IL_0046: ldloc.s V_7 - IL_0048: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004d: endfinally - IL_004e: endfinally + IL_0036: ldloc.1 + IL_0037: isinst [runtime]System.IDisposable + IL_003c: stloc.s V_6 + IL_003e: ldloc.s V_6 + IL_0040: brfalse.s IL_004a + + IL_0042: ldloc.s V_6 + IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0049: endfinally + IL_004a: endfinally } - IL_004f: ldloc.2 - IL_0050: pop - IL_0051: ldloca.s V_0 - IL_0053: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0058: ret + IL_004b: ldloca.s V_0 + IL_004d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0052: ret } .method public static int32[] f0000000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -411,72 +381,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.1 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0018: pop - IL_0019: ldloc.3 + IL_0019: ldloc.2 IL_001a: ldarg.2 IL_001b: add - IL_001c: stloc.s V_4 - IL_001e: ldloc.3 - IL_001f: ldarg.3 - IL_0020: add - IL_0021: stloc.s V_5 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_001c: stloc.3 + IL_001d: ldloc.2 + IL_001e: ldarg.3 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005a: ret } .method public static int32[] f00000000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -490,72 +455,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldarg.1 - IL_0017: ldnull - IL_0018: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001d: pop - IL_001e: ldloc.3 - IL_001f: ldarg.3 - IL_0020: add - IL_0021: stloc.s V_5 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldarg.1 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: ldloc.2 + IL_001e: ldarg.3 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005a: ret } .method public static int32[] f000000000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -569,72 +529,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldarg.1 - IL_001c: ldnull - IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0022: pop - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.3 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldarg.1 + IL_001b: ldnull + IL_001c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0021: pop + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005a: ret } .method public static int32[] f0000000000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -648,77 +603,72 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_7, - class [runtime]System.IDisposable V_8) + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0041 + IL_0008: br.s IL_003f IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloca.s V_0 - IL_0030: stloc.s V_7 - IL_0032: ldloc.s V_7 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.3 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: ldarg.1 + IL_0021: ldnull + IL_0022: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloca.s V_0 + IL_002f: stloc.s V_6 + IL_0031: ldloc.s V_6 + IL_0033: ldloc.2 IL_0034: ldloc.3 - IL_0035: ldloc.s V_4 - IL_0037: add - IL_0038: ldloc.s V_5 - IL_003a: add - IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0040: nop - IL_0041: ldloc.1 - IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0047: brtrue.s IL_000a - - IL_0049: ldnull - IL_004a: stloc.2 - IL_004b: leave.s IL_0062 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: add + IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_003e: nop + IL_003f: ldloc.1 + IL_0040: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0045: brtrue.s IL_000a + + IL_0047: leave.s IL_005e } finally { - IL_004d: ldloc.1 - IL_004e: isinst [runtime]System.IDisposable - IL_0053: stloc.s V_8 - IL_0055: ldloc.s V_8 - IL_0057: brfalse.s IL_0061 - - IL_0059: ldloc.s V_8 - IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0060: endfinally - IL_0061: endfinally + IL_0049: ldloc.1 + IL_004a: isinst [runtime]System.IDisposable + IL_004f: stloc.s V_7 + IL_0051: ldloc.s V_7 + IL_0053: brfalse.s IL_005d + + IL_0055: ldloc.s V_7 + IL_0057: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_005c: endfinally + IL_005d: endfinally } - IL_0062: ldloc.2 - IL_0063: pop - IL_0064: ldloca.s V_0 - IL_0066: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_006b: ret + IL_005e: ldloca.s V_0 + IL_0060: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0065: ret } .method public static int32[] f1(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -727,54 +677,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0042: ret } .method public static !!a[] f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -785,56 +730,51 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0024 + IL_0008: br.s IL_0022 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldloc.3 - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.1 - IL_0025: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_002a: brtrue.s IL_000a - - IL_002c: ldnull - IL_002d: stloc.2 - IL_002e: leave.s IL_0045 + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldloc.2 + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0021: nop + IL_0022: ldloc.1 + IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0028: brtrue.s IL_000a + + IL_002a: leave.s IL_0041 } finally { - IL_0030: ldloc.1 - IL_0031: isinst [runtime]System.IDisposable - IL_0036: stloc.s V_5 - IL_0038: ldloc.s V_5 - IL_003a: brfalse.s IL_0044 - - IL_003c: ldloc.s V_5 - IL_003e: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0043: endfinally - IL_0044: endfinally + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.s V_4 + IL_0034: ldloc.s V_4 + IL_0036: brfalse.s IL_0040 + + IL_0038: ldloc.s V_4 + IL_003a: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003f: endfinally + IL_0040: endfinally } - IL_0045: ldloc.2 - IL_0046: pop - IL_0047: ldloca.s V_0 - IL_0049: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_004e: ret + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static int32[] f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -845,61 +785,56 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - class [runtime]System.IDisposable V_6) + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0028 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldnull - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: pop - IL_001f: stloc.s V_5 - IL_0021: ldloc.s V_5 - IL_0023: ldloc.3 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a - - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: stloc.s V_4 + IL_001f: ldloc.s V_4 + IL_0021: ldloc.2 + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.1 + IL_0029: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002e: brtrue.s IL_000a + + IL_0030: leave.s IL_0047 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0032: ldloc.1 + IL_0033: isinst [runtime]System.IDisposable + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: brfalse.s IL_0046 + + IL_003e: ldloc.s V_5 + IL_0040: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0045: endfinally + IL_0046: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0054: ret + IL_0047: ldloca.s V_0 + IL_0049: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_004e: ret } .method public static int32[] f4(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -912,68 +847,63 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldnull - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: pop - IL_001f: stloc.s V_5 - IL_0021: ldloc.s V_5 - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002a: pop - IL_002b: stloc.s V_6 - IL_002d: ldloc.s V_6 - IL_002f: ldloc.3 - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: stloc.s V_4 + IL_001f: ldloc.s V_4 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: pop + IL_0029: stloc.s V_5 + IL_002b: ldloc.s V_5 + IL_002d: ldloc.2 + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005a: ret } .method public static int32[] f5(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -982,54 +912,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0042: ret } .method public static int32[] f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1040,9 +965,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -1053,42 +977,38 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.0 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0018: pop IL_0019: ldloca.s V_0 - IL_001b: ldloc.3 + IL_001b: ldloc.2 IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) IL_0021: nop IL_0022: ldloc.1 IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0028: brtrue.s IL_000a - IL_002a: ldnull - IL_002b: stloc.2 - IL_002c: leave.s IL_0043 + IL_002a: leave.s IL_003e } finally { - IL_002e: ldloc.1 - IL_002f: isinst [runtime]System.IDisposable - IL_0034: stloc.s V_4 - IL_0036: ldloc.s V_4 - IL_0038: brfalse.s IL_0042 - - IL_003a: ldloc.s V_4 - IL_003c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0041: endfinally - IL_0042: endfinally + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.3 + IL_0033: ldloc.3 + IL_0034: brfalse.s IL_003d + + IL_0036: ldloc.3 + IL_0037: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003c: endfinally + IL_003d: endfinally } - IL_0043: ldloc.2 - IL_0044: pop - IL_0045: ldloca.s V_0 - IL_0047: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_004c: ret + IL_003e: ldloca.s V_0 + IL_0040: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0045: ret } .method public static int32[] f7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1101,9 +1021,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -1114,7 +1033,7 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.0 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -1124,36 +1043,32 @@ IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0020: pop IL_0021: ldloca.s V_0 - IL_0023: ldloc.3 + IL_0023: ldloc.2 IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) IL_0029: nop IL_002a: ldloc.1 IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0030: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0032: leave.s IL_0046 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_4 - IL_003e: ldloc.s V_4 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_4 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0034: ldloc.1 + IL_0035: isinst [runtime]System.IDisposable + IL_003a: stloc.3 + IL_003b: ldloc.3 + IL_003c: brfalse.s IL_0045 + + IL_003e: ldloc.3 + IL_003f: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0044: endfinally + IL_0045: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0054: ret + IL_0046: ldloca.s V_0 + IL_0048: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_004d: ret } .method public static int32[] f8(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1168,10 +1083,9 @@ int32 V_1, int32 V_2, class [runtime]System.Collections.Generic.IEnumerator`1 V_3, - class [runtime]System.Collections.Generic.IEnumerable`1 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1191,11 +1105,11 @@ IL_001b: ldloc.3 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_5 + IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 - IL_0029: ldloc.s V_5 + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 IL_002b: ldloc.1 IL_002c: add IL_002d: ldloc.2 @@ -1206,29 +1120,25 @@ IL_0036: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_003b: brtrue.s IL_001b - IL_003d: ldnull - IL_003e: stloc.s V_4 - IL_0040: leave.s IL_0057 + IL_003d: leave.s IL_0054 } finally { - IL_0042: ldloc.3 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003f: ldloc.3 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0057: ldloc.s V_4 - IL_0059: pop - IL_005a: ldloca.s V_0 - IL_005c: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0061: ret + IL_0054: ldloca.s V_0 + IL_0056: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005b: ret } .method public static int32[] f9(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1242,10 +1152,9 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, int32 V_1, class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - class [runtime]System.IDisposable V_6) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1261,46 +1170,42 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_0033 + IL_0019: br.s IL_0031 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: ldloc.1 + IL_002a: add + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0037: brtrue.s IL_001b - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 + IL_0039: leave.s IL_0050 } finally { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 + IL_003b: ldloc.2 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005d: ret + IL_0050: ldloca.s V_0 + IL_0052: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0057: ret } .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1313,10 +1218,9 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1332,44 +1236,40 @@ IL_0018: stloc.1 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_002d IL_001b: ldloc.1 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.3 + IL_0021: stloc.2 IL_0022: ldloca.s V_0 - IL_0024: stloc.s V_4 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.3 - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.1 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b - - IL_0037: ldnull - IL_0038: stloc.2 - IL_0039: leave.s IL_0050 + IL_0024: stloc.3 + IL_0025: ldloc.3 + IL_0026: ldloc.2 + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloc.1 + IL_002e: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0033: brtrue.s IL_001b + + IL_0035: leave.s IL_004c } finally { - IL_003b: ldloc.1 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_0037: ldloc.1 + IL_0038: isinst [runtime]System.IDisposable + IL_003d: stloc.s V_4 + IL_003f: ldloc.s V_4 + IL_0041: brfalse.s IL_004b + + IL_0043: ldloc.s V_4 + IL_0045: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004a: endfinally + IL_004b: endfinally } - IL_0050: ldloc.2 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0059: ret + IL_004c: ldloca.s V_0 + IL_004e: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0053: ret } .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1383,10 +1283,9 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, int32 V_1, class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - class [runtime]System.IDisposable V_6) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1402,46 +1301,42 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_0033 + IL_0019: br.s IL_0031 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: ldloc.1 + IL_002a: add + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0037: brtrue.s IL_001b - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 + IL_0039: leave.s IL_0050 } finally { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 + IL_003b: ldloc.2 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005d: ret + IL_0050: ldloca.s V_0 + IL_0052: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0057: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl index 3996ee29c37..b657e9a6881 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl @@ -709,77 +709,72 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, - class [runtime]System.IDisposable V_8) + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0041 + IL_0008: br.s IL_003f IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloca.s V_0 - IL_0030: stloc.s V_7 - IL_0032: ldloc.s V_7 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.3 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: ldarg.1 + IL_0021: ldnull + IL_0022: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloca.s V_0 + IL_002f: stloc.s V_6 + IL_0031: ldloc.s V_6 + IL_0033: ldloc.2 IL_0034: ldloc.3 - IL_0035: ldloc.s V_4 - IL_0037: add - IL_0038: ldloc.s V_5 - IL_003a: add - IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0040: nop - IL_0041: ldloc.1 - IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0047: brtrue.s IL_000a - - IL_0049: ldnull - IL_004a: stloc.2 - IL_004b: leave.s IL_0062 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: add + IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003e: nop + IL_003f: ldloc.1 + IL_0040: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0045: brtrue.s IL_000a + + IL_0047: leave.s IL_005e } finally { - IL_004d: ldloc.1 - IL_004e: isinst [runtime]System.IDisposable - IL_0053: stloc.s V_8 - IL_0055: ldloc.s V_8 - IL_0057: brfalse.s IL_0061 - - IL_0059: ldloc.s V_8 - IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0060: endfinally - IL_0061: endfinally + IL_0049: ldloc.1 + IL_004a: isinst [runtime]System.IDisposable + IL_004f: stloc.s V_7 + IL_0051: ldloc.s V_7 + IL_0053: brfalse.s IL_005d + + IL_0055: ldloc.s V_7 + IL_0057: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_005c: endfinally + IL_005d: endfinally } - IL_0062: ldloc.2 - IL_0063: pop - IL_0064: ldloca.s V_0 - 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 + IL_005e: ldloca.s V_0 + 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 } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f1(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl index c428bae99fe..7693799bcec 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl @@ -39,54 +39,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0042: ret } .method public static int32[] f00(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -95,54 +90,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0042: ret } .method public static int32[] f000(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -151,9 +141,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -164,39 +153,35 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: nop IL_0012: ldloca.s V_0 - IL_0014: ldloc.3 + IL_0014: ldloc.2 IL_0015: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) IL_001a: nop IL_001b: ldloc.1 IL_001c: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0021: brtrue.s IL_000a - IL_0023: ldnull - IL_0024: stloc.2 - IL_0025: leave.s IL_003c + IL_0023: leave.s IL_0037 } finally { - IL_0027: ldloc.1 - IL_0028: isinst [runtime]System.IDisposable - IL_002d: stloc.s V_4 - IL_002f: ldloc.s V_4 - IL_0031: brfalse.s IL_003b - - IL_0033: ldloc.s V_4 - IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003a: endfinally - IL_003b: endfinally + IL_0025: ldloc.1 + IL_0026: isinst [runtime]System.IDisposable + IL_002b: stloc.3 + IL_002c: ldloc.3 + IL_002d: brfalse.s IL_0036 + + IL_002f: ldloc.3 + IL_0030: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0035: endfinally + IL_0036: endfinally } - IL_003c: ldloc.2 - IL_003d: pop - IL_003e: ldloca.s V_0 - IL_0040: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0045: ret + IL_0037: ldloca.s V_0 + IL_0039: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_003e: ret } .method public static int32[] f0000(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -205,54 +190,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0042: ret } .method public static int32[] f00000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -265,65 +245,60 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - class [runtime]System.IDisposable V_6) + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0028 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.1 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.2 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.2 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: ldloc.2 IL_001d: ldloc.3 - IL_001e: ldloc.s V_4 - IL_0020: add - IL_0021: ldloc.s V_5 - IL_0023: add - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_001e: add + IL_001f: ldloc.s V_4 + IL_0021: add + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.1 + IL_0029: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002e: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0030: leave.s IL_0047 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0032: ldloc.1 + IL_0033: isinst [runtime]System.IDisposable + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: brfalse.s IL_0046 + + IL_003e: ldloc.s V_5 + IL_0040: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0045: endfinally + IL_0046: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0054: ret + IL_0047: ldloca.s V_0 + IL_0049: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_004e: ret } .method public static int32[] f000000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -336,68 +311,63 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002e + IL_0008: br.s IL_002c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.1 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.2 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.2 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: ldloc.2 IL_0021: ldloc.3 - IL_0022: ldloc.s V_4 - IL_0024: add - IL_0025: ldloc.s V_5 - IL_0027: add - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloc.1 - IL_002f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0034: brtrue.s IL_000a - - IL_0036: ldnull - IL_0037: stloc.2 - IL_0038: leave.s IL_004f + IL_0022: add + IL_0023: ldloc.s V_4 + IL_0025: add + IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002b: nop + IL_002c: ldloc.1 + IL_002d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0032: brtrue.s IL_000a + + IL_0034: leave.s IL_004b } finally { - IL_003a: ldloc.1 - IL_003b: isinst [runtime]System.IDisposable - IL_0040: stloc.s V_7 - IL_0042: ldloc.s V_7 - IL_0044: brfalse.s IL_004e - - IL_0046: ldloc.s V_7 - IL_0048: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004d: endfinally - IL_004e: endfinally + IL_0036: ldloc.1 + IL_0037: isinst [runtime]System.IDisposable + IL_003c: stloc.s V_6 + IL_003e: ldloc.s V_6 + IL_0040: brfalse.s IL_004a + + IL_0042: ldloc.s V_6 + IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0049: endfinally + IL_004a: endfinally } - IL_004f: ldloc.2 - IL_0050: pop - IL_0051: ldloca.s V_0 - IL_0053: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0058: ret + IL_004b: ldloca.s V_0 + IL_004d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0052: ret } .method public static int32[] f0000000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -411,72 +381,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.1 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0018: pop - IL_0019: ldloc.3 + IL_0019: ldloc.2 IL_001a: ldarg.2 IL_001b: add - IL_001c: stloc.s V_4 - IL_001e: ldloc.3 - IL_001f: ldarg.3 - IL_0020: add - IL_0021: stloc.s V_5 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_001c: stloc.3 + IL_001d: ldloc.2 + IL_001e: ldarg.3 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005a: ret } .method public static int32[] f00000000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -490,72 +455,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldarg.1 - IL_0017: ldnull - IL_0018: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001d: pop - IL_001e: ldloc.3 - IL_001f: ldarg.3 - IL_0020: add - IL_0021: stloc.s V_5 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldarg.1 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: ldloc.2 + IL_001e: ldarg.3 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005a: ret } .method public static int32[] f000000000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -569,72 +529,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldarg.1 - IL_001c: ldnull - IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0022: pop - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.3 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldarg.1 + IL_001b: ldnull + IL_001c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0021: pop + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005a: ret } .method public static int32[] f0000000000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -648,77 +603,72 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_7, - class [runtime]System.IDisposable V_8) + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0041 + IL_0008: br.s IL_003f IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloca.s V_0 - IL_0030: stloc.s V_7 - IL_0032: ldloc.s V_7 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.3 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: ldarg.1 + IL_0021: ldnull + IL_0022: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloca.s V_0 + IL_002f: stloc.s V_6 + IL_0031: ldloc.s V_6 + IL_0033: ldloc.2 IL_0034: ldloc.3 - IL_0035: ldloc.s V_4 - IL_0037: add - IL_0038: ldloc.s V_5 - IL_003a: add - IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0040: nop - IL_0041: ldloc.1 - IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0047: brtrue.s IL_000a - - IL_0049: ldnull - IL_004a: stloc.2 - IL_004b: leave.s IL_0062 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: add + IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_003e: nop + IL_003f: ldloc.1 + IL_0040: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0045: brtrue.s IL_000a + + IL_0047: leave.s IL_005e } finally { - IL_004d: ldloc.1 - IL_004e: isinst [runtime]System.IDisposable - IL_0053: stloc.s V_8 - IL_0055: ldloc.s V_8 - IL_0057: brfalse.s IL_0061 - - IL_0059: ldloc.s V_8 - IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0060: endfinally - IL_0061: endfinally + IL_0049: ldloc.1 + IL_004a: isinst [runtime]System.IDisposable + IL_004f: stloc.s V_7 + IL_0051: ldloc.s V_7 + IL_0053: brfalse.s IL_005d + + IL_0055: ldloc.s V_7 + IL_0057: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_005c: endfinally + IL_005d: endfinally } - IL_0062: ldloc.2 - IL_0063: pop - IL_0064: ldloca.s V_0 - IL_0066: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_006b: ret + IL_005e: ldloca.s V_0 + IL_0060: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0065: ret } .method public static int32[] f1(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -727,54 +677,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0042: ret } .method public static !!a[] f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -785,56 +730,51 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0024 + IL_0008: br.s IL_0022 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldloc.3 - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.1 - IL_0025: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_002a: brtrue.s IL_000a - - IL_002c: ldnull - IL_002d: stloc.2 - IL_002e: leave.s IL_0045 + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldloc.2 + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0021: nop + IL_0022: ldloc.1 + IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0028: brtrue.s IL_000a + + IL_002a: leave.s IL_0041 } finally { - IL_0030: ldloc.1 - IL_0031: isinst [runtime]System.IDisposable - IL_0036: stloc.s V_5 - IL_0038: ldloc.s V_5 - IL_003a: brfalse.s IL_0044 - - IL_003c: ldloc.s V_5 - IL_003e: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0043: endfinally - IL_0044: endfinally + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.s V_4 + IL_0034: ldloc.s V_4 + IL_0036: brfalse.s IL_0040 + + IL_0038: ldloc.s V_4 + IL_003a: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003f: endfinally + IL_0040: endfinally } - IL_0045: ldloc.2 - IL_0046: pop - IL_0047: ldloca.s V_0 - IL_0049: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_004e: ret + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static int32[] f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -845,61 +785,56 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - class [runtime]System.IDisposable V_6) + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0028 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldnull - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: pop - IL_001f: stloc.s V_5 - IL_0021: ldloc.s V_5 - IL_0023: ldloc.3 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a - - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: stloc.s V_4 + IL_001f: ldloc.s V_4 + IL_0021: ldloc.2 + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.1 + IL_0029: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002e: brtrue.s IL_000a + + IL_0030: leave.s IL_0047 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0032: ldloc.1 + IL_0033: isinst [runtime]System.IDisposable + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: brfalse.s IL_0046 + + IL_003e: ldloc.s V_5 + IL_0040: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0045: endfinally + IL_0046: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0054: ret + IL_0047: ldloca.s V_0 + IL_0049: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_004e: ret } .method public static int32[] f4(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -912,68 +847,63 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldnull - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: pop - IL_001f: stloc.s V_5 - IL_0021: ldloc.s V_5 - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002a: pop - IL_002b: stloc.s V_6 - IL_002d: ldloc.s V_6 - IL_002f: ldloc.3 - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: stloc.s V_4 + IL_001f: ldloc.s V_4 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: pop + IL_0029: stloc.s V_5 + IL_002b: ldloc.s V_5 + IL_002d: ldloc.2 + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005a: ret } .method public static int32[] f5(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -982,54 +912,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0042: ret } .method public static int32[] f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1040,9 +965,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -1053,42 +977,38 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.0 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0018: pop IL_0019: ldloca.s V_0 - IL_001b: ldloc.3 + IL_001b: ldloc.2 IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) IL_0021: nop IL_0022: ldloc.1 IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0028: brtrue.s IL_000a - IL_002a: ldnull - IL_002b: stloc.2 - IL_002c: leave.s IL_0043 + IL_002a: leave.s IL_003e } finally { - IL_002e: ldloc.1 - IL_002f: isinst [runtime]System.IDisposable - IL_0034: stloc.s V_4 - IL_0036: ldloc.s V_4 - IL_0038: brfalse.s IL_0042 - - IL_003a: ldloc.s V_4 - IL_003c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0041: endfinally - IL_0042: endfinally + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.3 + IL_0033: ldloc.3 + IL_0034: brfalse.s IL_003d + + IL_0036: ldloc.3 + IL_0037: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003c: endfinally + IL_003d: endfinally } - IL_0043: ldloc.2 - IL_0044: pop - IL_0045: ldloca.s V_0 - IL_0047: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_004c: ret + IL_003e: ldloca.s V_0 + IL_0040: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0045: ret } .method public static int32[] f7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1101,9 +1021,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -1114,7 +1033,7 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.0 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -1124,36 +1043,32 @@ IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0020: pop IL_0021: ldloca.s V_0 - IL_0023: ldloc.3 + IL_0023: ldloc.2 IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) IL_0029: nop IL_002a: ldloc.1 IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0030: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0032: leave.s IL_0046 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_4 - IL_003e: ldloc.s V_4 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_4 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0034: ldloc.1 + IL_0035: isinst [runtime]System.IDisposable + IL_003a: stloc.3 + IL_003b: ldloc.3 + IL_003c: brfalse.s IL_0045 + + IL_003e: ldloc.3 + IL_003f: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0044: endfinally + IL_0045: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0054: ret + IL_0046: ldloca.s V_0 + IL_0048: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_004d: ret } .method public static int32[] f8(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1168,10 +1083,9 @@ int32 V_1, int32 V_2, class [runtime]System.Collections.Generic.IEnumerator`1 V_3, - class [runtime]System.Collections.Generic.IEnumerable`1 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - class [runtime]System.IDisposable V_7) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1191,11 +1105,11 @@ IL_001b: ldloc.3 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_5 + IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 - IL_0029: ldloc.s V_5 + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 IL_002b: ldloc.1 IL_002c: add IL_002d: ldloc.2 @@ -1206,29 +1120,25 @@ IL_0036: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_003b: brtrue.s IL_001b - IL_003d: ldnull - IL_003e: stloc.s V_4 - IL_0040: leave.s IL_0057 + IL_003d: leave.s IL_0054 } finally { - IL_0042: ldloc.3 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003f: ldloc.3 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0057: ldloc.s V_4 - IL_0059: pop - IL_005a: ldloca.s V_0 - IL_005c: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0061: ret + IL_0054: ldloca.s V_0 + IL_0056: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005b: ret } .method public static int32[] f9(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1242,10 +1152,9 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, int32 V_1, class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - class [runtime]System.IDisposable V_6) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1261,46 +1170,42 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_0033 + IL_0019: br.s IL_0031 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: ldloc.1 + IL_002a: add + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0037: brtrue.s IL_001b - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 + IL_0039: leave.s IL_0050 } finally { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 + IL_003b: ldloc.2 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005d: ret + IL_0050: ldloca.s V_0 + IL_0052: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0057: ret } .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1313,10 +1218,9 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1332,44 +1236,40 @@ IL_0018: stloc.1 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_002d IL_001b: ldloc.1 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.3 + IL_0021: stloc.2 IL_0022: ldloca.s V_0 - IL_0024: stloc.s V_4 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.3 - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.1 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b - - IL_0037: ldnull - IL_0038: stloc.2 - IL_0039: leave.s IL_0050 + IL_0024: stloc.3 + IL_0025: ldloc.3 + IL_0026: ldloc.2 + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloc.1 + IL_002e: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0033: brtrue.s IL_001b + + IL_0035: leave.s IL_004c } finally { - IL_003b: ldloc.1 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_0037: ldloc.1 + IL_0038: isinst [runtime]System.IDisposable + IL_003d: stloc.s V_4 + IL_003f: ldloc.s V_4 + IL_0041: brfalse.s IL_004b + + IL_0043: ldloc.s V_4 + IL_0045: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004a: endfinally + IL_004b: endfinally } - IL_0050: ldloc.2 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0059: ret + IL_004c: ldloca.s V_0 + IL_004e: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0053: ret } .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1383,10 +1283,9 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, int32 V_1, class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - class [runtime]System.IDisposable V_6) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1402,46 +1301,42 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_0033 + IL_0019: br.s IL_0031 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: ldloc.1 + IL_002a: add + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0037: brtrue.s IL_001b - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 + IL_0039: leave.s IL_0050 } finally { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 + IL_003b: ldloc.2 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005d: ret + IL_0050: ldloca.s V_0 + IL_0052: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0057: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl index 3124d71b521..d9e33bfa31c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl @@ -39,54 +39,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0042: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f00(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -95,54 +90,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0042: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f000(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -151,9 +141,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -164,39 +153,35 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: nop IL_0012: ldloca.s V_0 - IL_0014: ldloc.3 + IL_0014: ldloc.2 IL_0015: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_001a: nop IL_001b: ldloc.1 IL_001c: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0021: brtrue.s IL_000a - IL_0023: ldnull - IL_0024: stloc.2 - IL_0025: leave.s IL_003c + IL_0023: leave.s IL_0037 } finally { - IL_0027: ldloc.1 - IL_0028: isinst [runtime]System.IDisposable - IL_002d: stloc.s V_4 - IL_002f: ldloc.s V_4 - IL_0031: brfalse.s IL_003b - - IL_0033: ldloc.s V_4 - IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003a: endfinally - IL_003b: endfinally + IL_0025: ldloc.1 + IL_0026: isinst [runtime]System.IDisposable + IL_002b: stloc.3 + IL_002c: ldloc.3 + IL_002d: brfalse.s IL_0036 + + IL_002f: ldloc.3 + IL_0030: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0035: endfinally + IL_0036: endfinally } - IL_003c: ldloc.2 - IL_003d: pop - IL_003e: ldloca.s V_0 - IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0045: ret + IL_0037: ldloca.s V_0 + IL_0039: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003e: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0000(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -205,54 +190,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0042: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -266,65 +246,60 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - class [runtime]System.IDisposable V_6) + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0028 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.1 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.2 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.2 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: ldloc.2 IL_001d: ldloc.3 - IL_001e: ldloc.s V_4 - IL_0020: add - IL_0021: ldloc.s V_5 - IL_0023: add - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_001e: add + IL_001f: ldloc.s V_4 + IL_0021: add + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.1 + IL_0029: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002e: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0030: leave.s IL_0047 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0032: ldloc.1 + IL_0033: isinst [runtime]System.IDisposable + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: brfalse.s IL_0046 + + IL_003e: ldloc.s V_5 + IL_0040: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0045: endfinally + IL_0046: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0054: ret + IL_0047: ldloca.s V_0 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004e: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -338,68 +313,63 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002e + IL_0008: br.s IL_002c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.1 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.2 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.2 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: ldloc.2 IL_0021: ldloc.3 - IL_0022: ldloc.s V_4 - IL_0024: add - IL_0025: ldloc.s V_5 - IL_0027: add - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloc.1 - IL_002f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0034: brtrue.s IL_000a - - IL_0036: ldnull - IL_0037: stloc.2 - IL_0038: leave.s IL_004f + IL_0022: add + IL_0023: ldloc.s V_4 + IL_0025: add + IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002b: nop + IL_002c: ldloc.1 + IL_002d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0032: brtrue.s IL_000a + + IL_0034: leave.s IL_004b } finally { - IL_003a: ldloc.1 - IL_003b: isinst [runtime]System.IDisposable - IL_0040: stloc.s V_7 - IL_0042: ldloc.s V_7 - IL_0044: brfalse.s IL_004e - - IL_0046: ldloc.s V_7 - IL_0048: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004d: endfinally - IL_004e: endfinally + IL_0036: ldloc.1 + IL_0037: isinst [runtime]System.IDisposable + IL_003c: stloc.s V_6 + IL_003e: ldloc.s V_6 + IL_0040: brfalse.s IL_004a + + IL_0042: ldloc.s V_6 + IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0049: endfinally + IL_004a: endfinally } - IL_004f: ldloc.2 - IL_0050: pop - IL_0051: ldloca.s V_0 - IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0058: ret + IL_004b: ldloca.s V_0 + IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0052: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -414,72 +384,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.1 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0018: pop - IL_0019: ldloc.3 + IL_0019: ldloc.2 IL_001a: ldarg.2 IL_001b: add - IL_001c: stloc.s V_4 - IL_001e: ldloc.3 - IL_001f: ldarg.3 - IL_0020: add - IL_0021: stloc.s V_5 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_001c: stloc.3 + IL_001d: ldloc.2 + IL_001e: ldarg.3 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -494,72 +459,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldarg.1 - IL_0017: ldnull - IL_0018: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001d: pop - IL_001e: ldloc.3 - IL_001f: ldarg.3 - IL_0020: add - IL_0021: stloc.s V_5 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldarg.1 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: ldloc.2 + IL_001e: ldarg.3 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -574,72 +534,67 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldarg.1 - IL_001c: ldnull - IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0022: pop - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.3 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldarg.1 + IL_001b: ldnull + IL_001c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0021: pop + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_5 + IL_0028: ldloc.2 IL_0029: ldloc.3 - IL_002a: ldloc.s V_4 - IL_002c: add - IL_002d: ldloc.s V_5 - IL_002f: add - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_002a: add + IL_002b: ldloc.s V_4 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -654,77 +609,72 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_2, int32 V_3, int32 V_4, - int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, - class [runtime]System.IDisposable V_8) + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0041 + IL_0008: br.s IL_003f IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: ldarg.2 IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloca.s V_0 - IL_0030: stloc.s V_7 - IL_0032: ldloc.s V_7 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldarg.3 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloca.s V_0 + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: ldarg.1 + IL_0021: ldnull + IL_0022: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloca.s V_0 + IL_002f: stloc.s V_6 + IL_0031: ldloc.s V_6 + IL_0033: ldloc.2 IL_0034: ldloc.3 - IL_0035: ldloc.s V_4 - IL_0037: add - IL_0038: ldloc.s V_5 - IL_003a: add - IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0040: nop - IL_0041: ldloc.1 - IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0047: brtrue.s IL_000a - - IL_0049: ldnull - IL_004a: stloc.2 - IL_004b: leave.s IL_0062 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: add + IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003e: nop + IL_003f: ldloc.1 + IL_0040: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0045: brtrue.s IL_000a + + IL_0047: leave.s IL_005e } finally { - IL_004d: ldloc.1 - IL_004e: isinst [runtime]System.IDisposable - IL_0053: stloc.s V_8 - IL_0055: ldloc.s V_8 - IL_0057: brfalse.s IL_0061 - - IL_0059: ldloc.s V_8 - IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0060: endfinally - IL_0061: endfinally + IL_0049: ldloc.1 + IL_004a: isinst [runtime]System.IDisposable + IL_004f: stloc.s V_7 + IL_0051: ldloc.s V_7 + IL_0053: brfalse.s IL_005d + + IL_0055: ldloc.s V_7 + IL_0057: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_005c: endfinally + IL_005d: endfinally } - IL_0062: ldloc.2 - IL_0063: pop - IL_0064: ldloca.s V_0 - 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 + IL_005e: ldloca.s V_0 + 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 } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f1(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -733,54 +683,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0042: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -790,56 +735,51 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0024 + IL_0008: br.s IL_0022 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldloc.3 - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.1 - IL_0025: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_002a: brtrue.s IL_000a - - IL_002c: ldnull - IL_002d: stloc.2 - IL_002e: leave.s IL_0045 + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldloc.2 + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0021: nop + IL_0022: ldloc.1 + IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0028: brtrue.s IL_000a + + IL_002a: leave.s IL_0041 } finally { - IL_0030: ldloc.1 - IL_0031: isinst [runtime]System.IDisposable - IL_0036: stloc.s V_5 - IL_0038: ldloc.s V_5 - IL_003a: brfalse.s IL_0044 - - IL_003c: ldloc.s V_5 - IL_003e: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0043: endfinally - IL_0044: endfinally + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.s V_4 + IL_0034: ldloc.s V_4 + IL_0036: brfalse.s IL_0040 + + IL_0038: ldloc.s V_4 + IL_003a: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003f: endfinally + IL_0040: endfinally } - IL_0045: ldloc.2 - IL_0046: pop - IL_0047: ldloca.s V_0 - IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004e: ret + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -849,61 +789,56 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - class [runtime]System.IDisposable V_6) + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0028 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldnull - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: pop - IL_001f: stloc.s V_5 - IL_0021: ldloc.s V_5 - IL_0023: ldloc.3 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a - - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: stloc.s V_4 + IL_001f: ldloc.s V_4 + IL_0021: ldloc.2 + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.1 + IL_0029: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002e: brtrue.s IL_000a + + IL_0030: leave.s IL_0047 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0032: ldloc.1 + IL_0033: isinst [runtime]System.IDisposable + IL_0038: stloc.s V_5 + IL_003a: ldloc.s V_5 + IL_003c: brfalse.s IL_0046 + + IL_003e: ldloc.s V_5 + IL_0040: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0045: endfinally + IL_0046: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0054: ret + IL_0047: ldloca.s V_0 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004e: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -917,68 +852,63 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0036 + IL_0008: br.s IL_0034 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldarg.0 - IL_0018: ldnull - IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001e: pop - IL_001f: stloc.s V_5 - IL_0021: ldloc.s V_5 - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_002a: pop - IL_002b: stloc.s V_6 - IL_002d: ldloc.s V_6 - IL_002f: ldloc.3 - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0035: nop - IL_0036: ldloc.1 - IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003c: brtrue.s IL_000a + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldarg.0 + IL_0016: ldnull + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: pop + IL_001d: stloc.s V_4 + IL_001f: ldloc.s V_4 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: pop + IL_0029: stloc.s V_5 + IL_002b: ldloc.s V_5 + IL_002d: ldloc.2 + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.1 + IL_0035: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003a: brtrue.s IL_000a - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_0057 + IL_003c: leave.s IL_0053 } finally { - IL_0042: ldloc.1 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_6 + IL_0046: ldloc.s V_6 + IL_0048: brfalse.s IL_0052 + + IL_004a: ldloc.s V_6 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally } - IL_0057: ldloc.2 - IL_0058: pop - IL_0059: ldloca.s V_0 - IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0060: ret + IL_0053: ldloca.s V_0 + IL_0055: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -987,54 +917,49 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s V_0 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: ldloc.3 - IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0024: brtrue.s IL_000a - - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f + IL_0013: stloc.3 + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001b: nop + IL_001c: ldloc.1 + IL_001d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0022: brtrue.s IL_000a + + IL_0024: leave.s IL_003b } finally { - IL_002a: ldloc.1 - IL_002b: isinst [runtime]System.IDisposable - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: brfalse.s IL_003e - - IL_0036: ldloc.s V_5 - IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003d: endfinally - IL_003e: endfinally + IL_0026: ldloc.1 + IL_0027: isinst [runtime]System.IDisposable + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_003a + + IL_0032: ldloc.s V_4 + IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0039: endfinally + IL_003a: endfinally } - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_003b: ldloca.s V_0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0042: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -1044,9 +969,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -1057,42 +981,38 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.0 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0018: pop IL_0019: ldloca.s V_0 - IL_001b: ldloc.3 + IL_001b: ldloc.2 IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0021: nop IL_0022: ldloc.1 IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0028: brtrue.s IL_000a - IL_002a: ldnull - IL_002b: stloc.2 - IL_002c: leave.s IL_0043 + IL_002a: leave.s IL_003e } finally { - IL_002e: ldloc.1 - IL_002f: isinst [runtime]System.IDisposable - IL_0034: stloc.s V_4 - IL_0036: ldloc.s V_4 - IL_0038: brfalse.s IL_0042 - - IL_003a: ldloc.s V_4 - IL_003c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0041: endfinally - IL_0042: endfinally + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.3 + IL_0033: ldloc.3 + IL_0034: brfalse.s IL_003d + + IL_0036: ldloc.3 + IL_0037: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003c: endfinally + IL_003d: endfinally } - IL_0043: ldloc.2 - IL_0044: pop - IL_0045: ldloca.s V_0 - IL_0047: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004c: ret + IL_003e: ldloca.s V_0 + IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0045: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1106,9 +1026,8 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) + int32 V_2, + class [runtime]System.IDisposable V_3) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() @@ -1119,7 +1038,7 @@ IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldarg.0 IL_0012: ldnull IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -1129,36 +1048,32 @@ IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0020: pop IL_0021: ldloca.s V_0 - IL_0023: ldloc.3 + IL_0023: ldloc.2 IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0029: nop IL_002a: ldloc.1 IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0030: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0032: leave.s IL_0046 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_4 - IL_003e: ldloc.s V_4 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_4 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0034: ldloc.1 + IL_0035: isinst [runtime]System.IDisposable + IL_003a: stloc.3 + IL_003b: ldloc.3 + IL_003c: brfalse.s IL_0045 + + IL_003e: ldloc.3 + IL_003f: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0044: endfinally + IL_0045: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0054: ret + IL_0046: ldloca.s V_0 + IL_0048: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004d: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1174,10 +1089,9 @@ int32 V_1, int32 V_2, class [runtime]System.Collections.Generic.IEnumerator`1 V_3, - class [runtime]System.Collections.Generic.IEnumerable`1 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, - class [runtime]System.IDisposable V_7) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1197,11 +1111,11 @@ IL_001b: ldloc.3 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_5 + IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_6 - IL_0027: ldloc.s V_6 - IL_0029: ldloc.s V_5 + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 IL_002b: ldloc.1 IL_002c: add IL_002d: ldloc.2 @@ -1212,29 +1126,25 @@ IL_0036: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_003b: brtrue.s IL_001b - IL_003d: ldnull - IL_003e: stloc.s V_4 - IL_0040: leave.s IL_0057 + IL_003d: leave.s IL_0054 } finally { - IL_0042: ldloc.3 - IL_0043: isinst [runtime]System.IDisposable - IL_0048: stloc.s V_7 - IL_004a: ldloc.s V_7 - IL_004c: brfalse.s IL_0056 - - IL_004e: ldloc.s V_7 - IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0055: endfinally - IL_0056: endfinally + IL_003f: ldloc.3 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0057: ldloc.s V_4 - IL_0059: pop - IL_005a: ldloca.s V_0 - IL_005c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0061: ret + IL_0054: ldloca.s V_0 + IL_0056: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1249,10 +1159,9 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, int32 V_1, class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - class [runtime]System.IDisposable V_6) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1268,46 +1177,42 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_0033 + IL_0019: br.s IL_0031 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: ldloc.1 + IL_002a: add + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0037: brtrue.s IL_001b - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 + IL_0039: leave.s IL_0050 } finally { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 + IL_003b: ldloc.2 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005d: ret + IL_0050: ldloca.s V_0 + IL_0052: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0057: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1321,10 +1226,9 @@ .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) + int32 V_2, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_3, + class [runtime]System.IDisposable V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1340,44 +1244,40 @@ IL_0018: stloc.1 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_002d IL_001b: ldloc.1 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.3 + IL_0021: stloc.2 IL_0022: ldloca.s V_0 - IL_0024: stloc.s V_4 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.3 - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.1 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b - - IL_0037: ldnull - IL_0038: stloc.2 - IL_0039: leave.s IL_0050 + IL_0024: stloc.3 + IL_0025: ldloc.3 + IL_0026: ldloc.2 + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloc.1 + IL_002e: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0033: brtrue.s IL_001b + + IL_0035: leave.s IL_004c } finally { - IL_003b: ldloc.1 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_0037: ldloc.1 + IL_0038: isinst [runtime]System.IDisposable + IL_003d: stloc.s V_4 + IL_003f: ldloc.s V_4 + IL_0041: brfalse.s IL_004b + + IL_0043: ldloc.s V_4 + IL_0045: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004a: endfinally + IL_004b: endfinally } - IL_0050: ldloc.2 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0059: ret + IL_004c: ldloca.s V_0 + IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0053: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1392,10 +1292,9 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, int32 V_1, class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - class [runtime]System.IDisposable V_6) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1411,46 +1310,42 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_0033 + IL_0019: br.s IL_0031 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: ldloc.1 + IL_002a: add + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0037: brtrue.s IL_001b - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 + IL_0039: leave.s IL_0050 } finally { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 + IL_003b: ldloc.2 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005d: ret + IL_0050: ldloca.s V_0 + IL_0052: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0057: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs new file mode 100644 index 00000000000..dbfdcd41472 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs @@ -0,0 +1,13 @@ +module StructSeqCollectToList + +open System.Collections +open System.Collections.Generic + +[] +type StructSeq(items: int[]) = + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = (items :> IEnumerable).GetEnumerator() + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = items.GetEnumerator() + +let collectToList (xs: StructSeq list) = xs |> Seq.collect id |> List.ofSeq diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs.RealInternalSignatureOff.OptimizeOn.il.bsl new file mode 100644 index 00000000000..a0e648753e3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -0,0 +1,318 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class sequential ansi serializable sealed nested public StructSeq + extends [runtime]System.ValueType + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable, + [runtime]System.Collections.IEnumerable, + class [runtime]System.Collections.Generic.IEnumerable`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly int32[] items + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/StructSeq obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0005: ldarg.0 + IL_0006: ldfld int32[] assembly/StructSeq::items + IL_000b: ldarga.s obj + IL_000d: ldfld int32[] assembly/StructSeq::items + IL_0012: tail. + IL_0014: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0019: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/StructSeq + IL_0007: call instance int32 assembly/StructSeq::CompareTo(valuetype assembly/StructSeq) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (valuetype assembly/StructSeq V_0) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/StructSeq + IL_0006: stloc.0 + IL_0007: ldarg.2 + IL_0008: ldarg.0 + IL_0009: ldfld int32[] assembly/StructSeq::items + IL_000e: ldloca.s V_0 + IL_0010: ldfld int32[] assembly/StructSeq::items + IL_0015: tail. + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld int32[] assembly/StructSeq::items + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: call instance int32 assembly/StructSeq::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(valuetype assembly/StructSeq obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.2 + IL_0001: ldarg.0 + IL_0002: ldfld int32[] assembly/StructSeq::items + IL_0007: ldarga.s obj + IL_0009: ldfld int32[] assembly/StructSeq::items + IL_000e: tail. + IL_0010: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (valuetype assembly/StructSeq V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/StructSeq + IL_0006: brfalse.s IL_0018 + + IL_0008: ldarg.1 + IL_0009: unbox.any assembly/StructSeq + IL_000e: stloc.0 + IL_000f: ldarg.0 + IL_0010: ldloc.0 + IL_0011: ldarg.2 + IL_0012: call instance bool assembly/StructSeq::Equals(valuetype assembly/StructSeq, + class [runtime]System.Collections.IEqualityComparer) + IL_0017: ret + + IL_0018: ldc.i4.0 + IL_0019: ret + } + + .method public specialname rtspecialname instance void .ctor(int32[] items) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32[] assembly/StructSeq::items + IL_0007: ret + } + + .method private hidebysig newslot virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 'System.Collections.Generic.IEnumerable.GetEnumerator'() cil managed + { + .override method instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32[] assembly/StructSeq::items + IL_0006: tail. + IL_0008: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000d: ret + } + + .method private hidebysig newslot virtual instance class [runtime]System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed + { + .override [runtime]System.Collections.IEnumerable::GetEnumerator + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32[] assembly/StructSeq::items + IL_0006: tail. + IL_0008: callvirt instance class [runtime]System.Collections.IEnumerator [runtime]System.Array::GetEnumerator() + IL_000d: ret + } + + .method public hidebysig virtual final instance bool Equals(valuetype assembly/StructSeq obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32[] assembly/StructSeq::items + IL_0006: ldarga.s obj + IL_0008: ldfld int32[] assembly/StructSeq::items + IL_000d: tail. + IL_000f: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + !!0) + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: isinst assembly/StructSeq + IL_0006: brfalse.s IL_0015 + + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: unbox.any assembly/StructSeq + IL_000f: call instance bool assembly/StructSeq::Equals(valuetype assembly/StructSeq) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 collectToList(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 xs) cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + valuetype assembly/StructSeq V_2, + class [runtime]System.IDisposable V_3) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0007: stloc.1 + .try + { + IL_0008: br.s IL_0024 + + IL_000a: ldloc.1 + IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0010: stloc.2 + IL_0011: ldloca.s V_0 + IL_0013: ldloc.2 + IL_0014: box assembly/StructSeq + IL_0019: unbox.any class [runtime]System.Collections.Generic.IEnumerable`1 + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::AddMany(class [runtime]System.Collections.Generic.IEnumerable`1) + IL_0023: nop + IL_0024: ldloc.1 + IL_0025: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002a: brtrue.s IL_000a + + IL_002c: leave.s IL_0040 + + } + finally + { + IL_002e: ldloc.1 + IL_002f: isinst [runtime]System.IDisposable + IL_0034: stloc.3 + IL_0035: ldloc.3 + IL_0036: brfalse.s IL_003f + + IL_0038: ldloc.3 + IL_0039: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003e: endfinally + IL_003f: endfinally + } + IL_0040: ldloca.s V_0 + IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0047: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs.RealInternalSignatureOn.OptimizeOn.il.bsl new file mode 100644 index 00000000000..a0e648753e3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/StructSeqCollectToList.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -0,0 +1,318 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class sequential ansi serializable sealed nested public StructSeq + extends [runtime]System.ValueType + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable, + [runtime]System.Collections.IEnumerable, + class [runtime]System.Collections.Generic.IEnumerable`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly int32[] items + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/StructSeq obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0005: ldarg.0 + IL_0006: ldfld int32[] assembly/StructSeq::items + IL_000b: ldarga.s obj + IL_000d: ldfld int32[] assembly/StructSeq::items + IL_0012: tail. + IL_0014: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0019: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/StructSeq + IL_0007: call instance int32 assembly/StructSeq::CompareTo(valuetype assembly/StructSeq) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (valuetype assembly/StructSeq V_0) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/StructSeq + IL_0006: stloc.0 + IL_0007: ldarg.2 + IL_0008: ldarg.0 + IL_0009: ldfld int32[] assembly/StructSeq::items + IL_000e: ldloca.s V_0 + IL_0010: ldfld int32[] assembly/StructSeq::items + IL_0015: tail. + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld int32[] assembly/StructSeq::items + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: call instance int32 assembly/StructSeq::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(valuetype assembly/StructSeq obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.2 + IL_0001: ldarg.0 + IL_0002: ldfld int32[] assembly/StructSeq::items + IL_0007: ldarga.s obj + IL_0009: ldfld int32[] assembly/StructSeq::items + IL_000e: tail. + IL_0010: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (valuetype assembly/StructSeq V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/StructSeq + IL_0006: brfalse.s IL_0018 + + IL_0008: ldarg.1 + IL_0009: unbox.any assembly/StructSeq + IL_000e: stloc.0 + IL_000f: ldarg.0 + IL_0010: ldloc.0 + IL_0011: ldarg.2 + IL_0012: call instance bool assembly/StructSeq::Equals(valuetype assembly/StructSeq, + class [runtime]System.Collections.IEqualityComparer) + IL_0017: ret + + IL_0018: ldc.i4.0 + IL_0019: ret + } + + .method public specialname rtspecialname instance void .ctor(int32[] items) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32[] assembly/StructSeq::items + IL_0007: ret + } + + .method private hidebysig newslot virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 'System.Collections.Generic.IEnumerable.GetEnumerator'() cil managed + { + .override method instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32[] assembly/StructSeq::items + IL_0006: tail. + IL_0008: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000d: ret + } + + .method private hidebysig newslot virtual instance class [runtime]System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed + { + .override [runtime]System.Collections.IEnumerable::GetEnumerator + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32[] assembly/StructSeq::items + IL_0006: tail. + IL_0008: callvirt instance class [runtime]System.Collections.IEnumerator [runtime]System.Array::GetEnumerator() + IL_000d: ret + } + + .method public hidebysig virtual final instance bool Equals(valuetype assembly/StructSeq obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32[] assembly/StructSeq::items + IL_0006: ldarga.s obj + IL_0008: ldfld int32[] assembly/StructSeq::items + IL_000d: tail. + IL_000f: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + !!0) + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: isinst assembly/StructSeq + IL_0006: brfalse.s IL_0015 + + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: unbox.any assembly/StructSeq + IL_000f: call instance bool assembly/StructSeq::Equals(valuetype assembly/StructSeq) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 collectToList(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 xs) cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + valuetype assembly/StructSeq V_2, + class [runtime]System.IDisposable V_3) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0007: stloc.1 + .try + { + IL_0008: br.s IL_0024 + + IL_000a: ldloc.1 + IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0010: stloc.2 + IL_0011: ldloca.s V_0 + IL_0013: ldloc.2 + IL_0014: box assembly/StructSeq + IL_0019: unbox.any class [runtime]System.Collections.Generic.IEnumerable`1 + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::AddMany(class [runtime]System.Collections.Generic.IEnumerable`1) + IL_0023: nop + IL_0024: ldloc.1 + IL_0025: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002a: brtrue.s IL_000a + + IL_002c: leave.s IL_0040 + + } + finally + { + IL_002e: ldloc.1 + IL_002f: isinst [runtime]System.IDisposable + IL_0034: stloc.3 + IL_0035: ldloc.3 + IL_0036: brfalse.s IL_003f + + IL_0038: ldloc.3 + IL_0039: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003e: endfinally + IL_003f: endfinally + } + IL_0040: ldloca.s V_0 + IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0047: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl index 8fcc590231f..0eeedbf5c52 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl @@ -22,46 +22,42 @@ Module::f IL_0001: ldarg.0 IL_0002: callvirt GetEnumerator IL_0007: stloc.1 - IL_0008: br.s IL_0027 + IL_0008: br.s IL_0025 IL_000a: ldloc.1 IL_000b: callvirt get_Current - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: call Module::|Id| - IL_0017: stloc.s 4 - IL_0019: ldloc.s 4 - IL_001b: stloc.s 5 + IL_0017: stloc.3 + IL_0018: ldloc.3 + IL_0019: stloc.s 4 (8,13-8,20) yield i - IL_001d: ldloca.s 0 - IL_001f: ldloc.s 5 - IL_0021: call Add - IL_0026: nop + IL_001b: ldloca.s 0 + IL_001d: ldloc.s 4 + IL_001f: call Add + IL_0024: nop (7,18-7,20) in - IL_0027: ldloc.1 - IL_0028: callvirt IEnumerator::MoveNext - IL_002d: brtrue.s IL_000a - IL_002f: ldnull - IL_0030: stloc.2 - IL_0031: leave.s IL_0048 - IL_0033: ldloc.1 - IL_0034: isinst IDisposable - IL_0039: stloc.s 6 - IL_003b: ldloc.s 6 - IL_003d: brfalse.s IL_0047 + IL_0025: ldloc.1 + IL_0026: callvirt IEnumerator::MoveNext + IL_002b: brtrue.s IL_000a + IL_002d: leave.s IL_0044 + IL_002f: ldloc.1 + IL_0030: isinst IDisposable + IL_0035: stloc.s 5 + IL_0037: ldloc.s 5 + IL_0039: brfalse.s IL_0043 - IL_003f: ldloc.s 6 - IL_0041: callvirt IDisposable::Dispose - IL_0046: endfinally + IL_003b: ldloc.s 5 + IL_003d: callvirt IDisposable::Dispose + IL_0042: endfinally - IL_0047: endfinally + IL_0043: endfinally - IL_0048: ldloc.2 - IL_0049: pop - IL_004a: ldloca.s 0 - IL_004c: call Close - IL_0051: ret + IL_0044: ldloca.s 0 + IL_0046: call Close + IL_004b: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl index d0b94cae31a..fcffcee0bf0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl @@ -14,43 +14,39 @@ Module::f IL_0001: ldarg.0 IL_0002: callvirt GetEnumerator IL_0007: stloc.1 - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt get_Current - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s 0 - IL_0013: stloc.s 4 + IL_0013: stloc.3 (5,23-5,24) n - IL_0015: ldloc.s 4 - IL_0017: ldloc.3 - IL_0018: call Add - IL_001d: nop + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call Add + IL_001b: nop (5,15-5,17) in - IL_001e: ldloc.1 - IL_001f: callvirt IEnumerator::MoveNext - IL_0024: brtrue.s IL_000a - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f - IL_002a: ldloc.1 - IL_002b: isinst IDisposable - IL_0030: stloc.s 5 - IL_0032: ldloc.s 5 - IL_0034: brfalse.s IL_003e + IL_001c: ldloc.1 + IL_001d: callvirt IEnumerator::MoveNext + IL_0022: brtrue.s IL_000a + IL_0024: leave.s IL_003b + IL_0026: ldloc.1 + IL_0027: isinst IDisposable + IL_002c: stloc.s 4 + IL_002e: ldloc.s 4 + IL_0030: brfalse.s IL_003a - IL_0036: ldloc.s 5 - IL_0038: callvirt IDisposable::Dispose - IL_003d: endfinally + IL_0032: ldloc.s 4 + IL_0034: callvirt IDisposable::Dispose + IL_0039: endfinally - IL_003e: endfinally + IL_003a: endfinally - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s 0 - IL_0043: call Close - IL_0048: ret + IL_003b: ldloca.s 0 + IL_003d: call Close + IL_0042: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl index 3aba9f3f29c..901599dab10 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl @@ -15,43 +15,39 @@ Module::f IL_0001: ldarg.0 IL_0002: callvirt GetEnumerator IL_0007: stloc.1 - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt get_Current - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s 0 - IL_0013: stloc.s 4 + IL_0013: stloc.3 (6,13-6,20) yield n - IL_0015: ldloc.s 4 - IL_0017: ldloc.3 - IL_0018: call Add - IL_001d: nop + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call Add + IL_001b: nop (5,15-5,17) in - IL_001e: ldloc.1 - IL_001f: callvirt IEnumerator::MoveNext - IL_0024: brtrue.s IL_000a - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f - IL_002a: ldloc.1 - IL_002b: isinst IDisposable - IL_0030: stloc.s 5 - IL_0032: ldloc.s 5 - IL_0034: brfalse.s IL_003e + IL_001c: ldloc.1 + IL_001d: callvirt IEnumerator::MoveNext + IL_0022: brtrue.s IL_000a + IL_0024: leave.s IL_003b + IL_0026: ldloc.1 + IL_0027: isinst IDisposable + IL_002c: stloc.s 4 + IL_002e: ldloc.s 4 + IL_0030: brfalse.s IL_003a - IL_0036: ldloc.s 5 - IL_0038: callvirt IDisposable::Dispose - IL_003d: endfinally + IL_0032: ldloc.s 4 + IL_0034: callvirt IDisposable::Dispose + IL_0039: endfinally - IL_003e: endfinally + IL_003a: endfinally - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s 0 - IL_0043: call Close - IL_0048: ret + IL_003b: ldloca.s 0 + IL_003d: call Close + IL_0042: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl index 709b28fc197..ade255c211a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl @@ -15,47 +15,43 @@ Module::f IL_0001: ldarg.0 IL_0002: callvirt GetEnumerator IL_0007: stloc.1 - IL_0008: br.s IL_002b + IL_0008: br.s IL_002a IL_000a: ldloc.1 IL_000b: callvirt get_Current - IL_0010: stloc.3 - IL_0011: ldloc.3 + IL_0010: stloc.2 + IL_0011: ldloc.2 IL_0012: call get_Item2 - IL_0017: stloc.s 4 - IL_0019: ldloc.3 - IL_001a: call get_Item1 - IL_001f: stloc.s 5 + IL_0017: stloc.3 + IL_0018: ldloc.2 + IL_0019: call get_Item1 + IL_001e: stloc.s 4 (6,13-6,20) yield i - IL_0021: ldloca.s 0 - IL_0023: ldloc.s 5 - IL_0025: call Add - IL_002a: nop + IL_0020: ldloca.s 0 + IL_0022: ldloc.s 4 + IL_0024: call Add + IL_0029: nop (5,19-5,21) in - IL_002b: ldloc.1 - IL_002c: callvirt IEnumerator::MoveNext - IL_0031: brtrue.s IL_000a - IL_0033: ldnull - IL_0034: stloc.2 - IL_0035: leave.s IL_004c - IL_0037: ldloc.1 - IL_0038: isinst IDisposable - IL_003d: stloc.s 6 - IL_003f: ldloc.s 6 - IL_0041: brfalse.s IL_004b + IL_002a: ldloc.1 + IL_002b: callvirt IEnumerator::MoveNext + IL_0030: brtrue.s IL_000a + IL_0032: leave.s IL_0049 + IL_0034: ldloc.1 + IL_0035: isinst IDisposable + IL_003a: stloc.s 5 + IL_003c: ldloc.s 5 + IL_003e: brfalse.s IL_0048 - IL_0043: ldloc.s 6 - IL_0045: callvirt IDisposable::Dispose - IL_004a: endfinally + IL_0040: ldloc.s 5 + IL_0042: callvirt IDisposable::Dispose + IL_0047: endfinally - IL_004b: endfinally + IL_0048: endfinally - IL_004c: ldloc.2 - IL_004d: pop - IL_004e: ldloca.s 0 - IL_0050: call Close - IL_0055: ret + IL_0049: ldloca.s 0 + IL_004b: call Close + IL_0050: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl index 8a483c3b775..0cbbaa57092 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl @@ -15,43 +15,39 @@ Module::f IL_0001: ldarg.0 IL_0002: callvirt GetEnumerator IL_0007: stloc.1 - IL_0008: br.s IL_001e + IL_0008: br.s IL_001c IL_000a: ldloc.1 IL_000b: callvirt get_Current - IL_0010: stloc.3 + IL_0010: stloc.2 IL_0011: ldloca.s 0 - IL_0013: stloc.s 4 + IL_0013: stloc.3 (6,13-6,20) yield n - IL_0015: ldloc.s 4 - IL_0017: ldloc.3 - IL_0018: call Add - IL_001d: nop + IL_0014: ldloc.3 + IL_0015: ldloc.2 + IL_0016: call Add + IL_001b: nop (5,15-5,17) in - IL_001e: ldloc.1 - IL_001f: callvirt IEnumerator::MoveNext - IL_0024: brtrue.s IL_000a - IL_0026: ldnull - IL_0027: stloc.2 - IL_0028: leave.s IL_003f - IL_002a: ldloc.1 - IL_002b: isinst IDisposable - IL_0030: stloc.s 5 - IL_0032: ldloc.s 5 - IL_0034: brfalse.s IL_003e + IL_001c: ldloc.1 + IL_001d: callvirt IEnumerator::MoveNext + IL_0022: brtrue.s IL_000a + IL_0024: leave.s IL_003b + IL_0026: ldloc.1 + IL_0027: isinst IDisposable + IL_002c: stloc.s 4 + IL_002e: ldloc.s 4 + IL_0030: brfalse.s IL_003a - IL_0036: ldloc.s 5 - IL_0038: callvirt IDisposable::Dispose - IL_003d: endfinally + IL_0032: ldloc.s 4 + IL_0034: callvirt IDisposable::Dispose + IL_0039: endfinally - IL_003e: endfinally + IL_003a: endfinally - IL_003f: ldloc.2 - IL_0040: pop - IL_0041: ldloca.s 0 - IL_0043: call Close - IL_0048: ret + IL_003b: ldloca.s 0 + IL_003d: call Close + IL_0042: ret From 9e8690dceb1a400243bf4a51dc8358106dd45a67 Mon Sep 17 00:00:00 2001 From: Copilot Date: Thu, 6 Aug 2026 16:55:59 +0200 Subject: [PATCH 3/3] Add release note for issue #20203 struct seq InvalidProgramException fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/release-notes/.FSharp.Compiler.Service/11.0.100.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index cf072e1c0ce..6583e3174f9 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -129,6 +129,7 @@ * Fix dot-completion after indexed expressions (`a.[0].Data.`, `a[0].Data.`, `[1;2].Length.`) returning unrelated global completions instead of expression-typings members. ([Issue #4966](https://github.com/dotnet/fsharp/issues/4966), [PR #19934](https://github.com/dotnet/fsharp/pull/19934)) * Quotations of `match s with "" -> _` no longer leak the `s <> null && s.Length = 0` lowering; the empty-string optimization moved from pattern-match compilation to the optimizer so quoted expressions keep `op_Equality(s, "")`. ([Issue #19873](https://github.com/dotnet/fsharp/issues/19873)) * Fix #5795: Allow attributes defined in a `module rec` / `namespace rec` scope to be used on union cases, record fields, and generic type parameters of types in the same recursive scope. ([Issue #5795](https://github.com/dotnet/fsharp/issues/5795), [PR #19744](https://github.com/dotnet/fsharp/pull/19744)) +* Fix Release-only `System.InvalidProgramException` when a struct (value-type) collection implementing `seq<'T>` (e.g. `System.Collections.Immutable.ImmutableArray<_>`) is materialised via `Seq.collect`/`yield!` into `List.ofSeq`/`Seq.toList`/`Seq.toArray`. The comprehension lowering now coerces (boxes) the struct sub-collection to `seq<'T>` before `ListCollector`/`ArrayCollector.AddMany`, and uses `unit` as the try/finally result type, so it no longer emits invalid IL (a value type where a reference `IEnumerable` is expected, plus a spurious `ldnull` stored into a struct local). ([Issue #20203](https://github.com/dotnet/fsharp/issues/20203)) ### Added