Commit Graph

960 Commits

Author SHA1 Message Date
swift-ci
e98182387b Merge remote-tracking branch 'origin/master' into master-next 2017-07-11 12:23:35 -07:00
Joe Groff
101788dbd4 IRGen: Support for computed properties with dependent generic context.
Use the KeyPath implementation's new support for instantiating and dealing with captures to lower the generic context required to dispatch computed accessors with dependent generics.
2017-07-06 20:07:41 -07:00
swift-ci
c076bd8374 Merge remote-tracking branch 'origin/master' into master-next 2017-06-02 19:28:33 -07:00
Arnold Schwaighofer
ca63326e1b Delete unused existential value witnesses from the old existential
implementation

And remove the SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS flag.
2017-06-02 14:34:41 -07:00
swift-ci
fe6e639845 Merge remote-tracking branch 'origin/master' into master-next 2017-05-26 15:48:42 -07:00
Adrian Prantl
5e161736ab Reuse the previous instruction's scope for line 0 locations
for easier-to-read debug info.

This has no practical effect otherwise.
2017-05-26 13:44:19 -07:00
Adrian Prantl
9bde90c3a8 Use range-based for loop. NFC 2017-05-26 13:21:49 -07:00
swift-ci
1daeac92f5 Merge remote-tracking branch 'origin/master' into master-next 2017-05-23 19:10:58 -07:00
Adrian Prantl
05ada87d46 Emit the code to setup debug shadow copies of variables in the same scope
as the variable is in. If ASAN inserts additional basic blocks to sanitize
the store, it will reuse the location and scope. If the scope is not a
descendant of the scope of the variable an optimization in the live debug
values pass will kill all DEBUG_VALUEs and thus prevent them from being
propagated.

rdar://problem/30433661
2017-05-23 17:11:03 -07:00
swift-ci
60798f8110 Merge remote-tracking branch 'origin/master' into master-next 2017-05-12 16:08:30 -07:00
John McCall
6660d18d39 Don't apply dynamic enforcement to empty types.
rdar://32039394
2017-05-12 18:03:02 -04:00
Max Moiseev
614bb13cbf Merge remote-tracking branch 'origin/master' into master-next 2017-05-11 11:29:22 -07:00
John McCall
ab250848b4 Downgrade dynamic exclusivity failures to a warning in Swift 3 compatibility mode. 2017-05-10 14:44:59 -04:00
John McCall
e01c31a17c Remember a PC in the exclusivity-tracking set and report it during failures. 2017-05-10 14:44:56 -04:00
swift-ci
502bda365b Merge remote-tracking branch 'origin/master' into master-next 2017-05-05 13:48:34 -07:00
practicalswift
492f5cd35a [gardening] Remove redundant repetition of type names (DRY): RepeatedTypeName foo = dyn_cast<RepeatedTypeName>(bar)
Replace `NameOfType foo = dyn_cast<NameOfType>(bar)` with DRY version `auto foo = dyn_cast<NameOfType>(bar)`.

The DRY auto version is by far the dominant form already used in the repo, so this PR merely brings the exceptional cases (redundant repetition form) in line with the dominant form (auto form).

