Commit Graph

1063 Commits

Author SHA1 Message Date
swift-ci
5f2fa48109 Merge remote-tracking branch 'origin/master' into master-next 2018-04-27 00:49:12 -07:00
Doug Gregor
b26e983665 [Serialization] Get SubstitutionList directly from a NameAliasType. 2018-04-26 23:38:26 -07:00
Slava Pestov
4d7950a9b2 Serialization: Remove obsolete 'HasUnderlyingModule' hack 2018-04-26 23:37:17 -07:00
swift-ci
fbd50bfa60 Merge remote-tracking branch 'origin/master' into master-next 2018-04-20 00:08:00 -07:00
Pavel Yaskevich
01e8cbd23a [AST] Remove requiresSubstitution invariant from Witness 2018-04-19 18:13:06 -07:00
Pavel Yaskevich
e1fab0559c [Serialization] Always serialize requirement substitutions
Absence of synthetic generic environment should not affect
serialization of the required substitutions because they can
come from outer requirement context for static members.

Resolves: rdar://problem/36497404
2018-04-19 17:58:13 -07:00
swift-ci
56f86aaa4d Merge remote-tracking branch 'origin/master' into master-next 2018-04-18 10:29:08 -07:00
David Zarzycki
a8fbe3a18e [AST] NFC: Repack misc DeclAttribute bits into inline bitfield 2018-04-18 11:25:11 -04:00
swift-ci
2fda5ce1f5 Merge remote-tracking branch 'origin/master' into master-next 2018-04-05 22:53:22 -07:00
Doug Gregor
431dd1c6df Merge pull request #15758 from ikesyo/serialization-using-over-typedef
[gardening][Serialization] Replace `typedef` with `using`
2018-04-05 22:43:11 -07:00
swift-ci
8f0f89053a Merge remote-tracking branch 'origin/master' into master-next 2018-04-05 09:29:49 -07:00
Sho Ikeda
19d5053868 [gardening][Serialization] Replace typedef with using 2018-04-05 13:38:44 +09:00
Joe Groff
9e1a417b56 Serialization: Never serialize conformances from Clang modules.
We should always go through the Clang importer to reinstantiate them. Serializing them leads to the possibility of us ending up with multiple conformances with different identities that ought to be equivalent.
2018-04-03 14:40:26 -07:00
swift-ci
1a436bcb75 Merge remote-tracking branch 'origin/master' into master-next 2018-03-31 10:08:58 -07:00
Andrew Trick
e9d07d88fc Merge pull request #15501 from atrick/add-access-tracking-flag
[exclusivity] Add an access tracking flag.
2018-03-31 10:04:08 -07:00
swift-ci
1c162a567d Merge remote-tracking branch 'origin/master' into master-next 2018-03-31 01:49:02 -07:00
Mark Lacey
21134efd22 Revert "IRGen: Deserialize SIL witness tables and shared-linkage definitions by need." 2018-03-30 22:14:13 -07:00
Andrew Trick
4ed120e46c Merge branch 'master' into add-access-tracking-flag 2018-03-30 19:25:46 -07:00
swift-ci
9121164d82 Merge remote-tracking branch 'origin/master' into master-next 2018-03-30 17:09:01 -07:00
Joe Groff
73895a3f22 Serialization: Never serialize conformances from Clang modules.
We should always go through the Clang importer to reinstantiate them. Serializing them leads to the possibility of us ending up with multiple conformances with different identities that ought to be equivalent.
2018-03-30 11:12:58 -07:00
Andrew Trick
ed8a604c27 Merge branch 'master' into add-access-tracking-flag 2018-03-29 18:26:22 -07:00
swift-ci
00ecedd1b3 Merge remote-tracking branch 'origin/master' into master-next 2018-03-28 11:08:57 -07:00
Robert Widmann
187f6c132f Serialize the resilience expansion of EnumElementDecl's default arguments 2018-03-28 12:13:25 -04:00
swift-ci
e6d70f352e Merge remote-tracking branch 'origin/master' into master-next 2018-03-27 22:08:57 -07:00
Robert Widmann
03580d2fe5 Add a parameter list to EnumElementDecl
This models, but does not plumb through, default arguments.
2018-03-28 00:05:56 -04:00
Andrew Trick
70ee3df099 Serialization support for begin_access [no_nested_conflict].
Add serialization layouts for rare instructions that take extra attributes. We
can continue adding bits to these layout without affecting the layout of the
vast majority of instructions.
2018-03-27 12:04:20 -07:00
swift-ci
29011402dd Merge remote-tracking branch 'origin/master' into master-next 2018-03-26 09:11:11 -07:00
Doug Gregor
b2b69e8abf Rename BoundNameAliasType to NameAliasType.
NameAliasType is dead! Long live NameAliasType!
2018-03-25 21:35:17 -07:00
Doug Gregor
0524741f6c [Serialization] Rename "alias name type" to "builtin alias type".
We still use the old layout for NameAliasType for builtin types, so
rename the Layout struct and corresponding code to describe its new
(more restricted) purpose.
2018-03-25 21:35:16 -07:00
Doug Gregor
c43f96a855 [AST] Remove now-unused NameAliasType. 2018-03-25 21:35:16 -07:00
swift-ci
18f27a5300 Merge remote-tracking branch 'origin/master' into master-next 2018-03-24 19:09:15 -07:00
swift-ci
29788f6245 Merge pull request #14963 from kitasuke/replace-of-builtin-string-with-constant 2018-03-24 18:56:17 -07:00
swift-ci
4c1d212192 Merge remote-tracking branch 'origin/master' into master-next 2018-03-22 13:29:26 -07:00
Doug Gregor
80eae200b6 [AST] Preserve type sugar for generic typealiases
Introduce a new Type node, BoundNameAliasType, which describes a
reference to a typealias that requires substitutions to produce the
underlying type. This new type node is used both for references to
generic typealiases and for references to (non-generic) typealiases
that occur within generic contexts, e.g., Array<Int>.Element.

