From 91d5a0a454f35c15d229c48b1830dd57888e8e03 Mon Sep 17 00:00:00 2001 From: Brian Rourke Boll Date: Fri, 13 Sep 2024 05:04:28 -0400 Subject: [PATCH] Simple mapping optimization fixes (#17711) --- .../.FSharp.Compiler.Service/9.0.100.md | 1 + .../Optimize/LowerComputedCollections.fs | 113 +- .../ForXInArray_ToArray.fs | 14 + .../ForXInArray_ToArray.fs.il.bsl | 2104 +++++++++++------ .../ComputedCollections/ForXInList_ToList.fs | 14 + .../ForXInList_ToList.fs.il.bsl | 626 ++++- 6 files changed, 2104 insertions(+), 768 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md index 24ce8c5a07b..d8658f4ce49 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md @@ -18,6 +18,7 @@ * Fix IsUnionCaseTester throwing for non-methods/properties [#17301](https://github.com/dotnet/fsharp/pull/17634) * Consider `open type` used when the type is an enum and any of the enum cases is used unqualified. ([PR #17628](https://github.com/dotnet/fsharp/pull/17628)) * Guard for possible StackOverflowException when typechecking non recursive modules and namespaces ([PR #17654](https://github.com/dotnet/fsharp/pull/17654)) +* Fixes for the optimization of simple mappings in array and list comprehensions. ([Issue #17708](https://github.com/dotnet/fsharp/issues/17708), [PR #17711](https://github.com/dotnet/fsharp/pull/17711)) ### Added diff --git a/src/Compiler/Optimize/LowerComputedCollections.fs b/src/Compiler/Optimize/LowerComputedCollections.fs index 98b01086cc6..98101af36fe 100644 --- a/src/Compiler/Optimize/LowerComputedCollections.fs +++ b/src/Compiler/Optimize/LowerComputedCollections.fs @@ -373,60 +373,70 @@ module Array = else any ilTy /// Makes the equivalent of an inlined call to Array.map. - let mkMap g m (mBody, _spFor, _spIn, mFor, mIn, spInWhile) srcArray srcIlTy destIlTy overallElemTy loopVal body = - let len = mkLdlen g mIn srcArray - let arrayTy = mkArrayType g overallElemTy - - /// (# "newarr !0" type ('T) count : 'T array #) - let array = - mkAsmExpr - ( - [I_newarr (ILArrayShape.SingleDimensional, destIlTy)], - [], - [len], - [arrayTy], - m - ) - - let ldelem = mkIlInstr g I_ldelem (fun ilTy -> I_ldelem_any (ILArrayShape.SingleDimensional, ilTy)) srcIlTy - let stelem = mkIlInstr g I_stelem (fun ilTy -> I_stelem_any (ILArrayShape.SingleDimensional, ilTy)) destIlTy - - let mapping = - mkCompGenLetIn m (nameof array) arrayTy array (fun (_, array) -> - mkCompGenLetMutableIn mFor "i" g.int32_ty (mkTypedZero g mIn g.int32_ty) (fun (iVal, i) -> - let body = - // Rebind the loop val to pull directly from the source array. - let body = mkInvisibleLet mBody loopVal (mkAsmExpr ([ldelem], [], [srcArray; i], [loopVal.val_type], mBody)) body - - // destArray[i] <- body srcArray[i] - let setArrSubI = mkAsmExpr ([stelem], [], [array; i; body], [], mIn) - - // i <- i + 1 - let incrI = mkValSet mIn (mkLocalValRef iVal) (mkAsmExpr ([AI_add], [], [i; mkTypedOne g mIn g.int32_ty], [g.int32_ty], mIn)) - - mkSequential mIn setArrSubI incrI - - let guard = mkILAsmClt g mFor i (mkLdlen g mFor array) + let mkMap g m (mBody, _spFor, _spIn, mFor, mIn, spInWhile) srcArray srcIlTy destIlTy overallElemTy (loopVal: Val) body = + mkCompGenLetIn m (nameof srcArray) (tyOfExpr g srcArray) srcArray (fun (_, srcArray) -> + let len = mkLdlen g mIn srcArray + let arrayTy = mkArrayType g overallElemTy + + /// (# "newarr !0" type ('T) count : 'T array #) + let array = + mkAsmExpr + ( + [I_newarr (ILArrayShape.SingleDimensional, destIlTy)], + [], + [len], + [arrayTy], + m + ) - let loop = - mkWhile - g - ( - spInWhile, - NoSpecialWhileLoopMarker, - guard, - body, - mIn - ) + let ldelem = mkIlInstr g I_ldelem (fun ilTy -> I_ldelem_any (ILArrayShape.SingleDimensional, ilTy)) srcIlTy + let stelem = mkIlInstr g I_stelem (fun ilTy -> I_stelem_any (ILArrayShape.SingleDimensional, ilTy)) destIlTy - // while i < array.Length do done - // array - mkSequential m loop array + let mapping = + mkCompGenLetIn m (nameof array) arrayTy array (fun (_, array) -> + mkCompGenLetMutableIn mFor "i" g.int32_ty (mkTypedZero g mIn g.int32_ty) (fun (iVal, i) -> + let body = + // If the loop val is used in the loop body, + // rebind it to pull directly from the source array. + // Otherwise, don't bother reading from the source array at all. + let body = + let freeLocals = (freeInExpr CollectLocals body).FreeLocals + + if freeLocals.Contains loopVal then + mkInvisibleLet mBody loopVal (mkAsmExpr ([ldelem], [], [srcArray; i], [loopVal.val_type], mBody)) body + else + body + + // destArray[i] <- body srcArray[i] + let setArrSubI = mkAsmExpr ([stelem], [], [array; i; body], [], mIn) + + // i <- i + 1 + let incrI = mkValSet mIn (mkLocalValRef iVal) (mkAsmExpr ([AI_add], [], [i; mkTypedOne g mIn g.int32_ty], [g.int32_ty], mIn)) + + mkSequential mIn setArrSubI incrI + + let guard = mkILAsmClt g mFor i (mkLdlen g mFor array) + + let loop = + mkWhile + g + ( + spInWhile, + NoSpecialWhileLoopMarker, + guard, + body, + mIn + ) + + // while i < array.Length do done + // array + mkSequential m loop array + ) ) - ) - // Add a debug point at the `for`, before anything gets evaluated. - Expr.DebugPoint (DebugPointAtLeafExpr.Yes mFor, mapping) + // Add a debug point at the `for`, before anything gets evaluated. + Expr.DebugPoint (DebugPointAtLeafExpr.Yes mFor, mapping) + ) /// Whether to check for overflow when converting a value to a native int. [] @@ -558,6 +568,9 @@ let (|SingleYield|_|) g expr : Expr voption = | Expr.Sequential (expr1, DebugPoints (body, debug), kind, m) -> loop body (cont << fun body -> Expr.Sequential (expr1, debug body, kind, m)) + | Expr.Match (debugPoint, mInput, decision, [|TTarget (boundVals, DebugPoints (SeqSingleton g body, debug), isStateVarFlags)|], mFull, exprType) -> + ValueSome (cont (Expr.Match (debugPoint, mInput, decision, [|TTarget (boundVals, debug body, isStateVarFlags)|], mFull, exprType))) + | SeqSingleton g body -> ValueSome (cont body) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs index 6b074654e45..1f55bc40d91 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs @@ -21,3 +21,17 @@ let f8 f g (array: int array) = [|let y = f () in let z = g () in for x in array let f9 f g (array: int array) = [|let y = f () in g (); for x in array -> x + y|] let f10 f g (array: int array) = [|f (); g (); for x in array -> x|] let f11 f g (array: int array) = [|f (); let y = g () in for x in array -> x + y|] +let f12 (f: unit -> int array) y = [|for x in f () -> x + y|] + +// https://github.com/dotnet/fsharp/issues/17708 +// Don't read or rebind the loop variable when it is not in scope in the body. +let ``for _ in Array.groupBy id [||] do ...`` () = [|for _ in Array.groupBy id [||] do 0|] +let ``for _ | _ in Array.groupBy id [||] do ...`` () = [|for _ | _ in Array.groupBy id [||] do 0|] +let ``for _ & _ in Array.groupBy id [||] do ...`` () = [|for _ & _ in Array.groupBy id [||] do 0|] +let ``for _, _group in Array.groupBy id [||] do ...`` () = [|for _, _group in Array.groupBy id [||] do 0|] +let ``for _, group in Array.groupBy id [||] do ...`` () = [|for _, group in Array.groupBy id [||] do group.Length|] +let ``for 1 | 2 | _ in ...`` () = [|for 1 | 2 | _ in [||] do 0|] +let ``for Failure _ | _ in ...`` () = [|for Failure _ | _ in [||] do 0|] +let ``for true | false in ...`` () = [|for true | false in [||] do 0|] +let ``for true | _ in ...`` () = [|for true | _ in [||] do 0|] +let ``for _ | true in ...`` () = [|for _ | true in [||] do 0|] 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 4839243ebdb..2e1eeb67e45 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 @@ -43,164 +43,342 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .method public static int32[] f0(int32[] 'array') cil managed + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ in Array-groupBy id -||- do ---@28' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - - .maxstack 6 - .locals init (int32[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_001a - - IL_000e: ldloc.0 - IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: stelem.i4 - IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: add - IL_0019: stloc.1 - IL_001a: ldloc.1 - IL_001b: ldloc.0 - IL_001c: ldlen - IL_001d: conv.i4 - IL_001e: blt.s IL_000e - - IL_0020: ldloc.0 - IL_0021: ret + .field static assembly initonly class assembly/'for _ in Array-groupBy id -||- do ---@28' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance object Invoke(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _ in Array-groupBy id -||- do ---@28'::.ctor() + IL_0005: stsfld class assembly/'for _ in Array-groupBy id -||- do ---@28' assembly/'for _ in Array-groupBy id -||- do ---@28'::@_instance + IL_000a: ret + } + } - .method public static int32[] f00(int32[] 'array') cil managed + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ | _ in Array-groupBy id -||- do ---@29' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - - .maxstack 6 - .locals init (int32[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_001a - - IL_000e: ldloc.0 - IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: stelem.i4 - IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: add - IL_0019: stloc.1 - IL_001a: ldloc.1 - IL_001b: ldloc.0 - IL_001c: ldlen - IL_001d: conv.i4 - IL_001e: blt.s IL_000e - - IL_0020: ldloc.0 - IL_0021: ret + .field static assembly initonly class assembly/'for _ | _ in Array-groupBy id -||- do ---@29' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance object Invoke(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _ | _ in Array-groupBy id -||- do ---@29'::.ctor() + IL_0005: stsfld class assembly/'for _ | _ in Array-groupBy id -||- do ---@29' assembly/'for _ | _ in Array-groupBy id -||- do ---@29'::@_instance + IL_000a: ret + } + } - .method public static int32[] f000(int32[] 'array') cil managed + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ - _ in Array-groupBy id -||- do ---@30' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _ - _ in Array-groupBy id -||- do ---@30' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance object Invoke(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _ - _ in Array-groupBy id -||- do ---@30'::.ctor() + IL_0005: stsfld class assembly/'for _ - _ in Array-groupBy id -||- do ---@30' assembly/'for _ - _ in Array-groupBy id -||- do ---@30'::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, _group in Array-groupBy id -||- do ---@31' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _, _group in Array-groupBy id -||- do ---@31' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance object Invoke(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _, _group in Array-groupBy id -||- do ---@31'::.ctor() + IL_0005: stsfld class assembly/'for _, _group in Array-groupBy id -||- do ---@31' assembly/'for _, _group in Array-groupBy id -||- do ---@31'::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, group in Array-groupBy id -||- do ---@32' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _, group in Array-groupBy id -||- do ---@32' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance object Invoke(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _, group in Array-groupBy id -||- do ---@32'::.ctor() + IL_0005: stsfld class assembly/'for _, group in Array-groupBy id -||- do ---@32' assembly/'for _, group in Array-groupBy id -||- do ---@32'::@_instance + IL_000a: ret + } + + } + + .method public static int32[] f0(int32[] 'array') cil managed { .maxstack 6 .locals init (int32[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_001b - - IL_000e: ldloc.0 + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: nop - IL_0015: ldloc.2 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: ldloc.3 IL_0016: stelem.i4 - IL_0017: ldloc.1 + IL_0017: ldloc.2 IL_0018: ldc.i4.1 IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldloc.0 + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 IL_001d: ldlen IL_001e: conv.i4 - IL_001f: blt.s IL_000e + IL_001f: blt.s IL_000f - IL_0021: ldloc.0 + IL_0021: ldloc.1 IL_0022: ret } - .method public static int32[] f0000(int32[] 'array') cil managed + .method public static int32[] f00(int32[] 'array') cil managed { .maxstack 6 .locals init (int32[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_001b - - IL_000e: ldloc.0 + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: nop - IL_0015: ldloc.2 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: ldloc.3 IL_0016: stelem.i4 - IL_0017: ldloc.1 + IL_0017: ldloc.2 IL_0018: ldc.i4.1 IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldloc.0 + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 IL_001d: ldlen IL_001e: conv.i4 - IL_001f: blt.s IL_000e + IL_001f: blt.s IL_000f - IL_0021: ldloc.0 + IL_0021: ldloc.1 IL_0022: ret } + .method public static int32[] f000(int32[] 'array') cil managed + { + + .maxstack 6 + .locals init (int32[] V_0, + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001c + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: nop + IL_0016: ldloc.3 + IL_0017: stelem.i4 + IL_0018: ldloc.2 + IL_0019: ldc.i4.1 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: ldlen + IL_001f: conv.i4 + IL_0020: blt.s IL_000f + + IL_0022: ldloc.1 + IL_0023: ret + } + + .method public static int32[] f0000(int32[] 'array') cil managed + { + + .maxstack 6 + .locals init (int32[] V_0, + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001c + + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: nop + IL_0016: ldloc.3 + IL_0017: stelem.i4 + IL_0018: ldloc.2 + IL_0019: ldc.i4.1 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.2 + IL_001d: ldloc.1 + IL_001e: ldlen + IL_001f: conv.i4 + IL_0020: blt.s IL_000f + + IL_0022: ldloc.1 + IL_0023: ret + } + .method public static int32[] f00000(int32[] 'array', int32 x, int32 y) cil managed @@ -210,52 +388,54 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, + int32[] V_1, int32 V_2, int32 V_3, - int32 V_4) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0028 - - IL_000e: ldloc.0 + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_002b + IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: ldarg.1 - IL_0016: add - IL_0017: stloc.3 - IL_0018: ldloc.2 - IL_0019: ldarg.2 - IL_001a: add - IL_001b: stloc.s V_4 - IL_001d: ldloc.2 - IL_001e: ldloc.3 - IL_001f: add + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: ldarg.1 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloc.3 + IL_001b: ldarg.2 + IL_001c: add + IL_001d: stloc.s V_5 + IL_001f: ldloc.3 IL_0020: ldloc.s V_4 IL_0022: add - IL_0023: stelem.i4 - IL_0024: ldloc.1 - IL_0025: ldc.i4.1 - IL_0026: add - IL_0027: stloc.1 - IL_0028: ldloc.1 - IL_0029: ldloc.0 - IL_002a: ldlen - IL_002b: conv.i4 - IL_002c: blt.s IL_000e + IL_0023: ldloc.s V_5 + IL_0025: add + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_000f - IL_002e: ldloc.0 - IL_002f: ret + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] f000000(int32[] 'array', @@ -267,52 +447,54 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, + int32[] V_1, int32 V_2, int32 V_3, - int32 V_4) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0028 - - IL_000e: ldloc.0 + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_002b + IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: ldarg.1 - IL_0016: add - IL_0017: stloc.3 - IL_0018: ldloc.2 - IL_0019: ldarg.2 - IL_001a: add - IL_001b: stloc.s V_4 - IL_001d: ldloc.2 - IL_001e: ldloc.3 - IL_001f: add + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: ldarg.1 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloc.3 + IL_001b: ldarg.2 + IL_001c: add + IL_001d: stloc.s V_5 + IL_001f: ldloc.3 IL_0020: ldloc.s V_4 IL_0022: add - IL_0023: stelem.i4 - IL_0024: ldloc.1 - IL_0025: ldc.i4.1 - IL_0026: add - IL_0027: stloc.1 - IL_0028: ldloc.1 - IL_0029: ldloc.0 - IL_002a: ldlen - IL_002b: conv.i4 - IL_002c: blt.s IL_000e + IL_0023: ldloc.s V_5 + IL_0025: add + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_000f - IL_002e: ldloc.0 - IL_002f: ret + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] f0000000(int32[] 'array', @@ -325,56 +507,58 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, + int32[] V_1, int32 V_2, int32 V_3, - int32 V_4) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0030 - - IL_000e: ldloc.0 + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0033 + IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldarg.1 - IL_0015: ldnull - IL_0016: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001b: pop - IL_001c: ldloc.2 - IL_001d: ldarg.2 - IL_001e: add - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldarg.3 - IL_0022: add - IL_0023: stloc.s V_4 - IL_0025: ldloc.2 - IL_0026: ldloc.3 - IL_0027: add + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + 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.3 + IL_001e: ldarg.2 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: ldloc.3 + IL_0023: ldarg.3 + IL_0024: add + IL_0025: stloc.s V_5 + IL_0027: ldloc.3 IL_0028: ldloc.s V_4 IL_002a: add - IL_002b: stelem.i4 - IL_002c: ldloc.1 - IL_002d: ldc.i4.1 - IL_002e: add - IL_002f: stloc.1 - IL_0030: ldloc.1 - IL_0031: ldloc.0 - IL_0032: ldlen - IL_0033: conv.i4 - IL_0034: blt.s IL_000e - - IL_0036: ldloc.0 - IL_0037: ret + IL_002b: ldloc.s V_5 + IL_002d: add + IL_002e: stelem.i4 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: add + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: ldlen + IL_0036: conv.i4 + IL_0037: blt.s IL_000f + + IL_0039: ldloc.1 + IL_003a: ret } .method public static int32[] f00000000(int32[] 'array', @@ -387,56 +571,58 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, + int32[] V_1, int32 V_2, int32 V_3, - int32 V_4) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0030 - - IL_000e: ldloc.0 + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0033 + IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: ldarg.2 - IL_0016: add - IL_0017: stloc.3 - IL_0018: ldarg.1 - IL_0019: ldnull - IL_001a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001f: pop - IL_0020: ldloc.2 - IL_0021: ldarg.3 - IL_0022: add - IL_0023: stloc.s V_4 - IL_0025: ldloc.2 - IL_0026: ldloc.3 - IL_0027: add + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: ldarg.2 + 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: ldloc.3 + IL_0023: ldarg.3 + IL_0024: add + IL_0025: stloc.s V_5 + IL_0027: ldloc.3 IL_0028: ldloc.s V_4 IL_002a: add - IL_002b: stelem.i4 - IL_002c: ldloc.1 - IL_002d: ldc.i4.1 - IL_002e: add - IL_002f: stloc.1 - IL_0030: ldloc.1 - IL_0031: ldloc.0 - IL_0032: ldlen - IL_0033: conv.i4 - IL_0034: blt.s IL_000e - - IL_0036: ldloc.0 - IL_0037: ret + IL_002b: ldloc.s V_5 + IL_002d: add + IL_002e: stelem.i4 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: add + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: ldlen + IL_0036: conv.i4 + IL_0037: blt.s IL_000f + + IL_0039: ldloc.1 + IL_003a: ret } .method public static int32[] f000000000(int32[] 'array', @@ -449,56 +635,58 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, + int32[] V_1, int32 V_2, int32 V_3, - int32 V_4) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0030 - - IL_000e: ldloc.0 + int32 V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0033 + IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: ldarg.2 - IL_0016: add - IL_0017: stloc.3 - IL_0018: ldloc.2 - IL_0019: ldarg.3 - IL_001a: add - IL_001b: stloc.s V_4 - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: pop - IL_0025: ldloc.2 - IL_0026: ldloc.3 - IL_0027: add + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: ldarg.2 + IL_0017: add + IL_0018: stloc.s V_4 + IL_001a: ldloc.3 + IL_001b: ldarg.3 + IL_001c: add + IL_001d: stloc.s V_5 + IL_001f: ldarg.1 + IL_0020: ldnull + IL_0021: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0026: pop + IL_0027: ldloc.3 IL_0028: ldloc.s V_4 IL_002a: add - IL_002b: stelem.i4 - IL_002c: ldloc.1 - IL_002d: ldc.i4.1 - IL_002e: add - IL_002f: stloc.1 - IL_0030: ldloc.1 - IL_0031: ldloc.0 - IL_0032: ldlen - IL_0033: conv.i4 - IL_0034: blt.s IL_000e - - IL_0036: ldloc.0 - IL_0037: ret + IL_002b: ldloc.s V_5 + IL_002d: add + IL_002e: stelem.i4 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: add + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: ldlen + IL_0036: conv.i4 + IL_0037: blt.s IL_000f + + IL_0039: ldloc.1 + IL_003a: ret } .method public static int32[] f0000000000(int32[] 'array', @@ -584,38 +772,40 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_001a - - IL_000e: ldloc.0 + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: stelem.i4 - IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: add - IL_0019: stloc.1 - IL_001a: ldloc.1 - IL_001b: ldloc.0 - IL_001c: ldlen - IL_001d: conv.i4 - IL_001e: blt.s IL_000e - - IL_0020: ldloc.0 - IL_0021: ret + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i4 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret } .method public static !!a[] f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -624,41 +814,43 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (!!a[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr !!a - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0024 - - IL_000e: ldloc.0 + .locals init (int32[] V_0, + !!a[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr !!a + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0025 + IL_000f: ldloc.1 - IL_0010: ldarg.1 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldloc.2 - IL_0016: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001b: stelem !!a - IL_0020: ldloc.1 - IL_0021: ldc.i4.1 - IL_0022: add - IL_0023: stloc.1 - IL_0024: ldloc.1 - IL_0025: ldloc.0 - IL_0026: ldlen - IL_0027: conv.i4 - IL_0028: blt.s IL_000e + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: ldarg.0 + IL_0016: ldloc.3 + IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001c: stelem !!a + IL_0021: ldloc.2 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: stloc.2 + IL_0025: ldloc.2 + IL_0026: ldloc.1 + IL_0027: ldlen + IL_0028: conv.i4 + IL_0029: blt.s IL_000f - IL_002a: ldloc.0 - IL_002b: ret + IL_002b: ldloc.1 + IL_002c: ret } .method public static int32[] f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -668,42 +860,44 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0022 - - IL_000e: ldloc.0 + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0023 + IL_000f: ldloc.1 - IL_0010: ldarg.1 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldnull - IL_0016: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001b: pop - IL_001c: ldloc.2 - IL_001d: stelem.i4 - IL_001e: ldloc.1 - IL_001f: ldc.i4.1 - IL_0020: add - IL_0021: stloc.1 - IL_0022: ldloc.1 - IL_0023: ldloc.0 - IL_0024: ldlen - IL_0025: conv.i4 - IL_0026: blt.s IL_000e + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.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: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0028: ldloc.0 - IL_0029: ret + IL_0029: ldloc.1 + IL_002a: ret } .method public static int32[] f4(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -715,46 +909,48 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.2 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_002a - - IL_000e: ldloc.0 + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.2 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_002b + IL_000f: ldloc.1 - IL_0010: ldarg.2 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldnull - IL_0016: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001b: pop - IL_001c: ldarg.1 - IL_001d: ldnull - IL_001e: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0023: pop - IL_0024: ldloc.2 - IL_0025: stelem.i4 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: add - IL_0029: stloc.1 - IL_002a: ldloc.1 - IL_002b: ldloc.0 - IL_002c: ldlen - IL_002d: conv.i4 - IL_002e: blt.s IL_000e - - IL_0030: ldloc.0 - IL_0031: ret + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.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: ldarg.1 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: pop + IL_0025: ldloc.3 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_000f + + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] f5(int32[] 'array') cil managed @@ -762,38 +958,40 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_001a - - IL_000e: ldloc.0 + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_001b + IL_000f: ldloc.1 - IL_0010: ldarg.0 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: stelem.i4 - IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: add - IL_0019: stloc.1 - IL_001a: ldloc.1 - IL_001b: ldloc.0 - IL_001c: ldlen - IL_001d: conv.i4 - IL_001e: blt.s IL_000e - - IL_0020: ldloc.0 - IL_0021: ret + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: stelem.i4 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_000f + + IL_0021: ldloc.1 + IL_0022: ret } .method public static int32[] f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -803,42 +1001,44 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0022 - - IL_000e: ldloc.0 + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0023 + IL_000f: ldloc.1 - IL_0010: ldarg.1 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldnull - IL_0016: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001b: pop - IL_001c: ldloc.2 - IL_001d: stelem.i4 - IL_001e: ldloc.1 - IL_001f: ldc.i4.1 - IL_0020: add - IL_0021: stloc.1 - IL_0022: ldloc.1 - IL_0023: ldloc.0 - IL_0024: ldlen - IL_0025: conv.i4 - IL_0026: blt.s IL_000e + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.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: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0028: ldloc.0 - IL_0029: ret + IL_0029: ldloc.1 + IL_002a: ret } .method public static int32[] f7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -850,46 +1050,48 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldarg.2 - IL_0002: ldlen - IL_0003: conv.i4 - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_002a - - IL_000e: ldloc.0 + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.2 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_002b + IL_000f: ldloc.1 - IL_0010: ldarg.2 - IL_0011: ldloc.1 - IL_0012: ldelem.i4 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldnull - IL_0016: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001b: pop - IL_001c: ldarg.1 - IL_001d: ldnull - IL_001e: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0023: pop - IL_0024: ldloc.2 - IL_0025: stelem.i4 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: add - IL_0029: stloc.1 - IL_002a: ldloc.1 - IL_002b: ldloc.0 - IL_002c: ldlen - IL_002d: conv.i4 - IL_002e: blt.s IL_000e - - IL_0030: ldloc.0 - IL_0031: ret + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.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: ldarg.1 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: pop + IL_0025: ldloc.3 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_000f + + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] f8(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -903,8 +1105,9 @@ .locals init (int32 V_0, int32 V_1, int32[] V_2, - int32 V_3, - int32 V_4) + int32[] V_3, + int32 V_4, + int32 V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -914,40 +1117,41 @@ IL_000a: ldnull IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0010: stloc.1 - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: ldlen - IL_0014: conv.i4 - IL_0015: newarr [runtime]System.Int32 - IL_001a: stloc.2 - IL_001b: ldc.i4.0 - IL_001c: stloc.3 - IL_001d: br.s IL_0031 - - IL_001f: ldloc.2 - IL_0020: ldloc.3 - IL_0021: ldarg.2 - IL_0022: ldloc.3 - IL_0023: ldelem.i4 - IL_0024: stloc.s V_4 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.0 - IL_0029: add - IL_002a: ldloc.1 - IL_002b: add - IL_002c: stelem.i4 - IL_002d: ldloc.3 - IL_002e: ldc.i4.1 + IL_0011: ldarg.2 + IL_0012: stloc.2 + IL_0013: ldloc.2 + IL_0014: ldlen + IL_0015: conv.i4 + IL_0016: newarr [runtime]System.Int32 + IL_001b: stloc.3 + IL_001c: ldc.i4.0 + IL_001d: stloc.s V_4 + IL_001f: br.s IL_0037 + + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.2 + IL_0025: ldloc.s V_4 + IL_0027: ldelem.i4 + IL_0028: stloc.s V_5 + IL_002a: ldloc.s V_5 + IL_002c: ldloc.0 + IL_002d: add + IL_002e: ldloc.1 IL_002f: add - IL_0030: stloc.3 - IL_0031: ldloc.3 - IL_0032: ldloc.2 - IL_0033: ldlen - IL_0034: conv.i4 - IL_0035: blt.s IL_001f - - IL_0037: ldloc.2 - IL_0038: ret + IL_0030: stelem.i4 + IL_0031: ldloc.s V_4 + IL_0033: ldc.i4.1 + IL_0034: add + IL_0035: stloc.s V_4 + IL_0037: ldloc.s V_4 + IL_0039: ldloc.3 + IL_003a: ldlen + IL_003b: conv.i4 + IL_003c: blt.s IL_0021 + + IL_003e: ldloc.3 + IL_003f: ret } .method public static int32[] f9(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -960,8 +1164,9 @@ .maxstack 6 .locals init (int32 V_0, int32[] V_1, - int32 V_2, - int32 V_3) + int32[] V_2, + int32 V_3, + int32 V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -971,38 +1176,39 @@ IL_000a: ldnull IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0010: pop - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: ldlen - IL_0014: conv.i4 - IL_0015: newarr [runtime]System.Int32 - IL_001a: stloc.1 - IL_001b: ldc.i4.0 - IL_001c: stloc.2 - IL_001d: br.s IL_002d - - IL_001f: ldloc.1 + IL_0011: ldarg.2 + IL_0012: stloc.1 + IL_0013: ldloc.1 + IL_0014: ldlen + IL_0015: conv.i4 + IL_0016: newarr [runtime]System.Int32 + IL_001b: stloc.2 + IL_001c: ldc.i4.0 + IL_001d: stloc.3 + IL_001e: br.s IL_0030 + IL_0020: ldloc.2 - IL_0021: ldarg.2 - IL_0022: ldloc.2 - IL_0023: ldelem.i4 - IL_0024: stloc.3 - IL_0025: ldloc.3 - IL_0026: ldloc.0 - IL_0027: add - IL_0028: stelem.i4 - IL_0029: ldloc.2 - IL_002a: ldc.i4.1 - IL_002b: add - IL_002c: stloc.2 - IL_002d: ldloc.2 - IL_002e: ldloc.1 - IL_002f: ldlen - IL_0030: conv.i4 - IL_0031: blt.s IL_001f + IL_0021: ldloc.3 + IL_0022: ldloc.1 + IL_0023: ldloc.3 + IL_0024: ldelem.i4 + IL_0025: stloc.s V_4 + IL_0027: ldloc.s V_4 + IL_0029: ldloc.0 + IL_002a: add + IL_002b: stelem.i4 + IL_002c: ldloc.3 + IL_002d: ldc.i4.1 + IL_002e: add + IL_002f: stloc.3 + IL_0030: ldloc.3 + IL_0031: ldloc.2 + IL_0032: ldlen + IL_0033: conv.i4 + IL_0034: blt.s IL_0020 - IL_0033: ldloc.1 - IL_0034: ret + IL_0036: ldloc.2 + IL_0037: ret } .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1014,8 +1220,9 @@ .maxstack 6 .locals init (int32[] V_0, - int32 V_1, - int32 V_2) + int32[] V_1, + int32 V_2, + int32 V_3) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1025,36 +1232,37 @@ IL_000a: ldnull IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0010: pop - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: ldlen - IL_0014: conv.i4 - IL_0015: newarr [runtime]System.Int32 - IL_001a: stloc.0 - IL_001b: ldc.i4.0 - IL_001c: stloc.1 - IL_001d: br.s IL_002b + IL_0011: ldarg.2 + IL_0012: stloc.0 + IL_0013: ldloc.0 + IL_0014: ldlen + IL_0015: conv.i4 + IL_0016: newarr [runtime]System.Int32 + IL_001b: stloc.1 + IL_001c: ldc.i4.0 + IL_001d: stloc.2 + IL_001e: br.s IL_002c - IL_001f: ldloc.0 IL_0020: ldloc.1 - IL_0021: ldarg.2 - IL_0022: ldloc.1 - IL_0023: ldelem.i4 - IL_0024: stloc.2 - IL_0025: ldloc.2 - IL_0026: stelem.i4 - IL_0027: ldloc.1 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_001f - - IL_0031: ldloc.0 - IL_0032: ret + IL_0021: ldloc.2 + IL_0022: ldloc.0 + IL_0023: ldloc.2 + IL_0024: ldelem.i4 + IL_0025: stloc.3 + IL_0026: ldloc.3 + IL_0027: stelem.i4 + IL_0028: ldloc.2 + IL_0029: ldc.i4.1 + IL_002a: add + IL_002b: stloc.2 + IL_002c: ldloc.2 + IL_002d: ldloc.1 + IL_002e: ldlen + IL_002f: conv.i4 + IL_0030: blt.s IL_0020 + + IL_0032: ldloc.1 + IL_0033: ret } .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1067,8 +1275,9 @@ .maxstack 6 .locals init (int32 V_0, int32[] V_1, - int32 V_2, - int32 V_3) + int32[] V_2, + int32 V_3, + int32 V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1078,38 +1287,515 @@ IL_000a: ldnull IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0010: stloc.0 - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: ldlen - IL_0014: conv.i4 - IL_0015: newarr [runtime]System.Int32 - IL_001a: stloc.1 - IL_001b: ldc.i4.0 - IL_001c: stloc.2 - IL_001d: br.s IL_002d - - IL_001f: ldloc.1 + IL_0011: ldarg.2 + IL_0012: stloc.1 + IL_0013: ldloc.1 + IL_0014: ldlen + IL_0015: conv.i4 + IL_0016: newarr [runtime]System.Int32 + IL_001b: stloc.2 + IL_001c: ldc.i4.0 + IL_001d: stloc.3 + IL_001e: br.s IL_0030 + IL_0020: ldloc.2 - IL_0021: ldarg.2 - IL_0022: ldloc.2 - IL_0023: ldelem.i4 - IL_0024: stloc.3 - IL_0025: ldloc.3 - IL_0026: ldloc.0 - IL_0027: add - IL_0028: stelem.i4 - IL_0029: ldloc.2 - IL_002a: ldc.i4.1 - IL_002b: add - IL_002c: stloc.2 - IL_002d: ldloc.2 - IL_002e: ldloc.1 - IL_002f: ldlen - IL_0030: conv.i4 - IL_0031: blt.s IL_001f + IL_0021: ldloc.3 + IL_0022: ldloc.1 + IL_0023: ldloc.3 + IL_0024: ldelem.i4 + IL_0025: stloc.s V_4 + IL_0027: ldloc.s V_4 + IL_0029: ldloc.0 + IL_002a: add + IL_002b: stelem.i4 + IL_002c: ldloc.3 + IL_002d: ldc.i4.1 + IL_002e: add + IL_002f: stloc.3 + IL_0030: ldloc.3 + IL_0031: ldloc.2 + IL_0032: ldlen + IL_0033: conv.i4 + IL_0034: blt.s IL_0020 + + IL_0036: ldloc.2 + IL_0037: ret + } - IL_0033: ldloc.1 - IL_0034: ret + .method public static int32[] f12(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 6 + .locals init (int32[] V_0, + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldlen + IL_000a: conv.i4 + IL_000b: newarr [runtime]System.Int32 + IL_0010: stloc.1 + IL_0011: ldc.i4.0 + IL_0012: stloc.2 + IL_0013: br.s IL_0023 + + IL_0015: ldloc.1 + IL_0016: ldloc.2 + IL_0017: ldloc.0 + IL_0018: ldloc.2 + IL_0019: ldelem.i4 + IL_001a: stloc.3 + IL_001b: ldloc.3 + IL_001c: ldarg.1 + IL_001d: add + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_0015 + + IL_0029: ldloc.1 + IL_002a: ret + } + + .method public static int32[] 'for _ in Array.groupBy id [||] do ...'() cil managed + { + + .maxstack 5 + .locals init (class [runtime]System.Tuple`2[] V_0, + int32[] V_1, + int32 V_2) + IL_0000: ldsfld class assembly/'for _ in Array-groupBy id -||- do ---@28' assembly/'for _ in Array-groupBy id -||- do ---@28'::@_instance + IL_0005: call !!0[] [runtime]System.Array::Empty() + IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + !!0[]) + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: newarr [runtime]System.Int32 + IL_0018: stloc.1 + IL_0019: ldc.i4.0 + IL_001a: stloc.2 + IL_001b: br.s IL_0025 + + IL_001d: ldloc.1 + IL_001e: ldloc.2 + IL_001f: ldc.i4.0 + IL_0020: stelem.i4 + IL_0021: ldloc.2 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: stloc.2 + IL_0025: ldloc.2 + IL_0026: ldloc.1 + IL_0027: ldlen + IL_0028: conv.i4 + IL_0029: blt.s IL_001d + + IL_002b: ldloc.1 + IL_002c: ret + } + + .method public static int32[] 'for _ | _ in Array.groupBy id [||] do ...'() cil managed + { + + .maxstack 5 + .locals init (class [runtime]System.Tuple`2[] V_0, + int32[] V_1, + int32 V_2) + IL_0000: ldsfld class assembly/'for _ | _ in Array-groupBy id -||- do ---@29' assembly/'for _ | _ in Array-groupBy id -||- do ---@29'::@_instance + IL_0005: call !!0[] [runtime]System.Array::Empty() + IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + !!0[]) + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: newarr [runtime]System.Int32 + IL_0018: stloc.1 + IL_0019: ldc.i4.0 + IL_001a: stloc.2 + IL_001b: br.s IL_0025 + + IL_001d: ldloc.1 + IL_001e: ldloc.2 + IL_001f: ldc.i4.0 + IL_0020: stelem.i4 + IL_0021: ldloc.2 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: stloc.2 + IL_0025: ldloc.2 + IL_0026: ldloc.1 + IL_0027: ldlen + IL_0028: conv.i4 + IL_0029: blt.s IL_001d + + IL_002b: ldloc.1 + IL_002c: ret + } + + .method public static int32[] 'for _ & _ in Array.groupBy id [||] do ...'() cil managed + { + + .maxstack 5 + .locals init (class [runtime]System.Tuple`2[] V_0, + int32[] V_1, + int32 V_2) + IL_0000: ldsfld class assembly/'for _ - _ in Array-groupBy id -||- do ---@30' assembly/'for _ - _ in Array-groupBy id -||- do ---@30'::@_instance + IL_0005: call !!0[] [runtime]System.Array::Empty() + IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + !!0[]) + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: newarr [runtime]System.Int32 + IL_0018: stloc.1 + IL_0019: ldc.i4.0 + IL_001a: stloc.2 + IL_001b: br.s IL_0025 + + IL_001d: ldloc.1 + IL_001e: ldloc.2 + IL_001f: ldc.i4.0 + IL_0020: stelem.i4 + IL_0021: ldloc.2 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: stloc.2 + IL_0025: ldloc.2 + IL_0026: ldloc.1 + IL_0027: ldlen + IL_0028: conv.i4 + IL_0029: blt.s IL_001d + + IL_002b: ldloc.1 + IL_002c: ret + } + + .method public static int32[] 'for _, _group in Array.groupBy id [||] do ...'() cil managed + { + + .maxstack 5 + .locals init (class [runtime]System.Tuple`2[] V_0, + int32[] V_1, + int32 V_2) + IL_0000: ldsfld class assembly/'for _, _group in Array-groupBy id -||- do ---@31' assembly/'for _, _group in Array-groupBy id -||- do ---@31'::@_instance + IL_0005: call !!0[] [runtime]System.Array::Empty() + IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + !!0[]) + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: newarr [runtime]System.Int32 + IL_0018: stloc.1 + IL_0019: ldc.i4.0 + IL_001a: stloc.2 + IL_001b: br.s IL_0025 + + IL_001d: ldloc.1 + IL_001e: ldloc.2 + IL_001f: ldc.i4.0 + IL_0020: stelem.i4 + IL_0021: ldloc.2 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: stloc.2 + IL_0025: ldloc.2 + IL_0026: ldloc.1 + IL_0027: ldlen + IL_0028: conv.i4 + IL_0029: blt.s IL_001d + + IL_002b: ldloc.1 + IL_002c: ret + } + + .method public static int32[] 'for _, group in Array.groupBy id [||] do ...'() cil managed + { + + .maxstack 6 + .locals init (class [runtime]System.Tuple`2[] V_0, + int32[] V_1, + int32 V_2, + class [runtime]System.Tuple`2 V_3, + object[] V_4) + IL_0000: ldsfld class assembly/'for _, group in Array-groupBy id -||- do ---@32' assembly/'for _, group in Array-groupBy id -||- do ---@32'::@_instance + IL_0005: call !!0[] [runtime]System.Array::Empty() + IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + !!0[]) + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: newarr [runtime]System.Int32 + IL_0018: stloc.1 + IL_0019: ldc.i4.0 + IL_001a: stloc.2 + IL_001b: br.s IL_0038 + + IL_001d: ldloc.1 + IL_001e: ldloc.2 + IL_001f: ldloc.0 + IL_0020: ldloc.2 + IL_0021: ldelem class [runtime]System.Tuple`2 + IL_0026: stloc.3 + IL_0027: ldloc.3 + IL_0028: call instance !1 class [runtime]System.Tuple`2::get_Item2() + IL_002d: stloc.s V_4 + IL_002f: ldloc.s V_4 + IL_0031: ldlen + IL_0032: conv.i4 + IL_0033: stelem.i4 + IL_0034: ldloc.2 + IL_0035: ldc.i4.1 + IL_0036: add + IL_0037: stloc.2 + IL_0038: ldloc.2 + IL_0039: ldloc.1 + IL_003a: ldlen + IL_003b: conv.i4 + IL_003c: blt.s IL_001d + + IL_003e: ldloc.1 + IL_003f: ret + } + + .method public static int32[] 'for 1 | 2 | _ in ...'() cil managed + { + + .maxstack 6 + .locals init (int32[] V_0, + int32[] V_1, + int32 V_2, + int32 V_3) + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldlen + IL_0008: conv.i4 + IL_0009: newarr [runtime]System.Int32 + IL_000e: stloc.1 + IL_000f: ldc.i4.0 + IL_0010: stloc.2 + IL_0011: br.s IL_0030 + + IL_0013: ldloc.1 + IL_0014: ldloc.2 + IL_0015: ldloc.0 + IL_0016: ldloc.2 + IL_0017: ldelem.i4 + IL_0018: stloc.3 + IL_0019: ldloc.3 + IL_001a: ldc.i4.1 + IL_001b: sub + IL_001c: switch ( + IL_0029, + IL_0029) + IL_0029: ldc.i4.0 + IL_002a: nop + IL_002b: stelem.i4 + IL_002c: ldloc.2 + IL_002d: ldc.i4.1 + IL_002e: add + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldloc.1 + IL_0032: ldlen + IL_0033: conv.i4 + IL_0034: blt.s IL_0013 + + IL_0036: ldloc.1 + IL_0037: ret + } + + .method public static int32[] 'for Failure _ | _ in ...'() cil managed + { + + .maxstack 6 + .locals init (class [runtime]System.Exception[] V_0, + int32[] V_1, + int32 V_2, + class [runtime]System.Exception V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4) + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldlen + IL_0008: conv.i4 + IL_0009: newarr [runtime]System.Int32 + IL_000e: stloc.1 + IL_000f: ldc.i4.0 + IL_0010: stloc.2 + IL_0011: br.s IL_0030 + + IL_0013: ldloc.1 + IL_0014: ldloc.2 + IL_0015: ldloc.0 + IL_0016: ldloc.2 + IL_0017: ldelem [runtime]System.Exception + IL_001c: stloc.3 + IL_001d: ldloc.3 + IL_001e: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_0023: stloc.s V_4 + IL_0025: ldloc.s V_4 + IL_0027: brfalse.s IL_0029 + + IL_0029: ldc.i4.0 + IL_002a: nop + IL_002b: stelem.i4 + IL_002c: ldloc.2 + IL_002d: ldc.i4.1 + IL_002e: add + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldloc.1 + IL_0032: ldlen + IL_0033: conv.i4 + IL_0034: blt.s IL_0013 + + IL_0036: ldloc.1 + IL_0037: ret + } + + .method public static int32[] 'for true | false in ...'() cil managed + { + + .maxstack 6 + .locals init (bool[] V_0, + int32[] V_1, + int32 V_2, + bool V_3) + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldlen + IL_0008: conv.i4 + IL_0009: newarr [runtime]System.Int32 + IL_000e: stloc.1 + IL_000f: ldc.i4.0 + IL_0010: stloc.2 + IL_0011: br.s IL_0027 + + IL_0013: ldloc.1 + IL_0014: ldloc.2 + IL_0015: ldloc.0 + IL_0016: ldloc.2 + IL_0017: ldelem [runtime]System.Boolean + IL_001c: stloc.3 + IL_001d: ldloc.3 + IL_001e: brfalse.s IL_0020 + + IL_0020: ldc.i4.0 + IL_0021: nop + IL_0022: stelem.i4 + IL_0023: ldloc.2 + IL_0024: ldc.i4.1 + IL_0025: add + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldloc.1 + IL_0029: ldlen + IL_002a: conv.i4 + IL_002b: blt.s IL_0013 + + IL_002d: ldloc.1 + IL_002e: ret + } + + .method public static int32[] 'for true | _ in ...'() cil managed + { + + .maxstack 6 + .locals init (bool[] V_0, + int32[] V_1, + int32 V_2, + bool V_3) + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldlen + IL_0008: conv.i4 + IL_0009: newarr [runtime]System.Int32 + IL_000e: stloc.1 + IL_000f: ldc.i4.0 + IL_0010: stloc.2 + IL_0011: br.s IL_0027 + + IL_0013: ldloc.1 + IL_0014: ldloc.2 + IL_0015: ldloc.0 + IL_0016: ldloc.2 + IL_0017: ldelem [runtime]System.Boolean + IL_001c: stloc.3 + IL_001d: ldloc.3 + IL_001e: brfalse.s IL_0020 + + IL_0020: ldc.i4.0 + IL_0021: nop + IL_0022: stelem.i4 + IL_0023: ldloc.2 + IL_0024: ldc.i4.1 + IL_0025: add + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldloc.1 + IL_0029: ldlen + IL_002a: conv.i4 + IL_002b: blt.s IL_0013 + + IL_002d: ldloc.1 + IL_002e: ret + } + + .method public static int32[] 'for _ | true in ...'() cil managed + { + + .maxstack 5 + .locals init (bool[] V_0, + int32[] V_1, + int32 V_2) + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldlen + IL_0008: conv.i4 + IL_0009: newarr [runtime]System.Int32 + IL_000e: stloc.1 + IL_000f: ldc.i4.0 + IL_0010: stloc.2 + IL_0011: br.s IL_001b + + IL_0013: ldloc.1 + IL_0014: ldloc.2 + IL_0015: ldc.i4.0 + IL_0016: stelem.i4 + IL_0017: ldloc.2 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: ldloc.1 + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: blt.s IL_0013 + + IL_0021: ldloc.1 + IL_0022: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs index 6174b901ff0..33be454f9c4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs @@ -21,3 +21,17 @@ let f8 f g (list: int list) = [let y = f () in let z = g () in for x in list -> let f9 f g (list: int list) = [let y = f () in g (); for x in list -> x + y] let f10 f g (list: int list) = [f (); g (); for x in list -> x] let f11 f g (list: int list) = [f (); let y = g () in for x in list -> x + y] +let f12 (f: unit -> int list) y = [for x in f () -> x + y] + +// https://github.com/dotnet/fsharp/issues/17708 +// Don't read or rebind the loop variable when it is not in scope in the body. +let ``for _ in List.groupBy id [] do ...`` () = [for _ in List.groupBy id [] do 0] +let ``for _ | _ in List.groupBy id [] do ...`` () = [for _ | _ in List.groupBy id [] do 0] +let ``for _ & _ in List.groupBy id [] do ...`` () = [for _ & _ in List.groupBy id [] do 0] +let ``for _, _group in List.groupBy id [] do ...`` () = [for _, _group in List.groupBy id [] do 0] +let ``for _, group in List.groupBy id [] do ...`` () = [for _, group in List.groupBy id [] do group.Length] +let ``for 1 | 2 | _ in ...`` () = [for 1 | 2 | _ in [] do 0] +let ``for Failure _ | _ in ...`` () = [for Failure _ | _ in [] do 0] +let ``for true | false in ...`` () = [for true | false in [] do 0] +let ``for true | _ in ...`` () = [for true | _ in [] do 0] +let ``for _ | true in ...`` () = [for _ | true in [] do 0] 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 f70400c2792..32f34802bd5 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 @@ -43,6 +43,176 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ in List-groupBy id -- do ---@28' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _ in List-groupBy id -- do ---@28' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance object Invoke(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _ in List-groupBy id -- do ---@28'::.ctor() + IL_0005: stsfld class assembly/'for _ in List-groupBy id -- do ---@28' assembly/'for _ in List-groupBy id -- do ---@28'::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ | _ in List-groupBy id -- do ---@29' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _ | _ in List-groupBy id -- do ---@29' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance object Invoke(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _ | _ in List-groupBy id -- do ---@29'::.ctor() + IL_0005: stsfld class assembly/'for _ | _ in List-groupBy id -- do ---@29' assembly/'for _ | _ in List-groupBy id -- do ---@29'::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ - _ in List-groupBy id -- do ---@30' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _ - _ in List-groupBy id -- do ---@30' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance object Invoke(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _ - _ in List-groupBy id -- do ---@30'::.ctor() + IL_0005: stsfld class assembly/'for _ - _ in List-groupBy id -- do ---@30' assembly/'for _ - _ in List-groupBy id -- do ---@30'::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, _group in List-groupBy id -- do ---@31' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _, _group in List-groupBy id -- do ---@31' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance object Invoke(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _, _group in List-groupBy id -- do ---@31'::.ctor() + IL_0005: stsfld class assembly/'for _, _group in List-groupBy id -- do ---@31' assembly/'for _, _group in List-groupBy id -- do ---@31'::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, group in List-groupBy id -- do ---@32' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _, group in List-groupBy id -- do ---@32' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance object Invoke(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _, group in List-groupBy id -- do ---@32'::.ctor() + IL_0005: stsfld class assembly/'for _, group in List-groupBy id -- do ---@32' assembly/'for _, group in List-groupBy id -- do ---@32'::@_instance + IL_000a: ret + } + + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { @@ -594,9 +764,7 @@ IL_002f: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -635,9 +803,7 @@ IL_0035: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -763,9 +929,7 @@ IL_002f: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -1067,6 +1231,450 @@ IL_0044: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f12(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> f, int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::Invoke(!0) + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000f: stloc.2 + IL_0010: br.s IL_002d + + IL_0012: ldloc.1 + IL_0013: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0018: stloc.3 + IL_0019: ldloca.s V_0 + IL_001b: ldloc.3 + IL_001c: ldarg.1 + IL_001d: add + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.2 + IL_0025: stloc.1 + IL_0026: ldloc.1 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.2 + IL_002d: ldloc.2 + IL_002e: brtrue.s IL_0012 + + IL_0030: ldloca.s V_0 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0037: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ in List.groupBy id [] do ...'() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_2, + class [runtime]System.Tuple`2> V_3) + IL_0000: nop + IL_0001: ldsfld class assembly/'for _ in List-groupBy id -- do ---@28' assembly/'for _ in List-groupBy id -- do ---@28'::@_instance + IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0010: stloc.1 + IL_0011: ldloc.1 + IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0017: stloc.2 + IL_0018: br.s IL_0033 + + IL_001a: ldloc.1 + IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_HeadOrDefault() + IL_0020: stloc.3 + IL_0021: ldloca.s V_0 + IL_0023: ldc.i4.0 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: brtrue.s IL_001a + + IL_0036: ldloca.s V_0 + IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003d: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ | _ in List.groupBy id [] do ...'() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_2, + class [runtime]System.Tuple`2> V_3) + IL_0000: nop + IL_0001: ldsfld class assembly/'for _ | _ in List-groupBy id -- do ---@29' assembly/'for _ | _ in List-groupBy id -- do ---@29'::@_instance + IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0010: stloc.1 + IL_0011: ldloc.1 + IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0017: stloc.2 + IL_0018: br.s IL_0033 + + IL_001a: ldloc.1 + IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_HeadOrDefault() + IL_0020: stloc.3 + IL_0021: ldloca.s V_0 + IL_0023: ldc.i4.0 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: brtrue.s IL_001a + + IL_0036: ldloca.s V_0 + IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003d: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ & _ in List.groupBy id [] do ...'() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_2, + class [runtime]System.Tuple`2> V_3) + IL_0000: nop + IL_0001: ldsfld class assembly/'for _ - _ in List-groupBy id -- do ---@30' assembly/'for _ - _ in List-groupBy id -- do ---@30'::@_instance + IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0010: stloc.1 + IL_0011: ldloc.1 + IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0017: stloc.2 + IL_0018: br.s IL_0033 + + IL_001a: ldloc.1 + IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_HeadOrDefault() + IL_0020: stloc.3 + IL_0021: ldloca.s V_0 + IL_0023: ldc.i4.0 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: brtrue.s IL_001a + + IL_0036: ldloca.s V_0 + IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003d: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _, _group in List.groupBy id [] do ...'() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_2, + class [runtime]System.Tuple`2> V_3) + IL_0000: nop + IL_0001: ldsfld class assembly/'for _, _group in List-groupBy id -- do ---@31' assembly/'for _, _group in List-groupBy id -- do ---@31'::@_instance + IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0010: stloc.1 + IL_0011: ldloc.1 + IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0017: stloc.2 + IL_0018: br.s IL_0033 + + IL_001a: ldloc.1 + IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_HeadOrDefault() + IL_0020: stloc.3 + IL_0021: ldloca.s V_0 + IL_0023: ldc.i4.0 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: brtrue.s IL_001a + + IL_0036: ldloca.s V_0 + IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003d: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _, group in List.groupBy id [] do ...'() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_2, + class [runtime]System.Tuple`2> V_3, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4) + IL_0000: nop + IL_0001: ldsfld class assembly/'for _, group in List-groupBy id -- do ---@32' assembly/'for _, group in List-groupBy id -- do ---@32'::@_instance + IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0010: stloc.1 + IL_0011: ldloc.1 + IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0017: stloc.2 + IL_0018: br.s IL_0041 + + IL_001a: ldloc.1 + IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_HeadOrDefault() + IL_0020: stloc.3 + IL_0021: ldloca.s V_0 + IL_0023: ldloc.3 + IL_0024: call instance !1 class [runtime]System.Tuple`2>::get_Item2() + IL_0029: stloc.s V_4 + IL_002b: ldloc.s V_4 + IL_002d: callvirt instance int32 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Length() + IL_0032: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0037: nop + IL_0038: ldloc.2 + IL_0039: stloc.1 + IL_003a: ldloc.1 + IL_003b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: brtrue.s IL_001a + + IL_0044: ldloca.s V_0 + IL_0046: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004b: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for 1 | 2 | _ in ...'() cil managed + { + + .maxstack 5 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: nop + IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0006: stloc.1 + IL_0007: ldloc.1 + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000d: stloc.2 + IL_000e: br.s IL_003a + + IL_0010: ldloc.1 + IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0016: stloc.3 + IL_0017: ldloca.s V_0 + IL_0019: ldloc.3 + IL_001a: ldc.i4.1 + IL_001b: sub + IL_001c: switch ( + IL_0029, + IL_0029) + IL_0029: ldc.i4.0 + IL_002a: nop + 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: stloc.1 + IL_0033: ldloc.1 + IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0039: stloc.2 + IL_003a: ldloc.2 + IL_003b: brtrue.s IL_0010 + + IL_003d: ldloca.s V_0 + IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0044: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for Failure _ | _ in ...'() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + class [runtime]System.Exception V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4) + IL_0000: nop + IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0006: stloc.1 + IL_0007: ldloc.1 + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000d: stloc.2 + IL_000e: br.s IL_0036 + + IL_0010: ldloc.1 + IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0016: stloc.3 + IL_0017: ldloca.s V_0 + IL_0019: ldloc.3 + IL_001a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_001f: stloc.s V_4 + IL_0021: ldloc.s V_4 + IL_0023: brfalse.s IL_0025 + + IL_0025: ldc.i4.0 + IL_0026: nop + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloc.2 + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0035: stloc.2 + IL_0036: ldloc.2 + IL_0037: brtrue.s IL_0010 + + IL_0039: ldloca.s V_0 + IL_003b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0040: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for true | false in ...'() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + bool V_3) + IL_0000: nop + IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0006: stloc.1 + IL_0007: ldloc.1 + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000d: stloc.2 + IL_000e: br.s IL_002d + + IL_0010: ldloc.1 + IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0016: stloc.3 + IL_0017: ldloca.s V_0 + IL_0019: ldloc.3 + IL_001a: brfalse.s IL_001c + + IL_001c: ldc.i4.0 + IL_001d: nop + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.2 + IL_0025: stloc.1 + IL_0026: ldloc.1 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.2 + IL_002d: ldloc.2 + IL_002e: brtrue.s IL_0010 + + IL_0030: ldloca.s V_0 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0037: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for true | _ in ...'() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + bool V_3) + IL_0000: nop + IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0006: stloc.1 + IL_0007: ldloc.1 + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000d: stloc.2 + IL_000e: br.s IL_002d + + IL_0010: ldloc.1 + IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0016: stloc.3 + IL_0017: ldloca.s V_0 + IL_0019: ldloc.3 + IL_001a: brfalse.s IL_001c + + IL_001c: ldc.i4.0 + IL_001d: nop + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.2 + IL_0025: stloc.1 + IL_0026: ldloc.1 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.2 + IL_002d: ldloc.2 + IL_002e: brtrue.s IL_0010 + + IL_0030: ldloca.s V_0 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0037: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ | true in ...'() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + bool V_3) + IL_0000: nop + IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0006: stloc.1 + IL_0007: ldloc.1 + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000d: stloc.2 + IL_000e: br.s IL_0029 + + IL_0010: ldloc.1 + IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0016: stloc.3 + IL_0017: ldloca.s V_0 + IL_0019: ldc.i4.0 + IL_001a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001f: nop + IL_0020: ldloc.2 + IL_0021: stloc.1 + IL_0022: ldloc.1 + IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0028: stloc.2 + IL_0029: ldloc.2 + IL_002a: brtrue.s IL_0010 + + IL_002c: ldloca.s V_0 + IL_002e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0033: ret + } + } .class private abstract auto ansi sealed ''.$assembly