Commit Graph

9 Commits

Author SHA1 Message Date
Jordan Rose
b0ad06ae30 [Serialization] The hash seed for DeclCommentTableInfo can't change
Unlike compiled modules, swiftdoc files are considered a stable
format, so we can't change how information is stored in them. If we
add any more string-hashed tables to swiftdoc files, we should
consider using a new hash seed for those.
2019-08-29 09:19:49 -07:00
Jordan Rose
eddb736de6 [Serialization] Simplify reading of group info for swiftdoc files (#26734)
Before:
- call a helper object to get group name info
- which called another helper object to parse group name info (lazily)
- and cached that in a global map
- which was never accessed anywhere else

After:
- just parse the group name info up front
- and look up into it as necessary

No intended functionality change; in practice decls without groups
might now sort to the top where before they'd be "in the middle
somewhere" (wherever the first decl-without-group appeared).
2019-08-20 11:52:38 -07:00
Xi Ge
6fd332d62c Doc-serialization: skip declarations with double-underscore as name prefix
Double-underscored names suggest the symbols aren't supposed to be used by framework
clients. This patch excludes the doc-comments of these symbols in swiftdoc files.

rdar://51468650
2019-06-10 14:00:41 -07:00
Xi Ge
ea86a3402a doc-serialization: exclude non-public decls when serializing module group info.
This reduces the size of x86_64.swiftdoc about 10%.

rdar://48689311
2019-04-15 12:09:06 -07:00
Xi Ge
ecd1e84526 doc-serialization: diagnose missing group-info file or corrupted one.
rdar://45903094
2019-02-21 15:28:35 -08:00
Jordan Rose
449e5ecd74 [Serialization] Give swiftdocs a stable version
We're committing to this as a forwards-compatible format, and in most
cases probably backwards-compatible as well!
2018-10-23 19:55:44 -07:00
Jordan Rose
f3ea8bdd55 [Serialization] Preparation for giving swiftdoc its own version
The functionality change in this commit is that the control block in a
swiftdoc file is validated rather than just being ignored. Tests in
following commit.
2018-10-23 19:55:44 -07:00
Jordan Rose
ae9d86241c [Serialization] Split doc serialization out of the Serializer class
Extract the common utilities into a SerializerBase class, and make a
new DocSerializer.
2018-10-23 19:55:04 -07:00
Jordan Rose
6bcfc783cc [Serialization] Pull swiftdoc serialization out to a separate file
No functionality change.
2018-10-23 19:54:40 -07:00