At present, the new type node is mainly useful in preserving type
sugar for diagnostics purposes, as well as being reflected in other
tools (indexing, code completion, etc.). The intent is to completely
replace NameAliasType in the future.
2018-03-21 23:49:17 -07:00
swift-ci
ccc93e88ee Merge remote-tracking branch 'origin/master' into master-next 2018-03-20 14:14:09 -07:00
Jordan Rose
8a66d998fa Decide if a class inherits convenience inits alongside implicit inits
We have a predicate in ClassDecl, 'inheritsSuperclassInitializers',
that is used in a few places to decide if we need to do lookups into a
superclass to find all relevant initializers. That's useful, but the
actual work being computed in that function is almost identical to the
work done in figuring out whether the class has provided all its
superclass's /required/ initializers, which is part of the type
checker operation 'resolveImplicitConstructors'. Furthermore,
'inheritsSuperclassInitializers' is /already/ calling
'resolveImplicitConstructors' because those implicit constructors
might affect the result.

Simplify this whole mess and prevent further inconsistencies like the
previous commit by just making 'resolveImplicitConstructors' decide
whether superclass convenience initializers are inherited. It does
make that function more complicated, but with the benefit of not
having duplication anymore.

No intended user-visible change, except that this bit is now
serialized instead of being recomputed, which means the module format
changed.
2018-03-19 18:28:41 -07:00
swift-ci
d80ce649ed Merge remote-tracking branch 'origin/master' into master-next 2018-03-16 03:09:03 -07:00
Slava Pestov
30dae65226 AST: Add DeclBaseName::Kind::Constructor
Not used yet.
2018-03-16 00:25:54 -07:00
swift-ci
c1ea75c505 Merge remote-tracking branch 'origin/master' into master-next 2018-03-10 17:48:57 -08:00
Jordan Rose
c26f40b45b Fix some more misuses of LLVM's YAML parser. (#15119)
https://reviews.llvm.org/D44317 should prevent this from happening
again.
2018-03-10 17:47:14 -08:00
swift-ci
97b732d8cc Merge remote-tracking branch 'origin/master' into master-next 2018-03-07 18:29:16 -08:00
Huon Wilson
e307e54098 [AST] Explicitly track things marked __owned. 2018-03-08 12:36:24 +11:00
swift-ci
dcee1f4d47 Merge remote-tracking branch 'origin/master' into master-next 2018-03-02 14:31:02 -08:00
Huon Wilson
12871d75bc [AST] Introduce "ValueOwnership" collecting __shared, inout, etc.
This is designed to stop having to n bits to track each of the
mutually exclusive 'shared', 'inout' and eventually 'owned'.
2018-03-02 11:40:20 -08:00
Huon Wilson
b94c5364f5 [NFC] Rename 'Ownership' to 'ReferenceOwnership'.
There's really two forms of ownership: references and values. Renaming
to make way for better distinguishing of the two.
2018-03-02 11:38:28 -08:00
Adrian Prantl
0747d9a339 Force the DJB hash seed to 0 for compatibility with HashString.
The obsolete llvm::HashString() was equivalent to
llvm::djbHash(seed=0) and was removed from llvm. This patch replaces
all occurences of llvm::HashString() with llvm::djbHash(seed=0), no
functional change.

The default seed of llvm::djbHash() is supposed to yield a higher
quality result that using seed=0, but changing it looks like it
affects the ordering of SIL serialization.
2018-02-28 14:10:25 -08:00
Saleem Abdulrasool
a0c6a70c31 upstream-update: adjust for SVN r326091 2018-02-27 12:36:15 -08:00
Joe Groff
d365c153d4 SIL: Introduce sil_property declarations for property descriptors.
This provides SILGen a place to generate the key path component information for an exported property so that it can be linked to from other modules.
2018-02-23 14:57:45 -08:00
Jordan Rose
af67204b51 [Serialization] Handle XREFs to private types (#14352)
We can encounter these when the compiler modifies an inlinable
function to break apart a struct and the struct uses a private
type for one of its fields. It's questionable whether we /should/
handle this, but meanwhile this /is/ a non-intrusive fix that
preserves the performance of non-resilient libraries.

(That is, it appears this worked in Swift 4.0, though perhaps
not all of the same optimizations kicked in.)

https://bugs.swift.org/browse/SR-6874
2018-02-07 16:42:16 -08:00
Mark Lacey
fdd86fe069 Remove ImplicitlyUnwrappedOptionalType.
We haven't been creating these since
https://github.com/apple/swift/pull/14299 but there was more
groundwork before we could actually remove the type definition.
2018-02-05 23:59:01 -08:00