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: apple/swift-evolution-staging
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: onuniverse/swift-experimental-reflection
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 7 commits
  • 10 files changed
  • 2 contributors

Commits on Jul 9, 2020

  1. KeyPathIterable (#3)

    * KeyPathIterable implementation
    Azoy authored Jul 9, 2020
    Configuration menu
    Copy the full SHA
    e4f7058 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2020

  1. Fix memory leak in key path creation. (#4)

    In `createKeyPath(root:leaf:)`, `_create` creates a key path instance with a +1 reference count. `Unmanaged.passRetained(instance)` bumps up the refcount to +2 and was never balanced. This caused `Reflection` APIs to leak all key paths ever created.  Fixed in this PR by calling `passUnretained(_:)` instead.
    rxwei authored Aug 5, 2020
    Configuration menu
    Copy the full SHA
    ddda067 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2020

  1. Configuration menu
    Copy the full SHA
    43dfbb4 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2020

  1. Fix final class property key paths. (#6)

    Class properties are not always reference-writable. Key paths to `let` properties are just `KeyPath`.
    rxwei authored Nov 11, 2020
    Configuration menu
    Copy the full SHA
    4d746ea View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2020

  1. Support arm64e by handling pointer authentication. (#7)

    Currently this library crashes on arm64e platforms because type context descriptor pointers on arm64e are signed with the process-independent data (DA) key.  This patch adds `PointerAuthenticatedLayoutWrapper` which allows type context descriptors, field descriptors, and field records to store a signed pointer.  The `pointer` getter will strip the signature.
    rxwei authored Nov 15, 2020
    Configuration menu
    Copy the full SHA
    74b9d01 View commit details
    Browse the repository at this point in the history
  2. Use C shims for ptrauth instead of Builtin so that the library doesn'…

    …t have to be built with `-parse-stdlib`. (#8)
    rxwei authored Nov 15, 2020
    Configuration menu
    Copy the full SHA
    798a334 View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2020

  1. [Reflection] Support reflecting existentials. (#9)

    Add support for reflecting existential values and existential metatypes.
    
    New public methods added in `Reflection`:
    ```
    static func allKeyPaths(forUnderlyingTypeOf type: Any.Type) -> [AnyKeyPath]
    static func allKeyPaths(for value: Any) -> [AnyKeyPath]
    static func allNamedKeyPaths(forUnderlyingTypeOf type: Any.Type) -> [(name: String, keyPath: AnyKeyPath)]
    static func allNamedKeyPaths(for value: Any) -> [(name: String, keyPath: AnyKeyPath)]
    ```
    
    Note:
    1. Adding methods for `Any` and `Any.Type` is necessary because key paths constructed for existentials cannot use `PartialKeyPath<Any>` as the type — their base type is the underlying dynamic type, not `Any`.
    2. The argument label `forUnderlyingTypeOf:` cannot be `for:` because type checking overload resolution prefers existential metatypes over generic metatypes.
    rxwei authored Dec 3, 2020
    Configuration menu
    Copy the full SHA
    fbfe100 View commit details
    Browse the repository at this point in the history
Loading