Commit Graph

282 Commits

Author SHA1 Message Date
Huon Wilson
cfc5abdaa2 [TBDGen] Emit the symbol for autolink-force-load-ing.
Fixes rdar://problem/40356032.
2018-05-23 10:56:49 +10:00
Huon Wilson
38e45c4be5 [TBDGen] Take options as a struct instead of arguments. 2018-05-23 00:02:15 +10:00
Huon Wilson
4385d9042c [TBDGen] Types with resilient superclasses need special consideration for their metadata.
Fixes rdar://problem/40355432.
2018-05-21 22:45:31 +10:00
Huon Wilson
bf8288002d [TBDGen] @_cdecl still exists, and adds symbols.
Fixes rdar://problem/40405377.
2018-05-21 22:45:30 +10:00
Huon Wilson
27a72099eb [TBDGen] Enums are nominal types too.
Fixes rdar://problem/40235179&40353886&40355242 .
2018-05-21 22:45:30 +10:00
Arnold Schwaighofer
1bea36844e TBDGen: Use isResilient() api 2018-04-06 13:39:14 -07:00
Arnold Schwaighofer
c17829cd9d TBDGen: Add resilient enum case emission support
rdar://38707747
2018-04-06 11:57:49 -07:00
Slava Pestov
487754f080 TBD: Stored property initializers can be public 2018-03-14 19:17:36 -07:00
John McCall
dd99536d31 Move the metadata-pattern header into the type context descriptor.
This is yet another waypoint on the path towards the final
generic-metadata design.  The immediate goal is to make the
pattern a private implementation detail and to give the runtime
more visibility into the allocation and caching of generic types.
2018-02-26 12:10:24 -05:00
Doug Gregor
e766473ed9 [ABI] Emit separate symbols for protocol conformance descriptors.
Emit protocol conformance descriptors as separate symbols, rather than
inlining them within the section for protocol conformance records. We
want separate symbols for protocol conformances both because it is easier
to make them variable-length (as required for conditional
conformances) and because we want to reference them from witness
tables (both of which are coming up).
2018-01-17 10:35:16 -08:00
Slava Pestov
eeb6e21196 TBD: Stored property initializers are no longer ever public 2018-01-14 22:59:41 -08:00
Slava Pestov
f2b2cd4019 TBD: Test default argument behavior in Swift 3 and 4 mode
Also, bail out before emitting any default argument generators in Swift 4
mode. This is NFC, because we already check the linkage of the SILDeclRef
and skip it if its not public. But adding the check explicitly here
serves as a reminder that this entire code block can be deleted if we
ever decide to kill off Swift 3 compatibility.
2018-01-14 22:59:41 -08:00
Slava Pestov
4c979eb823 TBD: Clean up visitor logic 2018-01-12 23:30:15 -08:00
Slava Pestov
837ab4b76b TBD: Clean up witness thunk linkage computation 2018-01-12 23:30:15 -08:00
Slava Pestov
1b20bc3094 TBD: Use effectiveLinkageForClassMember() to calculate method linkage 2018-01-12 23:30:15 -08:00
John McCall
52bb547a7e Merge pull request #13866 from rjmccall/accessor-decl
Split AccessorDecl out from FuncDecl.  NFC.
2018-01-12 17:02:35 -05:00
John McCall
7f0f8830cd Split AccessorDecl out from FuncDecl. NFC.
This has three principal advantages:

- It gives some additional type-safety when working
  with known accessors.

- It makes it significantly easier to test whether a declaration
  is an accessor and encourages the use of a common idiom.

- It saves a small amount of memory in both FuncDecl and its
  serialized form.
2018-01-12 14:20:27 -05:00
Slava Pestov
9ff97367df AST: Rename hasFixedLayout() to isResilient() and flip polarity
In IRGen we call this isResilient() already in IRGen, and it's
more consistent to call it the same thing everywhere.
2018-01-11 21:57:42 -08:00
Slava Pestov
3dae007465 IRGen: Remove FieldAccess::NonConstantIndirect 2018-01-10 21:32:54 -08:00
Slava Pestov
f6c7f509ba TBDGen: Add support for protocol dispatch thunks 2018-01-10 13:54:22 -08:00
Slava Pestov
76499a3ce3 IRGen: Emit immediate class member offset global variable
Not used to access metadata members just yet.
2017-12-19 02:58:35 -07:00
Slava Pestov
22ad20a5df TBDGen: Emit class method dispatch thunks 2017-12-18 23:28:33 -08:00
David Ungar
51d3165874 NFC: Clarifying uses of NumThreads.
Add hasMultipleGMs predicate to SILOptions.
Rename parameters to TBD file handling to better reflect abstraction boundary.

