Commit Graph

260 Commits

Author SHA1 Message Date
John McCall
f450d09e00 Unindent cases to match LLVM style. 2016-04-23 13:31:46 -07:00
John McCall
014bfa10f7 Handle MetadataKind::Class in readMetadata. This can only
come up as the exact value of the metadata kind for classes
where ObjC interop is disabled.
2016-04-21 23:23:47 -07:00
John McCall
66208c31e5 More organization and redunancy elimination in MetadataReader. 2016-04-21 22:08:28 -07:00
John McCall
590706a8c6 Pass around address/buffer pairs in the MetadataReader instead of
just the address.  Use this to avoid repeatedly reading metadata so
often (even if it's cached, this is better).  Fix some bugs involving
nominal type parents.
2016-04-21 21:47:14 -07:00
John McCall
b42f2c014a Remove spurious call to readMetadata. 2016-04-21 16:25:19 -07:00
John McCall
e758ba3569 Stub out a RemoteAST library for translating remote metadata
pointers into a local AST.

This is intended primarily for the use of LLDB and does not have
a stable ABI.
2016-04-19 16:36:57 -07:00
John McCall
0278616eb9 Allow MetadataReader to use a more precise type for tracking nominal
types than just a std::string.
2016-04-19 11:34:24 -07:00
Slava Pestov
d184122e83 Reflection: Move field and associated type metadata parsing from ReflectionContext to TypeRefBuilder, NFC
ReflectionContext is now solely concerned with converting runtime
metadata in a remote address space into a TypeRef.

TypeRefBuilder now knows how to parse reflection metadata, and
in particular look up associated type witnesses. This decouples
the TypeRef substitution code from the ReflectionContext. Now
substitution only needs a TypeRefBuilder, which means the code
is no longer templated, and can be moved from TypeRef.h to
TypeRef.cpp.

This also allows the upcoming TypeRef lowering code to live in
a source file instead of headers.
2016-04-16 02:19:04 -07:00
Slava Pestov
a24e95f86c Reflection: Extract new decodeMangledType() for when we have a TypeRefBuilder but not ReflectionContext, NFC
In particular, this will allow the field and associated type metadata
parsing to be moved out of ReflectionContext and into TypeRefBuilder,
which is required for TypeRef lowering.
2016-04-16 02:18:31 -07:00
John McCall
5eef441240 Extract the core implementation of ReflectionContext and
template it over the builder type.

Also preserves more information about function types until
the builder, at least.
2016-04-14 21:21:44 -07:00