Repository navigation
Comparing changes
Open a pull request
base repository: dotnet/fsharp
base: a29233c3e369b7fd1fd6727b5ea7fad656f12e0d
head repository: dotnet/fsharp
compare: df0e60991911eed31f861bb38403a389346055e2
- 5 commits
- 27 files changed
- 4 contributors
Commits on Sep 4, 2026
-
Cache IL method parameter attributes during overload resolution (#20353)
MethInfo.GetParamAttribs rebuilt the full per-parameter attribute list (custom-attr decoding, well-known-attr probes, OptionalArgInfo) from IL metadata on every call and was never cached. On an overload-heavy compile it was called 2.17M times against only 137 distinct underlying methods. Memoize the decode with the existing MemoizationTable, held per compilation via WeakMap.getOrCreate keyed on the ImportMap. The key is the method's physical ILMethodDef plus extension-member use (the C#-style extension view drops the object argument from ParamMetadata, so the two views must not share an entry); canMemoize restricts caching to monomorphic declaring types (an optional arg's default can otherwise depend on the instantiation), matching InfoReader's monomorphic-only caches. Add a regression test covering an IL extension method used with both instance and static call syntax, which shares one ILMethodDef across both views. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 2e832b3 - Browse repository at this point
Copy the full SHA 2e832b3View commit details -
Avoid per-call closure allocation in type-hierarchy traversal (#20384)
FoldHierarchyOfTypeAux runs on a hot path (InfoReader member/property/field lookup and type inference). Its inner 'let rec loop' was handed to List.foldBack / Option.foldBack / List.exists as a partial application, so a fresh closure was allocated on every traversal. Add a ListInline module (illib.fs) with exists / foldBack whose function argument is inlined at the call site via InlineIfLambda, so the closure never materializes. foldBack folds lists up to length five directly (no allocation) and only copies to an array for longer lists, so it stays stack-safe. Length five is measured: over a real compile GetImmediateInterfacesOfType returns <=5 elements ~96% of the time (81% are empty), so short interface lists allocate nothing at all. At the call sites the top-level 'typeEquiv g ty' stays partially applied (the optimizer fuses it after inlining), but the local 'loop' is passed as a lambda so InlineIfLambda inlines it rather than allocating it as a closure. Fold order is unchanged, so visit order, dedup and the ndeep>100 error are preserved; compiler output is byte-identical under --deterministic+. Co-authored-by: perf-bundle <perf@local> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <copilot@github.com> Copilot-Session: c6610fae-a96e-4421-a920-e73de4fc94dc
Configuration menu - View commit details
-
Copy full SHA for c031dc2 - Browse repository at this point
Copy the full SHA c031dc2View commit details -
Remove always-on language feature flag OverloadsForCustomOperations (#…
…20427) Flatten the permanently-enabled LanguageFeature.OverloadsForCustomOperations: delete the DU case, features-map entry, GetFeatureString arm and FSComp string, regenerate xlf, and collapse every enforcement gate to its always-on path. Drops the now-dead customOperationMethodsIndexedByMethodName field and its overload-rejection branch. Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for cc55af8 - Browse repository at this point
Copy the full SHA cc55af8View commit details -
Remove always-on ExtendedFixedBindings language feature flag (#20429)
The ExtendedFixedBindings feature shipped in F# 8.0, the minimum accepted --langversion, so its flag can never be disabled and is dead configuration. Remove the LanguageFeature case, its feature-map entry, GetFeatureString arm, and FSComp resource string, and collapse both guarded paths in TcAndBuildFixedExpr to their always-on behaviour. Regenerated xlf files. Fixes #20194 Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for f28be2b - Browse repository at this point
Copy the full SHA f28be2bView commit details -
Remove the ArithmeticInLiterals language feature flag (#20430)
* Collapse ArithmeticInLiterals enforcement site Remove the always-true suppressLangFeatureCheck threading and checkFeature helper from EvalAttribArgExpr, and delete the now-unused SuppressLanguageFeatureCheck type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove the ArithmeticInLiterals language feature flag and its resources The feature shipped in F# 8.0 and the minimum selectable --langversion is now 8.0, so the flag is permanently enabled dead configuration (#20176). Delete the LanguageFeature DU case, its features-map entry and GetFeatureString arm, the featureArithmeticInLiterals resource string, and regenerate the xlf translation files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for df0e609 - Browse repository at this point
Copy the full SHA df0e609View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff a29233c3e369b7fd1fd6727b5ea7fad656f12e0d...df0e60991911eed31f861bb38403a389346055e2