diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.release.bsl index 904fec314fe..7231863083c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.release.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -130,9 +120,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -228,9 +216,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(valuetype floatsanddoubles/Float obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype floatsanddoubles/Float obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -249,9 +235,7 @@ IL_0013: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -451,9 +435,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -549,9 +531,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(valuetype floatsanddoubles/Double obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype floatsanddoubles/Double obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -570,9 +550,7 @@ IL_0013: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1400,4 +1378,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.release.bsl index ef7f734e3c3..96d5fc64150 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.release.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -130,9 +120,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -228,9 +216,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(valuetype floatsanddoubles/Float obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype floatsanddoubles/Float obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -249,9 +235,7 @@ IL_0013: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -451,9 +435,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -549,9 +531,7 @@ IL_000b: ret } - .method public hidebysig instance bool - Equals(valuetype floatsanddoubles/Double obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype floatsanddoubles/Double obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -570,9 +550,7 @@ IL_0013: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1410,4 +1388,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TailCalls.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TailCalls.fs index 0ab38dcc41e..bc0d963ba6d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TailCalls.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TailCalls.fs @@ -251,7 +251,7 @@ let run() = IL_0040: ldc.i4.s 42 IL_0042: ldc.i4.5 IL_0043: call void TailCall06::foo(int32, - !!0) + !!0) """ ] @@ -276,3 +276,34 @@ let rec countdown n = """ ] + [] + let ``TailCall 08 - No tail call when pinning local byref``() = + FSharp """ +module TailCall08 + +open Microsoft.FSharp.NativeInterop +open System.Runtime.CompilerServices + +[] +let bar (pValue: nativeptr) : unit = + let value = NativePtr.read pValue + printfn "value = %A" value + +[] +let foo() = + let mutable value = 42 + use ptr = fixed &value + bar ptr + +[] +let main _ = + foo() + 0 + """ + |> asExe + |> compileWithTailCalls + |> shouldSucceed + |> run + |> shouldSucceed + |> verifyOutput "value = 42\n" +