Commit Graph

2774 Commits

Author SHA1 Message Date
swift-ci
e99fdb8f07 Merge remote-tracking branch 'origin/master' into master-next 2018-03-30 13:48:46 -07:00
Arnold Schwaighofer
80e7a1914d Add a convert_escape_to_noescape [not_guaranteed] variant 2018-03-30 08:53:40 -07:00
swift-ci
3466e93d25 Merge remote-tracking branch 'origin/master' into master-next 2018-03-29 19:09:12 -07:00
Slava Pestov
d1c6e1d24a SIL: Generalize default witness tables now that defaulted witnesses don't have to go at the end
NFC until the new witness table instantiation mechanism is enabled.
2018-03-29 14:03:58 -07:00
swift-ci
3e53228828 Merge remote-tracking branch 'origin/master' into master-next 2018-03-28 15:09:15 -07:00
Davide Italiano
dfaf133d27 [LoadableByAddress] Fix debug info holes when expanding alloc_stack.
<rdar://problem/36876376>
2018-03-28 11:54:03 -07:00
swift-ci
7d334ee930 Merge remote-tracking branch 'origin/master' into master-next 2018-03-27 16:43:30 -07:00
Vedant Kumar
80ed3cf0a2 Merge pull request #15552 from dcci/diholesloosen
[SILVerifier] Loosen verification for debug info scopes holes.
2018-03-27 16:43:16 -07:00
swift-ci
cb0c88cf09 Merge remote-tracking branch 'origin/master' into master-next 2018-03-27 16:24:45 -07:00
Davide Italiano
47115e6dbd [SILVerifier] Loosen verification for debug info scopes holes.
We should also skip debug info as they don't really are lowered
to anything real. Add an helper so that we can use it in passes
as well.
2018-03-27 13:54:57 -07:00
Joe Shajrawi
a539c8f11d SILType: rename isLoadableOrLowered to isLoadableOrOpaque 2018-03-27 13:43:57 -07:00
swift-ci
57e22b2220 Merge remote-tracking branch 'origin/master' into master-next 2018-03-27 12:30:55 -07:00
Joe Shajrawi
ad3775b647 Merge pull request #15525 from shajrawi/builder_asserts
Add asserts to SIL Instruction Builder functions that should only take loadable types
2018-03-27 12:20:32 -07:00
Joe Shajrawi
4fca6b482c Add isLoadableOrLowered to SILType for use in the Builder 2018-03-27 11:16:27 -07:00
swift-ci
6620cab20d Merge remote-tracking branch 'origin/master' into master-next 2018-03-27 03:05:50 -07:00
Slava Pestov
98d74bd555 SIL: Header gardening 2018-03-27 01:43:26 -07:00
Slava Pestov
498e6dc165 SIL: Remove FormalLinkage::HiddenNonUnique 2018-03-27 01:43:07 -07:00
Joe Shajrawi
b26023b433 Add asserts to SIL Instruction Builder functions that should only take loadable types. 2018-03-26 15:33:57 -07:00
swift-ci
055f19d32b Merge remote-tracking branch 'origin/master' into master-next 2018-03-24 15:49:05 -07:00
Michael Gottesman
1e28119038 [gardening] SILGLobalVariable => SILGlobalVariable. 2018-03-24 13:45:15 -07:00
swift-ci
47e75bf7c0 Merge remote-tracking branch 'origin/master' into master-next 2018-03-23 20:23:04 -07:00
Slava Pestov
c35d1f5fc7 SIL: Remove unused code for optional (non-@objc) protocol requirements 2018-03-23 18:59:06 -06:00
swift-ci
6ad76369c9 Merge remote-tracking branch 'origin/master' into master-next 2018-03-23 13:11:30 -07:00
Joe Groff
8b9ffd8033 Merge pull request #15438 from jckarter/property-descriptor-irgen
IRGen: Lower property descriptors.
2018-03-23 12:51:51 -07:00
Joe Groff
02b23d0d96 IRGen: Lower property descriptors.
Factor out the code generation for key path components so we can reuse it to generate the component representing a key path.
2018-03-23 08:46:37 -07:00
swift-ci
08038c99b0 Merge remote-tracking branch 'origin/master' into master-next 2018-03-18 01:29:22 -07:00
Slava Pestov
fb499ca06d SIL: Don't emit destroy_value instructions for enum cases without payloads 2018-03-18 00:13:55 -07:00
swift-ci
860b409021 Merge remote-tracking branch 'origin/master' into master-next 2018-03-14 14:53:53 -07:00
Joe Groff
a795b4fc0c SIL: Move responsibility for external keypath equals/hash to the caller.
A public subscript might have generic indexes that aren't unconditionally Hashable, or might use indexes that are retroactively made Hashable, so the property descriptor on the implementer's side can't always resiliently provide this information to the final instantiated KeyPath.
2018-03-14 14:05:49 -07:00
swift-ci
f8705978ae Merge remote-tracking branch 'origin/master' into master-next 2018-03-12 15:29:12 -07:00
Vedant Kumar
f9372fdb62 [DebugInfo] Improve stepping behavior for switch case stmts
Assign the location of a switch statement's subject expression to all of
its case statements.

