Skip to content

Commit b34e992

Browse files
authored
Add TypeFeasiblySubsumesType cache for individual compiler runs
1 parent 6a933f6 commit b34e992

40 files changed

+918
-679
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
* Fix nullness inference for member val and other OO scenarios ([PR #17845](https://github.com/dotnet/fsharp/pull/17845))
1111
* Fix internal error when analyzing incomplete inherit member ([PR #17905](https://github.com/dotnet/fsharp/pull/17905))
1212

13-
1413
### Added
14+
1515
* Deprecate places where `seq` can be omitted. ([Language suggestion #1033](https://github.com/fsharp/fslang-suggestions/issues/1033), [PR #17772](https://github.com/dotnet/fsharp/pull/17772))
1616
* Support literal attribute on decimals ([PR #17769](https://github.com/dotnet/fsharp/pull/17769))
17+
* Added type conversions cache, only enabled for compiler runs, guarded by language version preview ([PR#17668](https://github.com/dotnet/fsharp/pull/17668))
1718

1819
### Changed
1920

docs/release-notes/.Language/preview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* Better generic unmanaged structs handling. ([Language suggestion #692](https://github.com/fsharp/fslang-suggestions/issues/692), [PR #12154](https://github.com/dotnet/fsharp/pull/12154))
44
* Deprecate places where `seq` can be omitted. ([Language suggestion #1033](https://github.com/fsharp/fslang-suggestions/issues/1033), [PR #17772](https://github.com/dotnet/fsharp/pull/17772))
5+
* Added type conversions cache, only enabled for compiler runs ([PR#17668](https://github.com/dotnet/fsharp/pull/17668))
56

67
### Fixed
78

src/Compiler/Checking/Expressions/CheckExpressions.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ open FSharp.Compiler.TypedTreeBasics
4343
open FSharp.Compiler.TypedTreeOps
4444
open FSharp.Compiler.TypeHierarchy
4545
open FSharp.Compiler.TypeRelations
46+
open Import
4647

4748
#if !NO_TYPEPROVIDERS
4849
open FSharp.Compiler.TypeProviders

src/Compiler/Checking/InfoReader.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ open FSharp.Compiler.TypedTreeOps
2424
open FSharp.Compiler.TypedTreeBasics
2525
open FSharp.Compiler.TypeHierarchy
2626
open FSharp.Compiler.TypeRelations
27+
open Import
2728

2829
/// Use the given function to select some of the member values from the members of an F# type
2930
let SelectImmediateMemberVals g optFilter f withExplicitImpl (tcref: TyconRef) =

src/Compiler/Checking/MethodOverrides.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ exception TypeIsImplicitlyAbstract of range
107107
exception OverrideDoesntOverride of DisplayEnv * OverrideInfo * MethInfo option * TcGlobals * Import.ImportMap * range
108108

109109
module DispatchSlotChecking =
110+
open Import
110111

111112
/// Print the signature of an override to a buffer as part of an error message
112113
let PrintOverrideToBuffer denv os (Override(_, _, id, methTypars, memberToParentInst, argTys, retTy, _, _, _)) =

src/Compiler/Checking/NicePrint.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,7 @@ module TastDefinitionPrinting =
20452045
(not vref.IsCompilerGenerated) &&
20462046
(denv.showObsoleteMembers || not (CheckFSharpAttributesForObsolete denv.g vref.Attribs)) &&
20472047
(denv.showHiddenMembers || not (CheckFSharpAttributesForHidden denv.g vref.Attribs))
2048-
2048+
20492049
let ctors =
20502050
GetIntrinsicConstructorInfosOfType infoReader m ty
20512051
|> List.filter (fun minfo -> IsMethInfoAccessible amap m ad minfo && not minfo.IsClassConstructor && shouldShow minfo.ArbitraryValRef)
@@ -2057,7 +2057,7 @@ module TastDefinitionPrinting =
20572057
tycon.ImmediateInterfacesOfFSharpTycon
20582058
|> List.filter (fun (_, compgen, _) -> not compgen)
20592059
|> List.map p13
2060-
else
2060+
else
20612061
GetImmediateInterfacesOfType SkipUnrefInterfaces.Yes g amap m ty
20622062

20632063
let iimplsLs =

src/Compiler/Checking/PatternMatchCompilation.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ open FSharp.Compiler.TypedTreeOps
2424
open FSharp.Compiler.TypedTreeOps.DebugPrint
2525
open FSharp.Compiler.TypeRelations
2626
open type System.MemoryExtensions
27+
open Import
2728

2829
exception MatchIncomplete of bool * (string * bool) option * range
2930
exception RuleNeverMatched of range

0 commit comments

Comments
 (0)