Commit Graph

160 Commits

Author SHA1 Message Date
Joe Groff
d5cdf658da KeyPaths: Generate _kvcKeyPathString for ObjC-compatible keypaths. 2017-04-21 16:56:17 -07:00
Joe Groff
a6cd471c2b IRGen/stdlib: Instantiate non-generic computed key path components. 2017-04-18 21:51:12 -07:00
Joe Groff
4522cd09aa SILGen: Tweak key path computed property lowering to produce a consistent runtime-callable ABI. 2017-04-18 11:44:39 -07:00
Joe Groff
0bb83bb185 KeyPaths: Support out-of-place instantiation of generic key paths. 2017-04-17 22:36:26 -07:00
Joe Groff
aaddafa55b IRGen: Support for generic key path patterns. 2017-04-17 17:50:57 -07:00
Joe Groff
25eaa09463 wip irgen generic/computed key paths 2017-04-17 11:34:31 -07:00
Joe Groff
9ade487689 SIL: Allow computed components in KeyPathInst.
A computed component needs:

- A stable identifier for equality checking. This can be either a static function reference for concrete property implementations, or a reference into a vtable or witness table for a dynamically dispatched property. This should correspond to a public ABI interface for public things.
- Getter and setter (TODO: and materializeForSet) references. These might be thunks to reach the necessary abstraction level for the keypath implementation, so they can't be used as stable identifiers directly.
2017-04-13 14:18:28 -07:00
Joe Groff
d6ced9d9e4 SIL: Rework KeyPathInst to accommodate computed components.
- Separate out a uniquable KeyPathPattern that describes the context-free shape of the key path, with generic parameters and (eventually) subscript index slots factored out.
- Add component kinds for gettable and settable properties.
2017-04-12 20:09:17 -07:00
Joe Groff
d42f2049f7 KeyPaths: Implement in-place instantiation of invariant key paths.
For key paths without generic or subscript parameterization, we can turn the compiler-generated key path pattern into a global object in-place.
2017-04-05 08:46:45 -07:00
Joe Groff
f929c29bdf IRGen: Lower keypath instructions to patterns for the runtime to instantiate. 2017-04-04 11:31:15 -07:00