This improves the debugger's stepping behavior in switch statements.
Stepping into a switch now goes directly to the first matching case
(possibly one with a `where` clause that may or may not match). It's
still possible to set breakpoints within `where` clauses.

rdar://35628672
2018-03-12 15:21:46 -07:00
swift-ci
ea9057590a Merge remote-tracking branch 'origin/master' into master-next 2018-03-12 09:09:40 -07:00
Doug Gregor
d138575da2 Merge pull request #15170 from ikesyo/enum-class-uint8_t
[gardening][enum class] Replace `unsigned char` with `uint8_t` for consistency
2018-03-12 09:05:13 -07:00
swift-ci
7fb186fece Merge remote-tracking branch 'origin/master' into master-next 2018-03-11 23:29:00 -07:00
Andrew Trick
9703d56e03 [exclusivity] Remove dead access markers after optimization.
Generalized to handle scope markers which will become common with future
ownership and lifetime dependence markers.
2018-03-11 23:13:30 -07:00
Sho Ikeda
422136e1a2 [gardening][enum class] Replace unsigned char with uint8_t for consistency
Before the changes:

- `git grep -E "enum class .+ : uint8_t \{" | wc -l`: 90
- `git grep -E "enum class .+ : unsigned char \{" | wc -l`: 26
2018-03-12 13:57:36 +09:00
swift-ci
c233241fc3 Merge remote-tracking branch 'origin/master' into master-next 2018-03-11 14:28:52 -07:00
Andrew Trick
defc710f8b [exclusivity] Teach LetPropertiesOpt how to handle begin_access. 2018-03-11 14:20:39 -07:00
swift-ci
ecd7a48bb2 Merge remote-tracking branch 'origin/master' into master-next 2018-03-09 09:49:07 -08:00
swift-ci
d18d9d8455 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-03-09 09:38:10 -08:00
Arnold Schwaighofer
1e4f55de8d Merge pull request #15046 from aschwaighofer/without_actually_escaping_verification
Implement withoutActuallyEscaping verification
2018-03-09 09:34:06 -08:00
swift-ci
36b254df94 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-03-08 01:58:15 -08:00
swift-ci
52a9d71e70 Merge remote-tracking branch 'origin/master' into master-next 2018-03-08 01:49:10 -08:00
Sho Ikeda
74ba135008 Merge pull request #15040 from ikesyo/gardening-not-empty
[gardening] Use `!empty()` over `size() > 0`
2018-03-08 18:47:12 +09:00
Bob Wilson
1dce60b2a6 Merge remote-tracking branch 'origin/master' into master-next 2018-03-07 17:02:53 -08:00
Bob Wilson
b5b4b7946c Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-03-07 16:59:30 -08:00
Joe Groff
2d194e7765 Merge pull request #15034 from jckarter/keypath-resilience-silgen
SILGen: Emit property descriptors for (some) decls that need them.
2018-03-07 16:49:36 -08:00
Sho Ikeda
cea6c03eb2 [gardening] Use !empty() over size() > 0 2018-03-08 09:21:09 +09:00
Joe Groff
a8e3c4fc8b SILGen: Emit property descriptors for (some) decls that need them.
If a property or subscript is referenceable from other modules, we need to give it a descriptor so that we can reliably build an equivalent key path in or out of that module.

There are some cases that we should handle but don't yet:

- Global and static properties ought to be key-path-able someday, so we should make descriptors for them, but this might need a new key path component kind.
- Subscripts with indexes that aren't Hashable in the current module ought to get descriptors too, in case we ever support non-hashable key path components, and also because a generic subscript might be substituted with Hashable types by an external user, or an external module might post-hoc extend a type to be Hashable, so we really need to change things so that the client supplies the hashing and equality implementations for the indexes instead of the descriptor.
2018-03-07 15:32:12 -08:00
Arnold Schwaighofer
89e972f5a8 SILGen: Implement withoutActuallyEscaping verification
Check that an ``withoutActuallyEscaping(noescape_closure) { // scope}`` closure
has not escaped in the scope using the ``is_escaping_closure %closure``
instruction.

rdar://35525730
2018-03-07 09:00:12 -08:00