Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dotnet/fsharp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a29233c3e369b7fd1fd6727b5ea7fad656f12e0d
Choose a base ref
...
head repository: dotnet/fsharp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: df0e60991911eed31f861bb38403a389346055e2
Choose a head ref
  • 5 commits
  • 27 files changed
  • 4 contributors

Commits on Sep 4, 2026

  1. 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>
    T-Gro and Copilot authored Sep 4, 2026
    Configuration menu
    Copy the full SHA
    2e832b3 View commit details
    Browse the repository at this point in the history
  2. 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
    4 people authored Sep 4, 2026
    Configuration menu
    Copy the full SHA
    c031dc2 View commit details
    Browse the repository at this point in the history
  3. 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>
    3 people authored Sep 4, 2026
    Configuration menu
    Copy the full SHA
    cc55af8 View commit details
    Browse the repository at this point in the history
  4. 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>
    3 people authored Sep 4, 2026
    Configuration menu
    Copy the full SHA
    f28be2b View commit details
    Browse the repository at this point in the history
  5. 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>
    3 people authored Sep 4, 2026
    Configuration menu
    Copy the full SHA
    df0e609 View commit details
    Browse the repository at this point in the history
Loading