Commit Graph

21 Commits

Author SHA1 Message Date
taylor swift
c85880899d implement SE 184: add allocation methods to Unsafe buffer pointers, drop all parameters from deallocation, adjust namings, and add repeated-value assignment methods 2017-11-17 21:28:03 -08:00
Greg Parker
9a38e609af [IRGen][runtime] Reduce object header to 8 bytes on 32-bit platforms. (#12790)
SR-4353, rdar://29765800
2017-11-08 02:50:11 -08:00
Joe Groff
2ba8f57514 Remove staging flag for unimplemented key path components.
All the originally-planned component kinds are now implemented.
2017-09-15 11:55:35 -07:00
Joe Groff
c142e7d953 KeyPaths: Support captured arguments in computed components.
A necessary precursor to supporting subscripts and unspecialized generic accessors in general. Give get/set components the ability to have an "argument" area that gets instantiated by copying out of the key path pattern arguments at instantiation time, and which holds "witness" information for how to copy, destroy, equate, and hash arguments.
2017-07-06 20:07:41 -07:00
Joe Groff
752beac4f1 KeyPaths: Pointer-align pointer fields within key path patterns.
To get the full benefit of dyld3 on Darwin platforms, pointer relocations need to be pointer-aligned, which unfortunately requires growing some key path data structures a little bit. This does tidy up some code that had to hack around our lack of unaligned load/store operations on UnsafeRawPointer, at least. While we're here, we can also simplify the identification strategy for reabstracted stored properties; we only need the property index to identify, not the absolute offset. rdar://problem/32318829
2017-06-20 14:42:05 -07:00
Robert Widmann
71bf312a25 Migrate the rest of the tests to %empty-directory 2017-06-04 11:08:39 -07:00
Joe Groff
faa6bc72f0 Sema: Reject unimplemented key path components during resolveKeyPathExpr.
This is a bit more robust and user-friendly than hoping more brittle recovery in SILGen or IRGen for unsupported components kicks in. rdar://problem/32200714
2017-05-15 16:10:59 -07:00
Joe Groff
63c8123a22 Remove workarounds for 31725007 from KeyPathImplementation test. 2017-05-09 10:52:57 -07:00
Joe Groff
525001f7a7 Support key paths on 32-bit platforms.
I had optimistically written the code here optimistically hoping #7837 would land in time for me to merge, but that didn't happen, so adjust some things to match the current 12-byte object header size on 32-bit, and introduce some ABI constants for the expected 32- and 64-bit object header sizes we can assert against so that we have some robustness when it eventually changes again. Implements rdar://problem/31768303.
2017-05-02 18:19:07 -07:00
Joe Groff
224120f54b SIL: Don't DFE functions referenced from KeyPath patterns.
Fixes rdar://problem/31776015.
2017-05-01 17:32:50 -07:00
Bob Wilson
32ff6de1cb Change REQUIRES arguments to work with recent LLVM versions
With more recent versions of LLVM (e.g., used with master-next) the
argument of REQUIRES is parsed as an expression. Do not use "rdar"
URLS for these since it confuses lit.
2017-05-01 15:15:22 -07:00
Erik Eckstein
d2da58363d Disabled KeyPath tests, because they are failing on many bots
rdar://problem/31776015
2017-04-22 19:08:39 -07:00
Joe Groff
c742f88434 Work around a bug in the closure specializer with methods that return Self and take closure arguments (rdar://problem/31725007) 2017-04-20 08:53:55 -07:00
Joe Groff
cdb54ccadf Put keypaths behind a flag. 2017-04-19 20:39:11 -07:00
Joe Groff
e9f70732a6 Mark execution tests for keypaths with PTRSIZE=64 requirement.
Landing 32-bit support requires some additional work, and relies on Greg finalizing the 8-byte rc header.
2017-04-19 18:23:46 -07:00
Joe Groff
39a0849362 SILGen: Codegen for key path applications. 2017-04-09 16:38:34 -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
5ed6bd831e KeyPaths: Dynamic appending between possibly-mismatched types.
Make the `appending` operation between `AnyKeyPath` and `PartialKeyPath` values work. Add a test checking the combinations.
2017-04-04 11:31:15 -07:00
Joe Groff
895ce94ae5 KeyPaths: implement "appending" 2017-04-04 11:31:15 -07:00
Joe Groff
04a6d23f7e KeyPaths: Equatable/Hashable implementation. 2017-04-04 11:31:15 -07:00
Joe Groff
cdbdb7a6e8 stdlib: Skeleton implementation of proposed KeyPath API.
Handles projection of stored struct and class properties. Most other functionality TODO.
2017-04-04 11:31:15 -07:00