Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded: specialized witness tables, part2: support remaining cases of class existentials #76874

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Commits on Oct 4, 2024

  1. Configuration menu
    Copy the full SHA
    a629333 View commit details
    Browse the repository at this point in the history
  2. GenericSpecialization: change how new specialized witness tables are …

    …added to MandatoryPerformanceOptimization's worklist
    
    Do it by passing a closure instead of returning the new witness table.
    This allows to add more than one new witness table to the worklist
    eeckstein committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    ee11666 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c84a289 View commit details
    Browse the repository at this point in the history
  4. embedded: Support class existentials with inherited protocols

    For example:
    ```
    protocol Base: AnyObject {}
    protocol Derived: Base {}
    
    class C: Derived {}
    
    let e: Derived = C()
    ```
    eeckstein committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    2cc95fe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    64535df View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9964513 View commit details
    Browse the repository at this point in the history
  7. SILCloner: fix creating a wrong type for cloned witness_method instru…

    …ctions
    
    The type needs to be mapped.
    eeckstein committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    af3d505 View commit details
    Browse the repository at this point in the history
  8. SIL: support specialized witness_method instructions

    In Embedded Swift, witness method lookup is done from specialized witness tables.
    For this to work, the type of witness_method must be specialized as well.
    Otherwise the method call would be done with wrong parameter conventions (indirect instead of direct).
    eeckstein committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    ebfd4bb View commit details
    Browse the repository at this point in the history
  9. IRGen: support associated-type and associated-conformance witness tab…

    …le entries
    
    Associated-type entries are simply skipped.
    Associated-conformance entries point to the specialized conformance witness tables.
    eeckstein committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    db7068e View commit details
    Browse the repository at this point in the history
  10. MandatoryPerformanceOptimizations: specialize witness_method instruct…

    …ions
    
    In Embedded Swift, witness method lookup is done from specialized witness tables.
    For this to work, the type of witness_method must be specialized as well.
    Otherwise the method call would be done with wrong parameter conventions (indirect instead of direct).
    eeckstein committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    2a6dc96 View commit details
    Browse the repository at this point in the history
  11. MandatoryPerformanceOptimizations: handle all kind of witness-table e…

    …ntries when specializing witness-tables
    
    Support associated-type and associated-conformance entries.
    This enable existentials with associated types.
    eeckstein committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    ac44508 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2966d3e View commit details
    Browse the repository at this point in the history
  13. Embedded: support existentials with inherited conformances

    That means: derived classes where the base conforms to a protocol
    eeckstein committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    7beae5a View commit details
    Browse the repository at this point in the history