See the [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es11-use-auto-to-avoid-redundant-repetition-of-type-names) for a general discussion on why to use `auto` to avoid redundant repetition of type names.
2017-05-05 09:45:53 +02:00
swift-ci
d435c194ba Merge remote-tracking branch 'origin/master' into master-next 2017-05-04 09:28:57 -07:00
adrian-prantl
c6ef8022ae Merge pull request #9195 from adrian-prantl/17260802
Debug info: Represent clang-imported submodules.
2017-05-04 09:20:20 -07:00
swift-ci
3f3f9f6563 Merge remote-tracking branch 'origin/master' into master-next 2017-05-03 14:08:58 -07:00
John McCall
16c500d100 Fix IRGenSIL to always look through DynamicallyEnforcedAddress.
rdar://31964550
2017-05-03 16:01:11 -04:00
Adrian Prantl
0cb4a2865d Refactor/Cleanup IRGenDebugInfo to use a private implementation (NFC) 2017-05-03 08:34:06 -07:00
swift-ci
1378be1c6d Merge remote-tracking branch 'origin/master' into master-next 2017-05-01 15:55:31 -07:00
Joe Shajrawi
0d0cac357a retain_value_addr and release_value_addr SIL instructions: take as an input an address, load the value inside it and call retain_value and release_value respectively 2017-04-30 10:23:55 -07:00
swift-ci
cce9eb4f8d Merge remote-tracking branch 'origin/master' into master-next 2017-04-23 01:48:58 -07:00
John McCall
978f0e05fe Add unpaired access marker instructions and use them to implement
dynamic access tracking in materializeForSet.
2017-04-22 22:52:13 -04:00
swift-ci
4ef7b46971 Merge remote-tracking branch 'origin/master' into master-next 2017-04-21 18:08:32 -07:00
Joe Groff
595e0e4ede Merge branch 'master' into keypaths 2017-04-19 18:38:24 -07:00
swift-ci
000387aa9e Merge remote-tracking branch 'origin/master' into master-next 2017-04-18 16:28:31 -07:00
practicalswift
56a9c88ca6 [gardening] Remove unused method getLoweredDynamicallyEnforcedAddress(SILValue) 2017-04-18 23:22:43 +02:00
swift-ci
ae1eb1197c Merge remote-tracking branch 'origin/master' into master-next 2017-04-18 11:08:33 -07:00
John McCall
6c16cfaa14 Implement a basic dynamic-enforcement runtime and teach IRGen to use it. 2017-04-18 11:23:43 -04: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
Adrian Prantl
88592ecce6 Merge remote-tracking branch 'origin/master' into master-next 2017-04-17 14:24:23 -07:00
adrian-prantl
f2d2ef1e96 Merge pull request #8784 from adrian-prantl/29007471
Debug Info: Emit debug info for Swift types using the default alignment.
2017-04-17 13:16:45 -07:00
Adrian Prantl
8e6d6338ce Emit debug info for Swift types using the default alignment where possible.
This patch emits the alignment for all default-aligned types as 0
which causes the backend to not emit an alignment attribute at
all. This mirrors clang's behavior.

<rdar://problem/29007471>
2017-04-17 11:35:33 -07:00
swift-ci
0142fa1f13 Merge remote-tracking branch 'origin/master' into master-next 2017-04-15 10:08:32 -07:00
practicalswift
65bcc8ff84 [gardening] Use o && isa<T>(o) instead of dyn_cast_or_null<T>(o) when result is unused 2017-04-14 17:33:24 +02: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
swift-ci
5ba89103a7 Merge remote-tracking branch 'origin/master' into master-next 2017-04-11 09:28:31 -07:00
Arnold Schwaighofer
b167b4475d Add SIL and IRGen support for a ConstantStringLiteral instruction
This supports a utf8 or utf16 encoding.

rdar://30545013
2017-04-11 08:43:47 -07:00
Joe Groff
f929c29bdf IRGen: Lower keypath instructions to patterns for the runtime to instantiate. 2017-04-04 11:31:15 -07:00
Joe Groff
638759ac28 SIL: Add a "keypath" instruction for summoning literal keypath objects. 2017-04-04 11:31:15 -07:00
swift-ci
5c5ec5641e Merge remote-tracking branch 'origin/master' into master-next 2017-04-03 01:08:30 -07:00
practicalswift
00ba5dc248 [gardening] Fix typos 2017-04-02 16:23:45 +02:00
swift-ci
f3d88bd1a1 Merge remote-tracking branch 'origin/master' into master-next 2017-03-27 10:29:48 -07:00
adrian-prantl
b433e5339e Merge pull request #8344 from adrian-prantl/31253373
Debugger type mangling: Pass GenericEnvironment separate from DeclContext
2017-03-27 10:13:14 -07:00
swift-ci
69e4b3b579 Merge remote-tracking branch 'origin/master' into master-next 2017-03-26 10:28:42 -07:00
John McCall
57ecaa7fae Add begin_access and end_access instructions.
NFC because we're not actually emitting them.
2017-03-26 04:37:05 -04:00
Adrian Prantl
b872127b66 Debgger type mangling: Pass GenericEnvironment separate from DeclContext.
This fixes a crash while building the Swift standard library when
partial specializations are enabled.

Eventually we should get rid of needing the DeclContext in the mangled
typename at all, and this is one step towards that goal.

rdar://problem/31253373
2017-03-25 14:09:14 -07:00