Commit Graph

4 Commits

Author SHA1 Message Date
Slava Pestov
874607ba48 SIL: Include all witnesses in SILDefaultWitnessTable, not just resilient defaults
Previously SILDefaultWitnessTables only included "resilient" default
implementations, which are currently defined as those that appear at the
end of a protocol, after any requirements without defaults.

However, this was too inflexible. Instead, include all entries in the
SILDefaultWitnessTable, with invalid entries standing in for requirements
without defaults.

Previously, the minimum witness table size was a separate parameter, also
appearing in SIL syntax; now it can be calculated by looking at the entries
themselves. The getResilientDefaultEntries() method of SILDefaultWitnessTable
returns the same result as getEntries() did previously.
2016-03-03 07:00:20 -08:00
practicalswift
5695545c7d [gardening] Use standard file header format in recently added file. 2016-02-06 10:23:56 +01:00
Slava Pestov
96a2bff5d4 SIL: Correctly set IsDeclaration in SILDefaultWitnessTables
This was triggered in Evolution/test_struct_resilient_add_conformance.swift.
2016-02-05 22:34:49 -08:00
Slava Pestov
bbbe307980 SIL: Introduce SILDefaultWitnessTable and start plumbing
This will be used to help IRGen record protocol requirements
with resilient default implementations in protocol metadata.

To enable testing before all the Sema support is in place, this
patch adds SIL parser, printer and verifier support for default
witness tables.

For now, SILGen emits empty default witness tables for protocol
declarations in resilient modules, and IRGen ignores them when
emitting protocol metadata.
2016-02-05 20:57:11 -08:00