Skip to content

Typed tree: create a type's augmentation on first use - #20494

Open
auduchinok wants to merge 1 commit into
dotnet:mainfrom
auduchinok:tast-lazyTyconAugmentation
Open

Typed tree: create a type's augmentation on first use#20494
auduchinok wants to merge 1 commit into
dotnet:mainfrom
auduchinok:tast-lazyTyconAugmentation

Conversation

@auduchinok

Copy link
Copy Markdown
Member

Every Entity allocated a TyconAugmentation record at construction. An imported IL type never writes to
it: NewILTycon sets exactly one field, tcaug_closed <- true, and most imported types are never asked
for their contents at all.

solution base MB change MB delta
ReSharper.FSharp 384.86 381.62 -3.24 (-0.84%)
FSharp.Compiler.Service 876.83 875.74 -1.09 (-0.12%)
Oxpecker 130.82 129.77 -1.05 (-0.80%)
Fantomas 349.45 348.68 -0.77 (-0.22%)
FsToolkit.ErrorHandling 161.10 160.37 -0.73 (-0.45%)
IcedTasks 96.48 95.88 -0.60 (-0.62%)
Prime 105.40 105.08 -0.32 (-0.30%)
consoleapp 29.19 29.01 -0.18 (-0.62%)

An entity now starts with no TyconAugmentation and materialises one atomically on the first
TypeContents access, so entities that never gain members hold none. The closed flag moves into
EntityFlags, where it is readable without forcing an augmentation into existence, and remapping
preserves an absent one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

❗ Release notes required

You can open this PR in browser to add release notes: open in github.dev

@auduchinok,

Caution

No release notes found for the changed paths (see table below).

Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format.

The following format is recommended for this repository:

`* . (PR #XXXXX)`

See examples in the files, listed in the table below or in th full documentation at https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html.

If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

Change path Release notes path Description
`src/Compiler` docs/release-notes/.FSharp.Compiler.Service/11.0.100.md No release notes found or release notes format is not correct

@github-actions github-actions Bot added ⚠️ Affects-Compiler-Output Tooling check: PR touches IL emission or codegen ⚠️ Affects-Bootstrap Tooling check: PR touches compiler bootstrap chain labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🔍 Tooling Safety Check — Affects-Bootstrap, Affects-Compiler-Output
Affects-Bootstrap: EntityFlags bit layout and pickle deserialization changed
Affects-Compiler-Output: PickledBits mask altered, IL metadata serialization path modified

Generated by PR Tooling Safety Check · opus46 3.4M ·

@T-Gro T-Gro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Sep 9, 2026
@T-Gro T-Gro added the AI-reviewed PR reviewed by AI review council label Sep 9, 2026
@T-Gro
T-Gro self-requested a review September 9, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ Affects-Bootstrap Tooling check: PR touches compiler bootstrap chain ⚠️ Affects-Compiler-Output Tooling check: PR touches IL emission or codegen AI-reviewed PR reviewed by AI review council

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants