Commit Graph

3168 Commits

Author SHA1 Message Date
swift-ci
6d2515053f Merge remote-tracking branch 'origin/master' into master-next 2017-04-17 19:48:31 -07:00
Michael Gottesman
aa76c2a5e6 [silgen] (mark_uninitialized (project_box (alloc_box))) -> (project_box (mark_uninitialized (alloc_box)))
I put in a simple fixup pass (MarkUninitializedFixup) for staging purposes. I
don't expect it to be in tree long. I just did not feel comfortable fixing up in
1 commit all of the passes up to DI.

rdar://31521023
2017-04-17 17:45:54 -07:00
swift-ci
0a7a14e29c Merge remote-tracking branch 'origin/master' into master-next 2017-04-17 16:28:36 -07:00
Roman Levenstein
9463b60973 Merge pull request #8792 from swiftix/wip-canonical-conformances
Add a functionality to produce canonical conformances and substitutions to fix a bug with SILBoxType’s generic arguments
2017-04-17 16:13:20 -07:00
John McCall
82c2d11632 Allow dynamic access markers in non-raw SIL. 2017-04-17 17:16:13 -04:00
Roman Levenstein
07d779058a Address review comments
- Avoid unnecessary memory allocation
- Fix spelling errors
- Some further minor fixes
2017-04-17 11:44:57 -07:00
swift-ci
0142fa1f13 Merge remote-tracking branch 'origin/master' into master-next 2017-04-15 10:08:32 -07:00
practicalswift
b8ca098949 Merge pull request #8742 from practicalswift/gardening-20170413
[gardening] Use consistent headers. Remove redundant includes. Remove unused methods. Fix typos, etc.
2017-04-15 18:59:30 +02:00
Joe Groff
ee66ff35c5 SILGen: Lower computed property key path components. 2017-04-14 17:13:38 -07:00
swift-ci
c2966bc00d Merge remote-tracking branch 'origin/master' into master-next 2017-04-14 13:48:32 -07:00
Huon Wilson
754d74ab8f Merge pull request #8753 from huonw/open-public-class-methods
Only `open`, not `public`, classes need public symbols
2017-04-14 13:35:00 -07:00
Huon Wilson
64ba6f0379 [SIL] Overriding final decls can behave like non-overriding ones. 2017-04-14 10:13:12 -07:00
Huon Wilson
c41319b24b [SIL] Only open classes can be subclassed externally. 2017-04-14 10:13:11 -07:00
practicalswift
d8d1693814 [gardening] Remove unused variables 2017-04-14 17:33:24 +02:00
swift-ci
49e3cfb16f Merge remote-tracking branch 'origin/master' into master-next 2017-04-13 23:48:31 -07:00
Slava Pestov
d58f049608 AST: Introduce ASTContext::getAnyObjectType()
This replaces a number of usages of KnownProtocolKind::AnyObject,
which is soon going away.
2017-04-13 21:17:05 -07:00
swift-ci
cf34d0d2c6 Merge remote-tracking branch 'origin/master' into master-next 2017-04-13 19:28:43 -07:00
Michael Gottesman
3b32ee8972 Merge pull request #8702 from gottesmm/move_ome_past_no_return_folding
[semantic-sil] Move the ownership model eliminator past no return folding.
2017-04-13 19:15:54 -07:00
swift-ci
05aff8998a Merge remote-tracking branch 'origin/master' into master-next 2017-04-13 14:28: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
Huon Wilson
b59f95418c [SIL] Extract ClassVisibility from SILFunction to SubclassScope in SILLinkage. 2017-04-13 14:17:29 -07:00
Slava Pestov
4da14393fa SILGen: Catch an unnecessary mapTypeIntoContext() call 2017-04-13 13:45:54 -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
swift-ci
87d4dcd450 Merge remote-tracking branch 'origin/master' into master-next 2017-04-12 11:48:31 -07:00
Slava Pestov
374db66e8b Merge pull request #8685 from slavapestov/subclass-existentials-silgen
Preliminary SILGen support for subclass existentials (SE-0156)
2017-04-12 11:44:23 -07:00
swift-ci
c523ca44ad Merge remote-tracking branch 'origin/master' into master-next 2017-04-12 01:08:31 -07:00
practicalswift
7684e73388 Merge pull request #8706 from practicalswift/excess-logic
[gardening] Remove redundant logic
2017-04-12 09:51:49 +02:00
Slava Pestov
67ec712457 SIL: Type lowering for subclass existentials 2017-04-12 00:07:30 -07:00
swift-ci
8e6fba75d9 Merge remote-tracking branch 'origin/master' into master-next 2017-04-11 18:48:44 -07:00
John McCall
5e81948c01 Merge pull request #8713 from rjmccall/access-of-global-variable
Fix SILVerifier for begin_access on global variables
2017-04-11 21:38:35 -04:00
swift-ci
a3c0774165 Merge remote-tracking branch 'origin/master' into master-next 2017-04-11 18:28:33 -07:00
Andrew Trick
b308daf311 [SILOpt] fix the ASAN issue in the new pass completely.
LLVM's ilist::erase is actually correct. It just implements a nonstandard remove
method that modifies it's iterator argument.