fix
2017-12-16 13:58:01 -08:00
Slava Pestov
3392b6d8b9 SIL: Remove unused parameter from SILWitnessTable::conformanceIsSerialized() 2017-10-26 23:58:50 -07:00
Roman Levenstein
48d9b99675 Remove -sil-serialize-witness-tables flag completely
The functionality is always enabled now and there is no need to have a dedicated flag for it.
2017-10-20 19:45:29 -07:00
Huon Wilson
a6e4fdb887 [Frontend] Add -tbd-install_name frontend argument. 2017-08-02 11:33:54 -07:00
Huon Wilson
17f09653f4 [TBDGen] NFC: move TBDGenVisitor to its own header. 2017-08-02 11:33:21 -07:00
Huon Wilson
26e69df03f [SILGen] MaterializeForSet closures should never be serialized and private.
If the closure is serialized, it needs to be shared.
2017-07-24 14:03:38 -07:00
Huon Wilson
47e89676ea [TBDGen] Class inits can appear in extensions, not just ClassDecls. 2017-07-13 15:22:00 -07:00
Huon Wilson
d3f92cbcaf [TBDGen] #if's can appear inside protocols. 2017-07-10 15:15:00 -07:00
Huon Wilson
4f13de3616 [TBDGen] Generic classes have field offsets too. 2017-07-06 17:41:19 -07:00
Huon Wilson
7678e43720 [TBDGen] Include materializeForSet closures.
This is a hack around IRGen's inadequacies, for the moment.
2017-07-06 17:31:59 -07:00
Huon Wilson
a560ea15f1 [TBDGen] Include all transparent symbols.
This is a vast overestimate, but is better than missing some.

rdar://problem/32254773
2017-06-30 11:17:51 -07:00
Huon Wilson
483e4cf173 [TBDGen] Static variables in the main file have accessors.
It is only top-level globals in the main file that do not have
accessors, something like class Foo { static var x = 0 } has them no
matter where it is.

Fixes rdar://problem/32391290 .
2017-06-22 18:46:59 -07:00
Huon Wilson
f1f9694912 [NFC] Improve some code clarity in SIL and TBDGen. 2017-06-22 15:16:53 -07:00
Huon Wilson
a0bc3bd0b6 [AST] Move getEffectiveAccess calls into SIL. 2017-06-20 17:34:48 -07:00
Huon Wilson
296f23189b [TBDGen] Protocol witnesses thunks for members of public superprotocols are public.
Specifically, public superprotocols of non-public protocols have some
weird handling in SILGen, so we reproduce this.

Fixes rdar://problem/32254485 .
2017-06-19 15:00:12 -07:00
Huon Wilson
8d455a4991 [TBDGen] Explicitly walk members of stored static vars.
Unlike some other vars, these members are not also listed at the top
level, adjacent to the VarDecl.
2017-06-19 14:53:21 -07:00
Huon Wilson
002e4d5314 [TBDGen] Include extra allocating constructors instead of missing some.
Fixes rdar://problem/32253697 .
2017-06-19 14:53:21 -07:00
Huon Wilson
fed23ed40d [TBDGen] Include both direct and indirect field offsets.
It is semantically incorrect to miss a symbol, and just misleading to
include an incorrect one in the TBD file (and, it would take a compiler
bug to actually try to reference one from some downstream code), so it
is better to err on the side of including extra symbols than missing
some.

For now, computing the actual directness of a field is difficult, so
let's include both of them.

Fixes rdar://problem/32253411 .
2017-06-19 14:53:21 -07:00
practicalswift
fff77b01c7 [gardening] Remove unused variables 2017-05-05 17:03:02 +02:00
Huon Wilson
697d1ff507 [TBDGen] Global variables in main file don't have accessors. 2017-04-26 16:57:54 -07:00
Huon Wilson
a190b7d171 [TBDGen] @objc protocols don't have descriptors. 2017-04-26 16:57:53 -07:00
Huon Wilson
ee265748e1 [TBDGen] Default arguments in public functions have public symbols. 2017-04-26 16:57:53 -07:00
Huon Wilson
ee1afc8434 [TBDGen] SubscriptDecls don't get symbols. 2017-04-26 16:57:53 -07:00
practicalswift
797c2d8118 [gardening] Fix end of namespace comments 2017-04-20 22:01:01 +02:00
practicalswift
431e5a1440 [gardening] Use consistent end of namespace comments 2017-04-20 13:47:10 +02:00
practicalswift
a41a501c56 Merge pull request #8835 from practicalswift/gardening-20170418
[gardening] Fix URLs. Fix spacing. Remove unused methods. Fix headers.
2017-04-18 22:59:00 +02:00
Huon Wilson
e619cef863 Merge pull request #8836 from huonw/symbol-list-6
TBD 6: extension conformances, fix bad tests.
2017-04-18 12:40:49 -07:00
Huon Wilson
d40b8fa5e2 [TBDGen] Conformances in extensions. 2017-04-18 11:14:19 -07:00