Commit Graph

4 Commits

Author SHA1 Message Date
Jordan Rose
965035dc2a [serialization] Load the decl and type offset arrays from the module.
...but don't do anything with them yet. This does check that they're being
correctly serialized, though.

This introduces a new ADT, PointerIntUnion, which like PointerUnion is an
efficient variant type using the lowest bit of data as a discriminator.
By default, the union can store any pointer-bits-minus-one-sized integer,
but both the integer type and the underlying storage type can be
customized.

Swift SVN r5321
2013-05-25 01:34:52 +00:00
Jordan Rose
ea0d5031ab [serialization] Codify the bringup hack with a special note in the module file.
The bringup hack, again, is to just process the module source files as a
TranslationUnit if the module doesn't accurately represent the original
source. Currently this happens if the module is not empty, or if it imports
/anything/, since we don't actually serialize anything yet.

This also cleans up the decl/type serialization skeleton a bit.

Swift SVN r5238
2013-05-20 22:50:39 +00:00
Jordan Rose
f9c4046896 [serialization] Validate the control block -- is the module too new?
Not so interesting right now, but eventually we'll be validating other
things as well, and it's best not to have FIXMEs lying around.

Swift SVN r5175
2013-05-16 00:23:13 +00:00
Jordan Rose
3109d8c830 [serialization] Pull bitstream processing of modules into its own file.
Like Clang, ModuleFile contains state about reading the serialized module,
while SerializedModuleLoader takes the place of ASTReader in tracking
cross-module data. I'm diverging from Clang's architecture a bit here by
pushing the actual deserialization logic into ModuleFile.

No functionality change.

Swift SVN r5174
2013-05-16 00:23:11 +00:00