Commit Graph

9699 Commits

Author SHA1 Message Date
Slava Pestov
3b60ae153d AST: Rename AnyFunctionType::Param::getType() to getOldType() 2018-09-26 11:05:23 -07:00
Slava Pestov
4975f3a15f AST: Remove FunctionType::getInput() 2018-09-26 11:05:23 -07:00
Slava Pestov
34fd5fa6c4 AST: Replace remaining uses of FunctionType::getInput() with getParams() 2018-09-26 11:05:23 -07:00
Slava Pestov
3554da1a18 AST: Redo FunctionType canonicalization and profiling
Use the parameter list instead of the input type.
2018-09-26 11:05:23 -07:00
Harlan
2aac8863f6 [InterfaceGen] Only print 'mutating' and 'nonmutating' on accessors (#19459)
* [InterfaceGen] Only print 'mutating' and 'nonmutating' on accessors

* Add SILGen test for usage of dynamic accessors in and out of interfaces

* Add -enable-objc-interop to dynamic_accessors test
2018-09-25 23:10:52 -07:00
Raj Barik
89d31be7a5 ExistentialSpecializer Pass (without SILCombine/ConcreteType Propagation) 2018-09-25 14:52:00 -07:00
Xi Ge
bc87e9b94a Merge pull request #19511 from nkcsgexi/decl-kind-change
swift-module-digester: diagnose any decl kind changes for nominal types.
2018-09-24 15:41:59 -07:00
Xi Ge
d0cd97e3e5 swift-module-digester: diagnose any decl kind changes for nominal types. 2018-09-24 14:47:19 -07:00
Saleem Abdulrasool
e0e75ead37 Merge pull request #19434 from compnerd/a-stable-future
runtime: remove unnecessary preprocessor condition, flip cases (NFC)
2018-09-24 14:33:41 -07:00
Xi Ge
3b16f34ad4 Merge pull request #19508 from nkcsgexi/include-super-class
swift-module-digester: diagnose super class changes as API breakages
2018-09-24 14:19:55 -07:00
Xi Ge
6e3529050d swift-module-digester: changing super classes is API breaking. 2018-09-24 13:33:26 -07:00
Xi Ge
9db65f8527 swift-module-digester: removing super classes is API breaking. 2018-09-24 12:51:20 -07:00
Jason Mittertreiner
8ac9a657a8 Fix 'operator ==' is ambiguous with MSVC (#19501)
When compiling with MSVC on Windows, this error among other similar
conflicts with AnyValue occur:

Defined the overloads so it selects the correct one.
2018-09-24 12:39:44 -07:00
Xi Ge
ea70b2ed75 Merge pull request #19487 from nkcsgexi/add-prot-req
swift-module-digester: diagnose added protocol requirements
2018-09-23 09:48:25 -07:00
Xi Ge
4e3f8f4784 swift-module-digester: added protocol requirements can be source-breaking. 2018-09-23 08:48:08 -07:00
Arnold Schwaighofer
8f284e5aa1 Merge pull request #19463 from aschwaighofer/fix_silfunctiontype_uniquing
SIL: Profile the witnesMethodConformance as part of the SILFunctionType
2018-09-22 10:47:15 -07:00
Graydon Hoare
72de6e1395 Merge pull request #19189 from graydon/rdar-43804798-implements-binds-tighter-when-protocol-requirement-matches
[SR-8081] Prefer @_implements(P,q) over q, when requirement is P.q exactly.
2018-09-22 00:23:15 -07:00
Xi Ge
2686217bc6 Merge pull request #19477 from nkcsgexi/subscript-digester
swift-module-digester: include SubscriptDecl in the Json dump.
2018-09-21 19:56:53 -07:00
Xi Ge
f72620c3b7 swift-module-digester: removing setter from a property is API breaking. 2018-09-21 18:25:12 -07:00
Pavel Yaskevich
9ce81df7ce Merge pull request #19468 from apple/revert-19447-fix-req-diagnstics-not-to-print-special-names
Revert "[CSDiagnostics] Don't mention special names in requirement diagnostics"
2018-09-21 18:19:41 -07:00
Xi Ge
9c673a539e Merge pull request #19466 from nkcsgexi/assoiciated-type-diag
swift-module-digester: diagnose removing default associated type as API breakage.
2018-09-21 15:40:26 -07:00
Pavel Yaskevich
27d0d26222 Revert "[CSDiagnostics] Don't mention special names in requirement diagnostics" 2018-09-21 14:44:04 -07:00
Graydon Hoare
14db5d2285 [AST] Add and use NominalTypeDecl::LookupDirectFlags rather than booleans. 2018-09-21 14:34:26 -07:00
Graydon Hoare
eb15743657 [SR-8081] Teach full name-lookup codepaths about @_implements. 2018-09-21 14:34:26 -07:00
Pavel Yaskevich
6dc4591a5f Merge pull request #19447 from xedin/fix-req-diagnstics-not-to-print-special-names
[CSDiagnostics] Don't mention special names in requirement diagnostics
2018-09-21 14:17:08 -07:00
Xi Ge
e8c604ff99 swift-module-digester: diagnose removing default associated type as API breakage. 2018-09-21 14:14:39 -07:00
Arnold Schwaighofer
7ba31e36e6 SIL: Profile the witnesMethodConformance as part of the SILFunctionType
We use to return a SILFunctionType with a wrong witness method protocol
conformance e.g when there were base protocols.

rdar://40149340
2018-09-21 13:23:27 -07:00
Michael Gottesman
c62f31f5dc Inject llvm::SmallBitVector into namespace swift;
I also eliminated all llvm:: before SmallBitVector in the code base.
2018-09-21 09:49:25 -07:00
Pavel Yaskevich
02d5401499 [CSDiagnostics] Don't mention special names in requirement diagnostics
Instead of `initializer 'init' of ...` diagnostic should only
mention kind e.g. `initializer of ...` of the declaration
with a special name.
2018-09-21 00:35:21 -07:00
Xi Ge
0ad67cbc57 Merge pull request #19427 from nkcsgexi/diagnose-conformance
swift-module-digester: diagnose adding/removing protocol conformances as API breakages.
2018-09-20 19:00:38 -07:00
Harlan
8ba8222333 [InterfaceGen] Print abstract accessors in protocols (#19379)
* [InterfaceGen] Print abstract accessors in protocols

This patch slightly cleans up printing accessors and ensures we print
accessors abstractly in protocol context for textual interfaces.

It also removes some assuptions around the FunctionBody callback and
makes them more explicit.

* Print getter and setter for didSet decls

* Test _read and _modify

* Fix logic for skipping willSet/didSet

* Update 'final' test for new getter printing behavior
2018-09-20 15:43:01 -07:00
Saleem Abdulrasool
687aeaa37d runtime: remove unnecessary preprocessor condition, flip cases (NFC)
The use of `__APPLE__` is unnecessary as the case is guarded by the
`SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT` preprocessor guard which is implicitly
specific to that environment.  Additionally, flip the condition around so that
the positive (which is the future) appears ahead of the negative case.
2018-09-20 15:27:48 -07:00
Xi Ge
08c8cf14e5 swift-module-digester: diagnose adding/removing protocol conformances as API breakages. 2018-09-20 15:24:19 -07:00
Greg Titus
51ee2b0fc0 Merge pull request #19411 from gregomni/masked_instance_variable
[Sema] QoI: Offer a "self." fixit for assigning to a let which is masking a settable instance variable
2018-09-20 13:44:12 -07:00
gregomni
ffc4f66448 A better note message. 2018-09-20 11:59:35 -07:00
gregomni
b613f130e7 Review feedback - mostly a better error message. 2018-09-20 09:05:30 -07:00
Joe Groff
7d78b09794 Merge pull request #19382 from jckarter/identity-key-path-syntax
Implement the final approved syntax for SE-227 identity key paths.
2018-09-20 08:03:42 -07:00
gregomni
8d70f980b3 Offer a "self." fixit for assigning to a let which is masking an instance variable. 2018-09-19 20:20:45 -07:00
Xi Ge
f1b43ab66e swift-module-digester: diagnose removing default argument as API breakage. 2018-09-19 17:40:00 -07:00
Xi Ge
2f578461d7 Merge pull request #19394 from nkcsgexi/add-abi-decl
swift-module-digester: diagnose adding variables with fixed binary order.
2018-09-19 14:21:58 -07:00
Xi Ge
0658dca6bb swift-module-digester: use non-resilient type consistently across diagnostics. 2018-09-19 13:17:08 -07:00
Xi Ge
b2a159dbf9 swift-module-digester: diagnose adding variables with fixed binary order.
Removing these variables should be detected as API breakages already.
2018-09-19 13:17:08 -07:00
Doug Gregor
32fd274f5e Merge pull request #19391 from DougGregor/assoc-conformance-default-witnesses
[ABI] Associated conformance defaults
2018-09-19 13:15:46 -07:00
Slava Pestov
165f658ad1 Merge pull request #19386 from slavapestov/validate-extension-cleanup
Clean up extension validation
2018-09-19 12:46:46 -07:00
Xi Ge
555ee21781 Merge pull request #19373 from nkcsgexi/diagnose-reorder
swift-module-digester: diagnose reordering and adding decls in fixed layout types.
2018-09-19 11:46:11 -07:00
Joe Groff
93b5de61e7 Implement the final approved syntax for SE-227 identity key paths.
`\.self` is the final chosen syntax. Implement support for this syntax, and remove the stopgap builtin and `WritableKeyPath._identity` property that were in place before.
2018-09-19 11:45:13 -07:00
Doug Gregor
fde7eb5f3d [AST] Record default associated conformance witnesses directly.
Referencing associated conformance witnesses via the index of the
requirement in the requirement signature is inconvenient. Reference
them by CanType/ProtocolDecl* instead.
2018-09-19 10:53:46 -07:00
Slava Pestov
7eed6c482b AST: Remove LazyResolver::bindExtension() 2018-09-19 09:47:36 -07:00
Xi Ge
05e15927a3 swift-module-digester: diagnose reordering of members in a fixed layout type under ABI mode. 2018-09-19 09:36:09 -07:00
Jordan Rose
e1901fdad1 Replace explicit 'delete' calls with std::unique_ptr in AST (#19366) 2018-09-18 19:41:11 -07:00