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 ab65df29a6e..2ad0abee010 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -1,5 +1,6 @@ ### Fixed +* Fix Release-only (`--optimize+`) `System.InvalidProgramException` from `Seq.collect` / `yield!` over a value-type (struct) collection implementing `seq<'T>` (e.g. `ImmutableArray<_>`) when materialised with `List.ofSeq` / `Seq.toList` / `Seq.toArray` or a list/array comprehension. The collector lowering now boxes a struct sub-collection to `seq<'T>` before calling `AddMany`/`AddManyAndClose` (matching the coercion the type checker already inserts for `yield!`), and uses `unit` as the try/finally result type instead of the body type (removing a spurious `ldnull` store). ([Issue #20203](https://github.com/dotnet/fsharp/issues/20203)) * Fix incorrect `StructLayout(Size = 1)` emission for data-less struct unions where the compiler-generated tag field makes the actual runtime size larger. ([PR #19759](https://github.com/dotnet/fsharp/pull/19759)) * Fix FS0750 "This construct may only be used within computation expressions" incorrectly raised for `let!`/`use!`/`do!` appearing in the right-hand side of a plain `let` binding inside a computation expression. The right-hand side is now desugared as a nested computation of the same builder whose result is bound with `let!`, keeping its bindings correctly scoped. ([Issue #19457](https://github.com/dotnet/fsharp/issues/19457), [PR #19868](https://github.com/dotnet/fsharp/pull/19868)) * Stop leaking a `System.Diagnostics.Metrics.MeterListener` per `Cache` in DEBUG builds. Each cache created a `CacheMetrics.CacheMetricsListener` (which starts a `MeterListener` registered in the process-global metrics registry) and never disposed it, so listeners accumulated for the lifetime of the process. Because every cache hit/miss/add published to all registered listeners, the per-operation cost grew linearly with the number of leaked listeners, so repeated checks (and Debug FCS test runs) slowed down over time. The per-cache `CacheMetricsListener` and the per-instance `cacheId` tag are removed; `DebugDisplay` and tests now read the existing name-aggregated stats populated by the single `ListenToAll` listener, so no per-cache listener is created and no per-operation cost is added. ([PR #19995](https://github.com/dotnet/fsharp/pull/19995)) diff --git a/src/Compiler/Optimize/LowerComputedCollections.fs b/src/Compiler/Optimize/LowerComputedCollections.fs index 1dabf4fb142..0055e20cb9f 100644 --- a/src/Compiler/Optimize/LowerComputedCollections.fs +++ b/src/Compiler/Optimize/LowerComputedCollections.fs @@ -63,6 +63,8 @@ let mkCallCollectorClose tcVal (g: TcGlobals) infoReader m collExpr = let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = let infoReader = InfoReader(g, amap) let collVal, collExpr = mkMutableCompGenLocal m "@collector" collectorTy + // The seq<'T> element type that AddMany/AddManyAndClose expect for their argument. + let collectorSeqTy = mkSeqTy g (List.head (argsOfAppTy g collectorTy)) //let collExpr = mkValAddr m false (mkLocalValRef collVal) let rec ConvertSeqExprCode isUninteresting isTailcall expr = match expr with @@ -98,7 +100,9 @@ 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)) + // The lowered body is a unit-typed collector call, so the try/finally result type is unit, + // not the struct/ref body type (which would make the optimizer store a spurious default value). + (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,8 @@ 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)) + // Lowered body is unit-typed; the try/finally result type must be unit. + mFor, g.unit_ty, DebugPointAtTry.No, DebugPointAtFinally.No)) |> addForDebugPoint Result.Ok (false, exprR) | Result.Error msg -> Result.Error msg @@ -136,7 +141,8 @@ 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) + // Lowered body is unit-typed; the try/finally result type must be unit. + mkTryFinally g (bodyExprR, compensation, m, g.unit_ty, spTry, spFinally) Result.Ok (false, exprR) | Result.Error msg -> Result.Error msg @@ -201,6 +207,12 @@ 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 must be boxed to seq<'T> before being passed to AddMany/AddManyAndClose: + // BuildMethodCall does not coerce actuals, and struct->interface is not a free upcast (unlike ref subtypes). + 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/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/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOff.il.bsl index 3962c3165bb..6272be5cf8c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOff.il.bsl @@ -43,9 +43,8 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_3, - int32 V_4) + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_2, + int32 V_3) IL_0000: nop IL_0001: ldc.i4.0 IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) @@ -55,9 +54,9 @@ IL_0008: nop IL_0009: ldc.i4.0 IL_000a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_000f: stloc.3 - IL_0010: ldloc.3 - IL_0011: ldloc.3 + IL_000f: stloc.2 + IL_0010: ldloc.2 + IL_0011: ldloc.2 IL_0012: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() IL_0017: ldc.i4.1 IL_0018: add @@ -69,39 +68,35 @@ IL_002b: nop IL_002c: ldloc.1 IL_002d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0032: ldloc.3 + IL_0032: ldloc.2 IL_0033: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() IL_0038: add - IL_0039: stloc.s V_4 - IL_003b: ldloca.s V_0 - IL_003d: ldloc.s V_4 - IL_003f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0044: nop - IL_0045: ldnull - IL_0046: stloc.2 - IL_0047: leave.s IL_0069 + IL_0039: stloc.3 + IL_003a: ldloca.s V_0 + IL_003c: ldloc.3 + IL_003d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0042: nop + IL_0043: leave.s IL_0065 } finally { - IL_0049: nop - IL_004a: ldloc.1 - IL_004b: ldloc.1 - IL_004c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0051: ldc.i4.1 - IL_0052: add - IL_0053: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_0058: ldstr "done" - IL_005d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0062: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0067: pop - IL_0068: endfinally + IL_0045: nop + IL_0046: ldloc.1 + IL_0047: ldloc.1 + IL_0048: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_004d: ldc.i4.1 + IL_004e: add + IL_004f: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0054: ldstr "done" + IL_0059: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_005e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0063: pop + IL_0064: endfinally } - IL_0069: ldloc.2 - IL_006a: pop - IL_006b: ldloca.s V_0 - IL_006d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0072: ret + IL_0065: ldloca.s V_0 + IL_0067: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006c: ret } } @@ -131,3 +126,4 @@ + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOn.il.bsl index 727f8dd69b6..b68dc4669da 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOn.il.bsl @@ -43,9 +43,8 @@ .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_3, - int32 V_4) + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_2, + int32 V_3) IL_0000: nop IL_0001: ldc.i4.0 IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) @@ -55,9 +54,9 @@ IL_0008: nop IL_0009: ldc.i4.0 IL_000a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_000f: stloc.3 - IL_0010: ldloc.3 - IL_0011: ldloc.3 + IL_000f: stloc.2 + IL_0010: ldloc.2 + IL_0011: ldloc.2 IL_0012: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() IL_0017: ldc.i4.1 IL_0018: add @@ -69,39 +68,35 @@ IL_002b: nop IL_002c: ldloc.1 IL_002d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0032: ldloc.3 + IL_0032: ldloc.2 IL_0033: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() IL_0038: add - IL_0039: stloc.s V_4 - IL_003b: ldloca.s V_0 - IL_003d: ldloc.s V_4 - IL_003f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0044: nop - IL_0045: ldnull - IL_0046: stloc.2 - IL_0047: leave.s IL_0069 + IL_0039: stloc.3 + IL_003a: ldloca.s V_0 + IL_003c: ldloc.3 + IL_003d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0042: nop + IL_0043: leave.s IL_0065 } finally { - IL_0049: nop - IL_004a: ldloc.1 - IL_004b: ldloc.1 - IL_004c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0051: ldc.i4.1 - IL_0052: add - IL_0053: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_0058: ldstr "done" - IL_005d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0062: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0067: pop - IL_0068: endfinally + IL_0045: nop + IL_0046: ldloc.1 + IL_0047: ldloc.1 + IL_0048: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_004d: ldc.i4.1 + IL_004e: add + IL_004f: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0054: ldstr "done" + IL_0059: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_005e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0063: pop + IL_0064: endfinally } - IL_0069: ldloc.2 - IL_006a: pop - IL_006b: ldloca.s V_0 - IL_006d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0072: ret + IL_0065: ldloca.s V_0 + IL_0067: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006c: ret } .method private specialname rtspecialname static void .cctor() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOff.il.bsl index 9bec0718be2..4db56bf2771 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOff.il.bsl @@ -51,13 +51,11 @@ .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, - class [runtime]System.Collections.Generic.IEnumerator`1 V_5, - class [runtime]System.Collections.Generic.IEnumerable`1 V_6, - int32 V_7, - class [runtime]System.IDisposable V_8) + int32 V_2, + class [runtime]System.IDisposable V_3, + class [runtime]System.Collections.Generic.IEnumerator`1 V_4, + int32 V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: nop IL_0002: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() @@ -69,85 +67,77 @@ IL_000f: ldloc.1 IL_0010: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0015: stloc.3 + IL_0015: stloc.2 IL_0016: ldstr "hello" IL_001b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0020: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0025: pop IL_0026: ldloca.s V_0 - IL_0028: ldloc.3 + IL_0028: ldloc.2 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_000f - IL_0037: ldnull - IL_0038: stloc.2 - IL_0039: leave.s IL_0050 + IL_0037: leave.s IL_004b } finally { - IL_003b: ldloc.1 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_4 - IL_0043: ldloc.s V_4 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_4 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_0039: ldloc.1 + IL_003a: isinst [runtime]System.IDisposable + IL_003f: stloc.3 + IL_0040: ldloc.3 + IL_0041: brfalse.s IL_004a + + IL_0043: ldloc.3 + IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0049: endfinally + IL_004a: endfinally } - IL_0050: ldloc.2 - IL_0051: pop - IL_0052: nop - IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() - IL_0058: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_005d: stloc.s V_5 + IL_004b: nop + IL_004c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() + IL_0051: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0056: stloc.s V_4 .try { - IL_005f: br.s IL_0084 - - IL_0061: ldloc.s V_5 - IL_0063: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0068: stloc.s V_7 - IL_006a: ldstr "goodbye" - IL_006f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0074: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0079: pop - IL_007a: ldloca.s V_0 - IL_007c: ldloc.s V_7 - IL_007e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0083: nop - IL_0084: ldloc.s V_5 - IL_0086: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_008b: brtrue.s IL_0061 - - IL_008d: ldnull - IL_008e: stloc.s V_6 - IL_0090: leave.s IL_00a8 + IL_0058: br.s IL_007d + + IL_005a: ldloc.s V_4 + IL_005c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0061: stloc.s V_5 + IL_0063: ldstr "goodbye" + IL_0068: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_006d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0072: pop + IL_0073: ldloca.s V_0 + IL_0075: ldloc.s V_5 + IL_0077: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_007c: nop + IL_007d: ldloc.s V_4 + IL_007f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0084: brtrue.s IL_005a + + IL_0086: leave.s IL_009e } finally { - IL_0092: ldloc.s V_5 - IL_0094: isinst [runtime]System.IDisposable - IL_0099: stloc.s V_8 - IL_009b: ldloc.s V_8 - IL_009d: brfalse.s IL_00a7 - - IL_009f: ldloc.s V_8 - IL_00a1: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_00a6: endfinally - IL_00a7: endfinally + IL_0088: ldloc.s V_4 + IL_008a: isinst [runtime]System.IDisposable + IL_008f: stloc.s V_6 + IL_0091: ldloc.s V_6 + IL_0093: brfalse.s IL_009d + + IL_0095: ldloc.s V_6 + IL_0097: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_009c: endfinally + IL_009d: endfinally } - IL_00a8: ldloc.s V_6 - IL_00aa: pop - IL_00ab: ldloca.s V_0 - IL_00ad: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_00b2: ret + IL_009e: ldloca.s V_0 + IL_00a0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_00a5: ret } .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOn.il.bsl index bac169986c3..dfc26d40d0a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOn.il.bsl @@ -53,13 +53,11 @@ .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, - class [runtime]System.Collections.Generic.IEnumerator`1 V_5, - class [runtime]System.Collections.Generic.IEnumerable`1 V_6, - int32 V_7, - class [runtime]System.IDisposable V_8) + int32 V_2, + class [runtime]System.IDisposable V_3, + class [runtime]System.Collections.Generic.IEnumerator`1 V_4, + int32 V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: nop IL_0002: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() @@ -71,85 +69,77 @@ IL_000f: ldloc.1 IL_0010: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0015: stloc.3 + IL_0015: stloc.2 IL_0016: ldstr "hello" IL_001b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0020: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0025: pop IL_0026: ldloca.s V_0 - IL_0028: ldloc.3 + IL_0028: ldloc.2 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_000f - IL_0037: ldnull - IL_0038: stloc.2 - IL_0039: leave.s IL_0050 + IL_0037: leave.s IL_004b } finally { - IL_003b: ldloc.1 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_4 - IL_0043: ldloc.s V_4 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_4 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_0039: ldloc.1 + IL_003a: isinst [runtime]System.IDisposable + IL_003f: stloc.3 + IL_0040: ldloc.3 + IL_0041: brfalse.s IL_004a + + IL_0043: ldloc.3 + IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0049: endfinally + IL_004a: endfinally } - IL_0050: ldloc.2 - IL_0051: pop - IL_0052: nop - IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() - IL_0058: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_005d: stloc.s V_5 + IL_004b: nop + IL_004c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() + IL_0051: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0056: stloc.s V_4 .try { - IL_005f: br.s IL_0084 - - IL_0061: ldloc.s V_5 - IL_0063: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0068: stloc.s V_7 - IL_006a: ldstr "goodbye" - IL_006f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0074: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0079: pop - IL_007a: ldloca.s V_0 - IL_007c: ldloc.s V_7 - IL_007e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0083: nop - IL_0084: ldloc.s V_5 - IL_0086: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_008b: brtrue.s IL_0061 - - IL_008d: ldnull - IL_008e: stloc.s V_6 - IL_0090: leave.s IL_00a8 + IL_0058: br.s IL_007d + + IL_005a: ldloc.s V_4 + IL_005c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0061: stloc.s V_5 + IL_0063: ldstr "goodbye" + IL_0068: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_006d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0072: pop + IL_0073: ldloca.s V_0 + IL_0075: ldloc.s V_5 + IL_0077: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_007c: nop + IL_007d: ldloc.s V_4 + IL_007f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0084: brtrue.s IL_005a + + IL_0086: leave.s IL_009e } finally { - IL_0092: ldloc.s V_5 - IL_0094: isinst [runtime]System.IDisposable - IL_0099: stloc.s V_8 - IL_009b: ldloc.s V_8 - IL_009d: brfalse.s IL_00a7 - - IL_009f: ldloc.s V_8 - IL_00a1: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_00a6: endfinally - IL_00a7: endfinally + IL_0088: ldloc.s V_4 + IL_008a: isinst [runtime]System.IDisposable + IL_008f: stloc.s V_6 + IL_0091: ldloc.s V_6 + IL_0093: brfalse.s IL_009d + + IL_0095: ldloc.s V_6 + IL_0097: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_009c: endfinally + IL_009d: endfinally } - IL_00a8: ldloc.s V_6 - IL_00aa: pop - IL_00ab: ldloca.s V_0 - IL_00ad: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_00b2: ret + IL_009e: ldloca.s V_0 + IL_00a0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_00a5: ret } .method private specialname rtspecialname static void .cctor() cil managed 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 diff --git a/tests/FSharp.Compiler.ComponentTests/Language/RegressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/RegressionTests.fs index 3b7d1a2b3a5..c4467b02f80 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/RegressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/RegressionTests.fs @@ -82,3 +82,187 @@ dosmth x |> asLibrary |> typecheck |> shouldSucceed + + // https://github.com/dotnet/fsharp/issues/20203 + // Release-only System.InvalidProgramException from Seq.collect / yield! over a *struct* + // collection materialised with List.ofSeq / Seq.toList / Seq.toArray. + // Hermetic struct seq so the tests don't depend on System.Collections.Immutable. + let private structSeqPrelude = """ +open System.Collections +open System.Collections.Generic + +[] +type StructSeq(items: int[]) = + member _.Items = items + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = (items :> IEnumerable).GetEnumerator() + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = items.GetEnumerator() + +[] +type StructSeqG<'T>(items: 'T[]) = + interface IEnumerable<'T> with + member _.GetEnumerator() : IEnumerator<'T> = (items :> IEnumerable<'T>).GetEnumerator() + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = items.GetEnumerator() +""" + + let private runStruct (body: string) = + FSharp (structSeqPrelude + body) + |> withOptimize + |> compileExeAndRun + |> shouldSucceed + |> ignore + + // Primary: Seq.collect id over a struct seq, materialised three ways. + [] + [] + [] + [] + let ``20203 Seq.collect id over struct seq materialised`` (materializer: string) = + runStruct $""" +let xs = [ StructSeq [|1;2|] ] +let result = xs |> Seq.collect id |> {materializer} +if Seq.length result <> 2 then failwithf "expected length 2, got %%d" (Seq.length result) +if (result |> Seq.toList) <> [1;2] then failwithf "wrong contents: %%A" (result |> Seq.toList) +""" + + [] + let ``20203 yield! comprehension over struct seq (list) still works`` () = + runStruct """ +let xs = [ StructSeq [|1;2|] ] +let result = [ for a in xs do yield! a ] |> List.ofSeq +if result <> [1;2] then failwithf "wrong contents: %A" result +""" + + [] + let ``20203 yield! comprehension over struct seq (array) still works`` () = + runStruct """ +let xs = [ StructSeq [|1;2|] ] +let result = [| for a in xs do yield! a |] +if List.ofArray result <> [1;2] then failwithf "wrong contents: %A" result +""" + + [] + let ``20203 Seq.collect non-identity mapping over struct seq`` () = + runStruct """ +let xs = [ StructSeq [|1;2|] ] +let result = xs |> Seq.collect (fun s -> s) |> List.ofSeq +if result <> [1;2] then failwithf "wrong contents: %A" result +""" + + [] + let ``20203 multiple struct sub-collections preserve order`` () = + runStruct """ +let xs = [ StructSeq [|1;2|]; StructSeq [|3;4;5|] ] +let result = xs |> Seq.collect id |> List.ofSeq +if result <> [1;2;3;4;5] then failwithf "wrong contents: %A" result +""" + + [] + let ``20203 generic struct seq of reference element`` () = + runStruct """ +let xs = [ StructSeqG [|"a";"b"|] ] +let result = xs |> Seq.collect id |> List.ofSeq +if result <> ["a";"b"] then failwithf "wrong contents: %A" result +""" + + [] + let ``20203 generic struct seq of struct element (int64)`` () = + runStruct """ +let xs = [ StructSeqG [|1L;2L|] ] +let result = xs |> Seq.collect id |> List.ofSeq +if result <> [1L;2L] then failwithf "wrong contents: %A" result +""" + + [] + let ``20203 disposable enumerator path runs Dispose`` () = + runStruct """ +let mutable disposed = 0 + +type TrackingEnumerator(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() = + disposed <- disposed + 1 + inner.Dispose() + +[] +type DisposableStructSeq(items: int[]) = + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = new TrackingEnumerator(items) :> IEnumerator + interface IEnumerable with + member _.GetEnumerator() : IEnumerator = new TrackingEnumerator(items) :> IEnumerator + +let xs = [ DisposableStructSeq [|1;2;3|] ] +let result = xs |> Seq.collect id |> List.ofSeq +if result <> [1;2;3] then failwithf "wrong contents: %A" result +if disposed < 1 then failwith "Dispose was not called" +""" + + // Negatives / no-regression: reference inner collections must keep working. + [] + let ``20203 reference inner list still works`` () = + FSharp """ +module Test +let result = [ [1;2] ] |> Seq.collect id |> List.ofSeq +if result <> [1;2] then failwithf "wrong contents: %A" result +""" + |> withOptimize + |> compileExeAndRun + |> shouldSucceed + |> ignore + + [] + let ``20203 reference inner ResizeArray still works`` () = + FSharp """ +module Test +let result = [ System.Collections.Generic.List([1;2]) ] |> Seq.collect id |> List.ofSeq +if result <> [1;2] then failwithf "wrong contents: %A" result +""" + |> withOptimize + |> compileExeAndRun + |> shouldSucceed + |> ignore + + [] + let ``20203 Array.ofSeq path over struct seq still works`` () = + runStruct """ +let xs = [ StructSeq [|1;2|] ] +let result = xs |> Seq.collect id |> Array.ofSeq +if List.ofArray result <> [1;2] then failwithf "wrong contents: %A" result +""" + + [] + let ``20203 Seq.map (no collect) over struct seq still works`` () = + runStruct """ +let xs = [ StructSeq [|1;2|] ] +let result = xs |> Seq.map id |> List.ofSeq +if List.length result <> 1 then failwithf "expected 1 struct, got %d" (List.length result) +""" + + [] + let ``20203 empty outer and empty struct sub-collection`` () = + runStruct """ +let empty1 : StructSeq list = [] +if (empty1 |> Seq.collect id |> List.ofSeq) <> [] then failwith "empty outer failed" +let xs = [ StructSeq [||] ] +if (xs |> Seq.collect id |> List.ofSeq) <> [] then failwith "empty sub-collection failed" +""" + + [] + let ``20203 boundary single and large struct sub-collections`` () = + runStruct """ +let single = [ StructSeq [|42|] ] |> Seq.collect id |> List.ofSeq +if single <> [42] then failwithf "single failed: %A" single +let big = [| 1 .. 1000 |] +let large = [ StructSeq big ] |> Seq.collect id |> List.ofSeq +if List.length large <> 1000 then failwithf "expected 1000, got %d" (List.length large) +if large.Head <> 1 || (List.last large) <> 1000 then failwith "large order wrong" +""" diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs index 52be7c610ce..f32e0308cb2 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs @@ -154,9 +154,8 @@ let ListExpressionSteppingTest4 () = .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_3, - int32 V_4) + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_2, + int32 V_3) IL_0000: nop IL_0001: ldc.i4.0 IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) @@ -166,8 +165,8 @@ let ListExpressionSteppingTest4 () = IL_0008: nop IL_0009: ldc.i4.0 IL_000a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_000f: stloc.3 - IL_0010: ldloc.3 + IL_000f: stloc.2 + IL_0010: ldloc.2 IL_0011: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_0016: nop IL_0017: ldloca.s V_0 @@ -177,36 +176,32 @@ let ListExpressionSteppingTest4 () = IL_0024: nop IL_0025: ldloc.1 IL_0026: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_002b: ldloc.3 + IL_002b: ldloc.2 IL_002c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_0031: add - IL_0032: stloc.s V_4 - IL_0034: ldloca.s V_0 - IL_0036: ldloc.s V_4 - IL_0038: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_003d: nop - IL_003e: ldnull - IL_003f: stloc.2 - IL_0040: leave.s IL_005b + IL_0032: stloc.3 + IL_0033: ldloca.s V_0 + IL_0035: ldloc.3 + IL_0036: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003b: nop + IL_003c: leave.s IL_0057 } finally { - IL_0042: nop - IL_0043: ldloc.1 - IL_0044: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0049: nop - IL_004a: ldstr "done" - IL_004f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0054: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0059: pop - IL_005a: endfinally + IL_003e: nop + IL_003f: ldloc.1 + IL_0040: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0045: nop + IL_0046: ldstr "done" + IL_004b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0050: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0055: pop + IL_0056: endfinally } - IL_005b: ldloc.2 - IL_005c: pop - IL_005d: ldloca.s V_0 - IL_005f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0064: ret + IL_0057: ldloca.s V_0 + IL_0059: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005e: ret } """ @@ -308,9 +303,8 @@ let ListExpressionSteppingTest6 () = .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 @@ -326,9 +320,9 @@ let ListExpressionSteppingTest6 () = IL_0011: ldloc.1 IL_0012: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0017: stloc.3 + IL_0017: stloc.2 IL_0018: nop - IL_0019: ldloc.3 + IL_0019: ldloc.2 IL_001a: ldc.i4.1 IL_001b: sub IL_001c: switch ( @@ -341,7 +335,7 @@ let ListExpressionSteppingTest6 () = IL_0035: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_003a: pop IL_003b: ldloca.s V_0 - IL_003d: ldloc.3 + IL_003d: ldloc.2 IL_003e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0043: nop IL_0044: nop @@ -352,14 +346,14 @@ let ListExpressionSteppingTest6 () = IL_0051: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0056: pop IL_0057: ldloca.s V_0 - IL_0059: ldloc.3 + IL_0059: ldloc.2 IL_005a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_005f: nop IL_0060: nop IL_0061: br.s IL_006d IL_0063: ldloca.s V_0 - IL_0065: ldloc.3 + IL_0065: ldloc.2 IL_0066: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_006b: nop IL_006c: nop @@ -367,29 +361,25 @@ let ListExpressionSteppingTest6 () = IL_006e: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() IL_0073: brtrue.s IL_0011 - IL_0075: ldnull - IL_0076: stloc.2 - IL_0077: leave.s IL_008e + IL_0075: leave.s IL_0089 } finally { - IL_0079: ldloc.1 - IL_007a: isinst [runtime]System.IDisposable - IL_007f: stloc.s V_4 - IL_0081: ldloc.s V_4 - IL_0083: brfalse.s IL_008d + IL_0077: ldloc.1 + IL_0078: isinst [runtime]System.IDisposable + IL_007d: stloc.3 + IL_007e: ldloc.3 + IL_007f: brfalse.s IL_0088 - IL_0085: ldloc.s V_4 - IL_0087: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_008c: endfinally - IL_008d: endfinally + IL_0081: ldloc.3 + IL_0082: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0087: endfinally + IL_0088: endfinally } - IL_008e: ldloc.2 - IL_008f: pop - IL_0090: ldloca.s V_0 - IL_0092: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0097: ret + IL_0089: ldloca.s V_0 + IL_008b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0090: ret } """ ]))