I forgot to add "continue" statements when fixing the iterator-invalidation problem.
2017-04-11 15:48:24 -07:00
John McCall
b50c1b0a97 Fix SILVerifier for begin_access on global variables. 2017-04-11 18:38:58 -04:00
practicalswift
5e255e07d7 [gardening] Remove redundant logic 2017-04-11 23:04:55 +02:00
Michael Gottesman
e7b8865696 [semantic-sil] Move the ownership model eliminator past no return folding.
rdar://31521023
2017-04-11 11:43:19 -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
swift-ci
b8471e6555 Merge remote-tracking branch 'origin/master' into master-next 2017-04-11 00:28:32 -07:00
Andrew Trick
9cb7b4f679 Correctly implement SILBasicBlock::erase().
LLVM ilist::erase does not return the following iterator the way an STL list
would. Compensate by computing the next iterator and ignoring LLVM's result.

I expect this to fix the ASAN bots:
<rdar://problem/31550303> OSS Swift CI ASAN bot fails on AccessMarker tests.
2017-04-11 00:06:32 -07:00
swift-ci
a2abf3b876 Merge remote-tracking branch 'origin/master' into master-next 2017-04-10 14:48:43 -07:00
Andrew Trick
2eb6d48b1c [AccessMarker] Fix a reverse instruction iterator.
I reversed this loop's direction over the instruction list and forgot to change
the order of erasing an instruction with respect to advancing the iterator.

Thankfully ASAN is far smarter than I.

Converting between forward/reverse iterators makes the loop unreadable.
Add an iterator return value to BasicBlock::erase(SILInstruction*).
2017-04-10 14:08:59 -07:00
swift-ci
6df122082f Merge remote-tracking branch 'origin/master' into master-next 2017-04-10 09:48:31 -07:00
Andrew Trick
44110e361d Add a HasAccessMarkers flag to SILFunction.
This allows the verifier to be run before and after marker elimination.
2017-04-10 09:47:50 -07:00
Andrew Trick
41b388d954 Verify support for -enforce-exclusivity=checked.
Fix a verifier assert and add a test case for begin/end access markers.
2017-04-10 09:47:50 -07:00
Joe Groff
85ad6b355e Merge branch 'master' into keypaths 2017-04-06 18:02:07 -07:00
swift-ci
db30f2f71c Merge remote-tracking branch 'origin/master' into master-next 2017-04-05 20:08:31 -07:00
Andrew Trick
7ea54c8927 SILPrintContext: support for printing consistent block numbers. 2017-04-05 19:59:15 -07:00
Bob Wilson
c6e37c1f0a Merge remote-tracking branch 'origin/master' into master-next 2017-04-05 17:26:52 -07:00
Huon Wilson
31b92b1b46 Merge pull request #8473 from huonw/symbol-list-2
Remove dependency on IRGenModule of some linkage computations
2017-04-05 16:39:04 -07:00
swift-ci
0f1ac0abef Merge remote-tracking branch 'origin/master' into master-next 2017-04-05 15:48:32 -07:00