From c05ec440d1d86fe9e19b19d4fabc0fbf532fa24b Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 10 Aug 2026 16:22:13 +0200 Subject: [PATCH 1/2] Optimizer: propagate NoDynamicInvocation --- src/Compiler/Optimize/Optimizer.fs | 95 +++++++++++++--- .../EmittedIL/DebugInlineAsCall.fs | 105 ++++++++++++++++++ .../Stackalloc 01 - Debug.bsl | 92 +++++++++++++++ .../Stackalloc 02 - Nested wrappers.bsl | 97 ++++++++++++++++ .../Stackalloc 03 - Different assembly.bsl | 60 ++++++++++ ... - Only the wrappers are force inlined.bsl | 77 +++++++++++++ 6 files changed, 508 insertions(+), 18 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 01 - Debug.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 02 - Nested wrappers.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 03 - Different assembly.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 04 - Only the wrappers are force inlined.bsl diff --git a/src/Compiler/Optimize/Optimizer.fs b/src/Compiler/Optimize/Optimizer.fs index a6b21b577eb..83d7f0265bd 100644 --- a/src/Compiler/Optimize/Optimizer.fs +++ b/src/Compiler/Optimize/Optimizer.fs @@ -437,6 +437,9 @@ type cenv = specializedInlineVals: HashMultiMap + /// Cache for 'HasFrameLocalBody' + frameLocalVals: Dictionary + signatureHidingInfo: SignatureHidingInfo } @@ -622,20 +625,23 @@ let BindTyparsToUnknown (tps: Typar list) env = let BindCcu (ccu: CcuThunk) mval env (_g: TcGlobals) = { env with globalModuleInfos=env.globalModuleInfos.Add(ccu.AssemblyName, mval) } -/// Lookup information about values -let GetInfoForLocalValue cenv env (v: Val) m = - // Abstract slots do not have values - if v.IsDispatchSlot then UnknownValInfo +/// Lookup information about values, without reporting values that are not bound yet +let TryGetInfoForLocalValue cenv env (v: Val) = + // Abstract slots do not have values + if v.IsDispatchSlot then None else match cenv.localInternalVals.TryGetValue v.Stamp with - | true, res -> res - | _ -> - match env.localExternalVals.TryFind v.Stamp with - | Some vval -> vval - | None -> - if v.ShouldInline then - errorR(Error(FSComp.SR.optValueMarkedInlineButWasNotBoundInTheOptEnv(fullDisplayTextOfValRef (mkLocalValRef v)), m)) - UnknownValInfo + | true, res -> Some res + | _ -> env.localExternalVals.TryFind v.Stamp + +/// Lookup information about values +let GetInfoForLocalValue cenv env (v: Val) m = + match TryGetInfoForLocalValue cenv env v with + | Some vval -> vval + | None -> + if not v.IsDispatchSlot && v.ShouldInline then + errorR(Error(FSComp.SR.optValueMarkedInlineButWasNotBoundInTheOptEnv(fullDisplayTextOfValRef (mkLocalValRef v)), m)) + UnknownValInfo let TryGetInfoForCcu env (ccu: CcuThunk) = env.globalModuleInfos.TryFind(ccu.AssemblyName) @@ -682,14 +688,20 @@ let GetInfoForNonLocalVal cenv env (vref: ValRef) = else UnknownValInfo -let GetInfoForVal cenv env m (vref: ValRef) = - let res = +let GetInfoForVal cenv env m (vref: ValRef) = + let res = if vref.IsLocalRef then GetInfoForLocalValue cenv env vref.binding m else GetInfoForNonLocalVal cenv env vref res +let TryGetInfoForVal cenv env (vref: ValRef) = + if vref.IsLocalRef then + TryGetInfoForLocalValue cenv env vref.binding + else + Some(GetInfoForNonLocalVal cenv env vref) + let IsPartialExpr cenv env m x = let rec isPartialExpression x = @@ -2426,11 +2438,57 @@ let shouldForceInlineMembersInDebug (g: TcGlobals) (tcref: EntityRef) = | true, modRef -> tyconRefEq g tcref modRef | _ -> false -let shouldForceInlineInDebug (g: TcGlobals) (vref: ValRef) : bool = +/// 'localloc' storage is released when the method executing it returns, so anything derived from +/// it dangles at that method's callsite. +let instrIsFrameLocal instr = + match instr with + | I_localloc -> true + | _ -> false + +/// The FSharp.Core values expanding to frame-local IL are marked [] and so are +/// always inlined. A user 'inline' function wrapping one inherits the property but not the +/// attribute - the callee is already inlined into the recorded body, leaving only its IL - so +/// recover it from the body and propagate it through further wrappers. +/// See https://github.com/dotnet/fsharp/issues/20063. +let rec HasFrameLocalBody cenv env (vref: ValRef) = + let stamp = vref.Stamp + + match cenv.frameLocalVals.TryGetValue stamp with + | true, res -> res + | _ -> + // Values bound within the body being walked have no info yet, but the walk covers them anyway. + match TryGetInfoForVal cenv env vref |> Option.map (fun info -> stripValue info.ValExprInfo) with + | Some(CurriedLambdaValue (_, _, _, body, _)) -> + cenv.frameLocalVals[stamp] <- false // Break cycles while the body is inspected + let res = ExprIsFrameLocal cenv env body + cenv.frameLocalVals[stamp] <- res + res + + | _ -> false + +and ExprIsFrameLocal cenv env expr = + let folder = + { ExprFolder0 with + exprIntercept = + fun _recurseF noInterceptF acc expr -> + if acc then acc else + + match expr with + | Expr.Op (TOp.ILAsm (instrs, _), _, _, _) when List.exists instrIsFrameLocal instrs -> true + | Expr.Val (vref, _, _) when vref.ShouldInline -> HasFrameLocalBody cenv env vref + | _ -> noInterceptF acc expr } + + FoldExpr folder false expr + +let shouldForceInlineInDebug cenv env (vref: ValRef) : bool = + let g = cenv.g + ValHasWellKnownAttribute g WellKnownValAttributes.NoDynamicInvocationAttribute_True vref.Deref || ValHasWellKnownAttribute g WellKnownValAttributes.NoDynamicInvocationAttribute_False vref.Deref || - vref.HasDeclaringEntity && shouldForceInlineMembersInDebug g vref.DeclaringEntity + (vref.HasDeclaringEntity && shouldForceInlineMembersInDebug g vref.DeclaringEntity) || + + HasFrameLocalBody cenv env vref /// Optimize/analyze an expression let rec OptimizeExpr cenv (env: IncrementalOptimizationEnv) expr = @@ -3179,7 +3237,7 @@ and TryOptimizeVal cenv env (vOpt: ValRef option, shouldInline, inlineIfLambda, Some (remarkExpr m (copyExpr g CloneAllAndMarkExprValsAsCompilerGenerated expr)) | CurriedLambdaValue (_, _, _, expr, _) when - shouldInline && (cenv.settings.alwaysInline || Option.exists (shouldForceInlineInDebug cenv.g) vOpt) || + shouldInline && (cenv.settings.alwaysInline || Option.exists (shouldForceInlineInDebug cenv env) vOpt) || inlineIfLambda && cenv.settings.alwaysInline -> let fvs = freeInExpr CollectLocals expr if usesMethodLocalConstructsOrProtectedField cenv fvs expr then @@ -3534,7 +3592,7 @@ and TryInlineApplication cenv env finfo (valExpr: Expr) (tyargs: TType list, arg let g = cenv.g match cenv.settings.alwaysInline, stripExpr valExpr with - | false, Expr.Val(vref, _, _) when vref.ShouldInline && not (shouldForceInlineInDebug cenv.g vref) -> + | false, Expr.Val(vref, _, _) when vref.ShouldInline && not (shouldForceInlineInDebug cenv env vref) -> let hasNoTraits = let tps, _ = tryDestForallTy g vref.Type GetTraitConstraintInfosOfTypars g tps |> List.isEmpty @@ -4677,6 +4735,7 @@ let OptimizeImplFile (settings, ccu, tcGlobals, tcVal, importMap, optEnv, isIncr stackGuard = StackGuard("OptimizerStackGuardDepth") realsig = tcGlobals.realsig specializedInlineVals = HashMultiMap(HashIdentity.Structural, true) + frameLocalVals = Dictionary() signatureHidingInfo = SignatureHidingInfo.Empty } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs index 913b0eace74..67dc0cbc5f0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs @@ -1595,3 +1595,108 @@ let main _ = |> shouldSucceed |> verifyILNotPresent ["call int32 Test::apply(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,"] + // https://github.com/dotnet/fsharp/issues/20063 + [] + let ``Stackalloc 01 - Debug`` () = + FSharp """ +open System +open FSharp.NativeInterop +#nowarn 9 + +let inline stackalloc n = Span(NativePtr.stackalloc n |> NativePtr.toVoidPtr, n) + +[] +let main _ = + let b = stackalloc 3 + b[0] <- 'a' + b[1] <- 'b' + b[2] <- 'c' + if String b = "abc" then 0 else 1 +""" + |> withDebug + |> withNoOptimize + |> asExe + |> compileAndRun + |> verifySequencePoints + + [] + let ``Stackalloc 02 - Nested wrappers`` () = + FSharp """ +open System +open FSharp.NativeInterop +#nowarn 9 + +let inline alloc n : nativeptr = NativePtr.stackalloc n +let inline stackalloc n = Span(alloc n |> NativePtr.toVoidPtr, n) + +[] +let main _ = + let b = stackalloc 2 + b[0] <- 'a' + b[1] <- 'b' + if String b = "ab" then 0 else 1 +""" + |> withDebug + |> withNoOptimize + |> asExe + |> compileAndRun + |> verifySequencePoints + + [] + let ``Stackalloc 03 - Different assembly`` () = + let library = + FSharp """ +module MyLib + +open System +open FSharp.NativeInterop +#nowarn 9 + +let inline alloc n : nativeptr = NativePtr.stackalloc n +let inline stackalloc n = Span(alloc n |> NativePtr.toVoidPtr, n) +""" + |> withDebug + |> withNoOptimize + |> asLibrary + |> withName "Lib" + + FSharp """ +open System +open MyLib + +[] +let main _ = + let b = stackalloc 2 + b[0] <- 'a' + b[1] <- 'b' + if String b = "ab" then 0 else 1 +""" + |> withDebug + |> withNoOptimize + |> withReferences [library] + |> asExe + |> compileAndRun + |> verifySequencePoints + + [] + let ``Stackalloc 04 - Only the wrappers are force inlined`` () = + FSharp """ +open System +open FSharp.NativeInterop +#nowarn 9 + +let inline stackalloc n = Span(NativePtr.stackalloc n |> NativePtr.toVoidPtr, n) +let inline fill (b: Span) c = b.Fill c + +[] +let main _ = + let b = stackalloc 2 + fill b 'a' + if String b = "aa" then 0 else 1 +""" + |> withDebug + |> withNoOptimize + |> asExe + |> compileAndRun + |> verifySequencePoints + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 01 - Debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 01 - Debug.bsl new file mode 100644 index 00000000000..31905f44799 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 01 - Debug.bsl @@ -0,0 +1,92 @@ +open System +open FSharp.NativeInterop +#nowarn 9 + +let inline stackalloc n = Span(NativePtr.stackalloc n |> NativePtr.toVoidPtr, n) + +[] +let main _ = + let b = stackalloc 3 + b[0] <- 'a' + b[1] <- 'b' + b[2] <- 'c' + if String b = "abc" then 0 else 1 +-------------------------------------------------------------------------------- + +Test::stackalloc + (6,27-6,93) Span(NativePtr.stackalloc n |> NativePtr.toVoidPtr, n) + IL_0000: nop + + (6,38-6,66) NativePtr.stackalloc n + IL_0001: ldarg.0 + IL_0002: stloc.1 + IL_0003: ldloc.1 + IL_0004: sizeof Char + IL_000a: mul + IL_000b: localloc + IL_000d: stloc.0 + + (6,70-6,89) NativePtr.toVoidPtr + IL_000e: ldloc.0 + IL_000f: stloc.2 + IL_0010: ldloc.2 + IL_0011: ldarg.0 + IL_0012: newobj .ctor + IL_0017: ret + +Test::main + (10,5-10,25) let b = stackalloc 3 + IL_0000: ldc.i4.3 + IL_0001: stloc.1 + IL_0002: ldloc.1 + IL_0003: stloc.2 + IL_0004: ldloc.2 + IL_0005: sizeof Char + IL_000b: mul + IL_000c: localloc + IL_000e: ldloc.1 + IL_000f: newobj .ctor + IL_0014: stloc.0 + + (11,5-11,9) b[0] + IL_0015: ldloca.s 0 + IL_0017: ldc.i4.0 + IL_0018: call get_Item + IL_001d: stloc.3 + IL_001e: ldloc.3 + IL_001f: ldc.i4.s 97 + IL_0021: stobj Char + + (12,5-12,9) b[1] + IL_0026: ldloca.s 0 + IL_0028: ldc.i4.1 + IL_0029: call get_Item + IL_002e: stloc.s 4 + IL_0030: ldloc.s 4 + IL_0032: ldc.i4.s 98 + IL_0034: stobj Char + + (13,5-13,9) b[2] + IL_0039: ldloca.s 0 + IL_003b: ldc.i4.2 + IL_003c: call get_Item + IL_0041: stloc.s 5 + IL_0043: ldloc.s 5 + IL_0045: ldc.i4.s 99 + IL_0047: stobj Char + + (14,5-14,29) if String b = "abc" then + IL_004c: ldloc.0 + IL_004d: call op_Implicit + IL_0052: newobj String::.ctor + IL_0057: ldstr "abc" + IL_005c: call String::Equals + IL_0061: brfalse.s IL_0065 + + (14,30-14,31) 0 + IL_0063: ldc.i4.0 + IL_0064: ret + + (14,37-14,38) 1 + IL_0065: ldc.i4.1 + IL_0066: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 02 - Nested wrappers.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 02 - Nested wrappers.bsl new file mode 100644 index 00000000000..3427ebbfa9b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 02 - Nested wrappers.bsl @@ -0,0 +1,97 @@ +open System +open FSharp.NativeInterop +#nowarn 9 + +let inline alloc n : nativeptr = NativePtr.stackalloc n +let inline stackalloc n = Span(alloc n |> NativePtr.toVoidPtr, n) + +[] +let main _ = + let b = stackalloc 2 + b[0] <- 'a' + b[1] <- 'b' + if String b = "ab" then 0 else 1 +-------------------------------------------------------------------------------- + +Test::alloc + (6,40-6,68) NativePtr.stackalloc n + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: sizeof Char + IL_0009: mul + IL_000a: localloc + IL_000c: ret + +Test::stackalloc + (7,27-7,72) Span(alloc n |> NativePtr.toVoidPtr, n) + IL_0000: nop + + (7,38-7,45) alloc n + IL_0001: ldarg.0 + IL_0002: stloc.1 + IL_0003: ldloc.1 + IL_0004: stloc.2 + IL_0005: ldloc.2 + IL_0006: sizeof Char + IL_000c: mul + IL_000d: localloc + IL_000f: stloc.0 + + (7,49-7,68) NativePtr.toVoidPtr + IL_0010: ldloc.0 + IL_0011: stloc.3 + IL_0012: ldloc.3 + IL_0013: ldarg.0 + IL_0014: newobj .ctor + IL_0019: ret + +Test::main + (11,5-11,25) let b = stackalloc 2 + IL_0000: ldc.i4.2 + IL_0001: stloc.1 + IL_0002: ldloc.1 + IL_0003: stloc.2 + IL_0004: ldloc.2 + IL_0005: stloc.3 + IL_0006: ldloc.3 + IL_0007: sizeof Char + IL_000d: mul + IL_000e: localloc + IL_0010: ldloc.1 + IL_0011: newobj .ctor + IL_0016: stloc.0 + + (12,5-12,9) b[0] + IL_0017: ldloca.s 0 + IL_0019: ldc.i4.0 + IL_001a: call get_Item + IL_001f: stloc.s 4 + IL_0021: ldloc.s 4 + IL_0023: ldc.i4.s 97 + IL_0025: stobj Char + + (13,5-13,9) b[1] + IL_002a: ldloca.s 0 + IL_002c: ldc.i4.1 + IL_002d: call get_Item + IL_0032: stloc.s 5 + IL_0034: ldloc.s 5 + IL_0036: ldc.i4.s 98 + IL_0038: stobj Char + + (14,5-14,28) if String b = "ab" then + IL_003d: ldloc.0 + IL_003e: call op_Implicit + IL_0043: newobj String::.ctor + IL_0048: ldstr "ab" + IL_004d: call String::Equals + IL_0052: brfalse.s IL_0056 + + (14,29-14,30) 0 + IL_0054: ldc.i4.0 + IL_0055: ret + + (14,36-14,37) 1 + IL_0056: ldc.i4.1 + IL_0057: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 03 - Different assembly.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 03 - Different assembly.bsl new file mode 100644 index 00000000000..5f366c322dd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 03 - Different assembly.bsl @@ -0,0 +1,60 @@ +open System +open MyLib + +[] +let main _ = + let b = stackalloc 2 + b[0] <- 'a' + b[1] <- 'b' + if String b = "ab" then 0 else 1 +-------------------------------------------------------------------------------- + +Test::main + (7,5-7,25) let b = stackalloc 2 + IL_0000: ldc.i4.2 + IL_0001: stloc.1 + IL_0002: ldloc.1 + IL_0003: stloc.2 + IL_0004: ldloc.2 + IL_0005: stloc.3 + IL_0006: ldloc.3 + IL_0007: sizeof Char + IL_000d: mul + IL_000e: localloc + IL_0010: ldloc.1 + IL_0011: newobj .ctor + IL_0016: stloc.0 + + (8,5-8,9) b[0] + IL_0017: ldloca.s 0 + IL_0019: ldc.i4.0 + IL_001a: call get_Item + IL_001f: stloc.s 4 + IL_0021: ldloc.s 4 + IL_0023: ldc.i4.s 97 + IL_0025: stobj Char + + (9,5-9,9) b[1] + IL_002a: ldloca.s 0 + IL_002c: ldc.i4.1 + IL_002d: call get_Item + IL_0032: stloc.s 5 + IL_0034: ldloc.s 5 + IL_0036: ldc.i4.s 98 + IL_0038: stobj Char + + (10,5-10,28) if String b = "ab" then + IL_003d: ldloc.0 + IL_003e: call op_Implicit + IL_0043: newobj String::.ctor + IL_0048: ldstr "ab" + IL_004d: call String::Equals + IL_0052: brfalse.s IL_0056 + + (10,29-10,30) 0 + IL_0054: ldc.i4.0 + IL_0055: ret + + (10,36-10,37) 1 + IL_0056: ldc.i4.1 + IL_0057: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 04 - Only the wrappers are force inlined.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 04 - Only the wrappers are force inlined.bsl new file mode 100644 index 00000000000..78f27c129e5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Stackalloc 04 - Only the wrappers are force inlined.bsl @@ -0,0 +1,77 @@ +open System +open FSharp.NativeInterop +#nowarn 9 + +let inline stackalloc n = Span(NativePtr.stackalloc n |> NativePtr.toVoidPtr, n) +let inline fill (b: Span) c = b.Fill c + +[] +let main _ = + let b = stackalloc 2 + fill b 'a' + if String b = "aa" then 0 else 1 +-------------------------------------------------------------------------------- + +Test::stackalloc + (6,27-6,93) Span(NativePtr.stackalloc n |> NativePtr.toVoidPtr, n) + IL_0000: nop + + (6,38-6,66) NativePtr.stackalloc n + IL_0001: ldarg.0 + IL_0002: stloc.1 + IL_0003: ldloc.1 + IL_0004: sizeof Char + IL_000a: mul + IL_000b: localloc + IL_000d: stloc.0 + + (6,70-6,89) NativePtr.toVoidPtr + IL_000e: ldloc.0 + IL_000f: stloc.2 + IL_0010: ldloc.2 + IL_0011: ldarg.0 + IL_0012: newobj .ctor + IL_0017: ret + +Test::fill + (7,37-7,45) b.Fill c + IL_0000: ldarga.s 0 + IL_0002: ldarg.1 + IL_0003: call Fill + IL_0008: ret + +Test::main + (11,5-11,25) let b = stackalloc 2 + IL_0000: ldc.i4.2 + IL_0001: stloc.1 + IL_0002: ldloc.1 + IL_0003: stloc.2 + IL_0004: ldloc.2 + IL_0005: sizeof Char + IL_000b: mul + IL_000c: localloc + IL_000e: ldloc.1 + IL_000f: newobj .ctor + IL_0014: stloc.0 + + (12,5-12,15) fill b 'a' + IL_0015: ldloc.0 + IL_0016: ldc.i4.s 97 + IL_0018: call Test::fill + IL_001d: nop + + (13,5-13,28) if String b = "aa" then + IL_001e: ldloc.0 + IL_001f: call op_Implicit + IL_0024: newobj String::.ctor + IL_0029: ldstr "aa" + IL_002e: call String::Equals + IL_0033: brfalse.s IL_0037 + + (13,29-13,30) 0 + IL_0035: ldc.i4.0 + IL_0036: ret + + (13,36-13,37) 1 + IL_0037: ldc.i4.1 + IL_0038: ret From ef9064229a7b1021887d93460f763dec28bfaf7e Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 10 Aug 2026 17:34:35 +0200 Subject: [PATCH 2/2] Tests --- .../EmittedIL/DebugInlineAsCall.fs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs index 67dc0cbc5f0..8b2f42d8010 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs @@ -2,6 +2,7 @@ namespace EmittedIL open System.Diagnostics open System.Runtime.CompilerServices +open FSharp.Test open Xunit open FSharp.Test.Compiler @@ -1596,7 +1597,7 @@ let main _ = |> verifyILNotPresent ["call int32 Test::apply(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,"] // https://github.com/dotnet/fsharp/issues/20063 - [] + [] let ``Stackalloc 01 - Debug`` () = FSharp """ open System @@ -1619,7 +1620,7 @@ let main _ = |> compileAndRun |> verifySequencePoints - [] + [] let ``Stackalloc 02 - Nested wrappers`` () = FSharp """ open System @@ -1642,7 +1643,7 @@ let main _ = |> compileAndRun |> verifySequencePoints - [] + [] let ``Stackalloc 03 - Different assembly`` () = let library = FSharp """ @@ -1678,7 +1679,7 @@ let main _ = |> compileAndRun |> verifySequencePoints - [] + [] let ``Stackalloc 04 - Only the wrappers are force inlined`` () = FSharp """ open System