Skip to content

Commit

Permalink
Defaultrealsig (#17385)
Browse files Browse the repository at this point in the history
Co-authored-by: Petr <psfinaki@users.noreply.github.com>
Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
  • Loading branch information
3 people authored Jul 8, 2024
1 parent 65ef6a5 commit 00f025c
Show file tree
Hide file tree
Showing 13 changed files with 741 additions and 443 deletions.
4 changes: 2 additions & 2 deletions docs/release-notes/.FSharp.Compiler.Service/9.0.100.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Added

### Changed
* Change compiler default setting for compressedMetada ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383))
* 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))
* Change compiler default setting for compressedMetadata ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383))

### Breaking Changes

3 changes: 2 additions & 1 deletion docs/release-notes/.FSharp.Core/9.0.100.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
### Added

### Changed
* Change compiler default setting for compressedMetada ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383))
* 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))
* Change compiler default setting for compressedMetadata ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383))

### Breaking Changes

2 changes: 1 addition & 1 deletion src/Compiler/Driver/CompilerConfig.fs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ type TcConfigBuilder =
DumpGraph = false
}
dumpSignatureData = false
realsig = false
realsig = true
strictIndentation = None
}

Expand Down
2 changes: 1 addition & 1 deletion src/FSharp.Build/Fsc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type public Fsc() as this =
let mutable preferredUILang: string MaybeNull = null
let mutable publicSign: bool = false
let mutable provideCommandLineArgs: bool = false
let mutable realsig: bool = false
let mutable realsig: bool = true
let mutable references: ITaskItem[] = [||]
let mutable referencePath: string MaybeNull = null
let mutable refOnly: bool = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,24 +506,30 @@ let ApplyComputedDelegate(c: int) =
""",
(fun verifier -> verifier.VerifyIL [
"""
.method public static int32 ApplyComputedDelegate(int32 c) cil managed
{
.maxstack 4
.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)
IL_0000: ldstr "hello"
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)
IL_000a: stloc.0
IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()
IL_0010: ldloc.0
IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [runtime]System.IO.TextWriter,
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>)
IL_0016: pop
IL_0017: ldarg.0
IL_0018: call int32 ReduceComputedDelegate::f@7(int32)
IL_001d: ldc.i4.3
IL_001e: add
IL_001f: ret
.method public static int32 ApplyComputedDelegate(int32 c) cil managed
{
.maxstack 4
.locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,int32> V_0,
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)
IL_0000: ldsfld class ReduceComputedDelegate/f@7 ReduceComputedDelegate/f@7::@_instance
IL_0005: stloc.0
IL_0006: ldstr "hello"
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)
IL_0010: stloc.1
IL_0011: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()
IL_0016: ldloc.1
IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [runtime]System.IO.TextWriter,
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>)
IL_001c: pop
IL_001d: ldloc.0
IL_001e: ldarg.0
IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,int32>::Invoke(!0)
IL_0024: ldc.i4.3
IL_0025: add
IL_0026: ret
}
}
"""
]))
Expand Down
Loading

0 comments on commit 00f025c

Please sign in to comment.