Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
* Fix signature generation: recursive module `do` binding leaking compiler-generated val. ([Issue #13832](https://github.com/dotnet/fsharp/issues/13832), [PR #19586](https://github.com/dotnet/fsharp/pull/19586))
* Fix signature generation: literal values in attribute arguments now preserve literal identifier name. ([Issue #13810](https://github.com/dotnet/fsharp/issues/13810), [PR #19586](https://github.com/dotnet/fsharp/pull/19586))
* Fix signature generation: struct types with non-comparable/non-equatable fields now include `[<NoComparison>]`/`[<NoEquality>]`. ([Issue #15339](https://github.com/dotnet/fsharp/issues/15339), [PR #19586](https://github.com/dotnet/fsharp/pull/19586))
* Fix `MemoryMappedFileViewStream` copying from non-array-backed `ReadOnlyMemory` values by falling back to the safe `Stream.Write` path instead of the unsupported `PositionPointer` fast path. ([Issue #20263](https://github.com/dotnet/fsharp/issues/20263), [PR #20271](https://github.com/dotnet/fsharp/pull/20271))
* Fix signature generation: backtick escaping for identifiers containing backticks. ([Issue #15389](https://github.com/dotnet/fsharp/issues/15389), [PR #19586](https://github.com/dotnet/fsharp/pull/19586))
* Fix signature generation: `private` keyword placement for prefix-style type abbreviations. ([Issue #15560](https://github.com/dotnet/fsharp/issues/15560), [PR #19586](https://github.com/dotnet/fsharp/pull/19586))
* Fix signature generation: missing `[<Class>]` attribute for types without visible constructors. ([Issue #16531](https://github.com/dotnet/fsharp/issues/16531), [PR #19586](https://github.com/dotnet/fsharp/pull/19586))
Expand Down Expand Up @@ -181,6 +182,7 @@
* Direct delegate construction ([PR ##19993](https://github.com/dotnet/fsharp/pull/19993))
* IL: add `ILPreNamespace`, make `ILPreTypeDef` creation lazy ([PR #20092](https://github.com/dotnet/fsharp/pull/20092))
* IL: share ILCallingConv instances ([PR #20254](https://github.com/dotnet/fsharp/pull/20254))
* IL: cache the ILTypeRef of a type def ([PR #20259](https://github.com/dotnet/fsharp/pull/20259))
* IL: use empty tables for members when possible ([PR #20249](https://github.com/dotnet/fsharp/pull/20249))
* Make Entity's adhoc members list lazy ([PR #20286](https://github.com/dotnet/fsharp/pull/20286/changes))

Expand Down
1 change: 1 addition & 0 deletions src/fsharp/docs/release-notes/.VisualStudio/18.vNext.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Improve static compilation of state machines. ([PR #19297](https://github.com/dotnet/fsharp/pull/19297))
* Make Alt+F1 (momentary toggle) work for inlay hints. ([PR #19421](https://github.com/dotnet/fsharp/pull/19421))
* Fix doubled F# diagnostics in tooltips. ([Issue #16360](https://github.com/dotnet/fsharp/issues/16360))
* Fix `NotSupportedException` in the memory-mapped-file optimization when copying `ReadOnlyMemory` into `MemoryMappedFileViewStream`. ([Issue #20263](https://github.com/dotnet/fsharp/issues/20263))

### Changed

Expand Down
9 changes: 8 additions & 1 deletion src/fsharp/src/Compiler/AbstractIL/ilread.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,7 @@ type ILMetadataReader =
seekReadMemberRefAsFieldSpec: MemberRefAsFspecIdx -> ILFieldSpec
seekReadCustomAttr: CustomAttrIdx -> ILAttribute
seekReadTypeRef: int -> ILTypeRef
seekReadTypeDefAsTypeRef: int -> ILTypeRef
seekReadTypeRefAsType: TypeRefAsTypIdx -> ILType
readBlobHeapAsPropertySig: BlobAsPropSigIdx -> ILThisConvention * ILType * ILTypes
readBlobHeapAsFieldSig: BlobAsFieldSigIdx -> ILType
Expand Down Expand Up @@ -2360,7 +2361,10 @@ and seekReadTypeDefAsTypeUncached ctxtH (TypeDefAsTypIdx(boxity, ginst, idx)) =
let ctxt = getHole ctxtH
mkILTy boxity (ILTypeSpec.Create(seekReadTypeDefAsTypeRef ctxt idx, ginst))

and seekReadTypeDefAsTypeRef (ctxt: ILMetadataReader) idx =
and seekReadTypeDefAsTypeRef (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeDefAsTypeRef idx

and seekReadTypeDefAsTypeRefUncached ctxtH idx =
let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()

let enc =
Expand Down Expand Up @@ -4512,6 +4516,8 @@ let openMetadataReader
let cacheTypeDefAsType =
mkCacheGeneric reduceMemoryUsage inbase "TypeDefAsType" (getNumRows TableNames.TypeDef / 20 + 1)

let cacheTypeDefAsTypeRef = mkCacheGeneric false inbase "TypeDefAsTypeRef" 0

let cacheMethodDefAsMethodData =
mkCacheGeneric reduceMemoryUsage inbase "MethodDefAsMethodData" (getNumRows TableNames.Method / 20 + 1)

Expand Down Expand Up @@ -4583,6 +4589,7 @@ let openMetadataReader
seekReadMemberRefAsFieldSpec = seekReadMemberRefAsFieldSpecUncached ctxtH
seekReadCustomAttr = cacheCustomAttr (seekReadCustomAttrUncached ctxtH)
seekReadTypeRef = cacheTypeRef (seekReadTypeRefUncached ctxtH)
seekReadTypeDefAsTypeRef = cacheTypeDefAsTypeRef (seekReadTypeDefAsTypeRefUncached ctxtH)
readBlobHeapAsPropertySig = cacheBlobHeapAsPropertySig (readBlobHeapAsPropertySigUncached ctxtH)
readBlobHeapAsFieldSig = cacheBlobHeapAsFieldSig (readBlobHeapAsFieldSigUncached ctxtH)
readBlobHeapAsMethodSig = cacheBlobHeapAsMethodSig (readBlobHeapAsMethodSigUncached ctxtH)
Expand Down
4 changes: 0 additions & 4 deletions src/fsharp/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ module internal FSharp.Compiler.CheckRecordSyntaxHelpers

open System
open FSharp.Compiler.CheckBasics
open FSharp.Compiler.DiagnosticsLogger
open FSharp.Compiler.Features
open FSharp.Compiler.NameResolution
open FSharp.Compiler.Syntax
open FSharp.Compiler.SyntaxTreeOps
Expand Down Expand Up @@ -121,8 +119,6 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid
| _, [] -> failwith "unreachable"
| accessIds, [ (fieldId, _) ] -> (accessIds, fieldId), exprBeingAssigned
| accessIds, (outerFieldId, item) :: rest ->
checkLanguageFeatureAndRecover cenv.g.langVersion LanguageFeature.NestedCopyAndUpdate (rangeOfLid lid)

CallNameResolutionSink cenv.tcSink (outerFieldId.idRange, env.NameEnv, item, [], ItemOccurrence.Use, env.AccessRights)

let outerFieldId = ident (outerFieldId.idText, outerFieldId.idRange.MakeSynthetic())
Expand Down
Loading
Loading