Skip to content

Commit 00f025c

Browse files
KevinRansompsfinakivzarytovskii
authored
Defaultrealsig (#17385)
Co-authored-by: Petr <[email protected]> Co-authored-by: Vlad Zarytovskii <[email protected]>
1 parent 65ef6a5 commit 00f025c

File tree

13 files changed

+741
-443
lines changed

13 files changed

+741
-443
lines changed

docs/release-notes/.FSharp.Compiler.Service/9.0.100.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### Added
44

55
### Changed
6-
* Change compiler default setting for compressedMetada ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383))
6+
* Change compiler default setting realsig+ when building assemblies ([Issue #17384](https://github.com/dotnet/fsharp/issues/17384), [PR #17378](https://github.com/dotnet/fsharp/pull/17385))
7+
* Change compiler default setting for compressedMetadata ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383))
78

89
### Breaking Changes
9-

docs/release-notes/.FSharp.Core/9.0.100.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
### Added
44

55
### Changed
6-
* Change compiler default setting for compressedMetada ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383))
6+
* Change compiler default setting realsig+ when building assemblies ([Issue #17384](https://github.com/dotnet/fsharp/issues/17384), [PR #17378](https://github.com/dotnet/fsharp/pull/17385))
7+
* Change compiler default setting for compressedMetadata ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383))
78

89
### Breaking Changes
910

src/Compiler/Driver/CompilerConfig.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ type TcConfigBuilder =
822822
DumpGraph = false
823823
}
824824
dumpSignatureData = false
825-
realsig = false
825+
realsig = true
826826
strictIndentation = None
827827
}
828828

src/FSharp.Build/Fsc.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type public Fsc() as this =
5656
let mutable preferredUILang: string MaybeNull = null
5757
let mutable publicSign: bool = false
5858
let mutable provideCommandLineArgs: bool = false
59-
let mutable realsig: bool = false
59+
let mutable realsig: bool = true
6060
let mutable references: ITaskItem[] = [||]
6161
let mutable referencePath: string MaybeNull = null
6262
let mutable refOnly: bool = false

tests/fsharp/Compiler/CodeGen/EmittedIL/DelegateAndFuncOptimizations.fs

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -506,24 +506,30 @@ let ApplyComputedDelegate(c: int) =
506506
""",
507507
(fun verifier -> verifier.VerifyIL [
508508
"""
509-
.method public static int32 ApplyComputedDelegate(int32 c) cil managed
510-
{
511-
512-
.maxstack 4
513-
.locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_0)
514-
IL_0000: ldstr "hello"
515-
IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor(string)
516-
IL_000a: stloc.0
517-
IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()
518-
IL_0010: ldloc.0
519-
IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [runtime]System.IO.TextWriter,
520-
class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<!!0,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
521-
IL_0016: pop
522-
IL_0017: ldarg.0
523-
IL_0018: call int32 ReduceComputedDelegate::f@7(int32)
524-
IL_001d: ldc.i4.3
525-
IL_001e: add
526-
IL_001f: ret
509+
.method public static int32 ApplyComputedDelegate(int32 c) cil managed
510+
{
511+
512+
.maxstack 4
513+
.locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,int32> V_0,
514+
class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_1)
515+
IL_0000: ldsfld class ReduceComputedDelegate/f@7 ReduceComputedDelegate/f@7::@_instance
516+
IL_0005: stloc.0
517+
IL_0006: ldstr "hello"
518+
IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor(string)
519+
IL_0010: stloc.1
520+
IL_0011: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()
521+
IL_0016: ldloc.1
522+
IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [runtime]System.IO.TextWriter,
523+
class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<!!0,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
524+
IL_001c: pop
525+
IL_001d: ldloc.0
526+
IL_001e: ldarg.0
527+
IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,int32>::Invoke(!0)
528+
IL_0024: ldc.i4.3
529+
IL_0025: add
530+
IL_0026: ret
531+
}
532+
527533
}
528534
"""
529535
]))

0 commit comments

Comments
 (0)