Commit Graph

58 Commits

Author SHA1 Message Date
David Farler
cf97a12109 Tie lifetime of typerefs to the ReflectionContext
We will be handing pointers to typerefs over the SwiftRemoteMirrors C
API boundary, at which point it is unclear who will hold onto a shared
pointer. The useful lifetime of a typeref is tied to the
ReflectionContext for which they were created anyway so, when it goes
away, all of those typerefs can go away anyway.

We can't use LLVM's bump-pointer allocator here because we only build
the Support library for the host. As a compromise, stuff new typeref
pointers into a vector pool, where they will be taken down during
ReflectionContext's destructor.
2016-04-13 13:58:35 -07:00
David Farler
20f5304b90 Revised SwiftRemoteMirror C API
Some minor changes to the SwiftRemoteMirror C API, NFC yet.
2016-04-13 13:09:27 -07:00
John McCall
91f02848df Organize the MemoryReader interface headers to better support
multiple clients.
2016-04-12 16:05:29 -07:00
David Farler
0b04b90895 SwiftRemoteMirrors: Stub implementations for infoFor{TypeRef,Field}
These are just some dummy implementations to temporarily appease
the linker.
2016-04-11 20:03:45 -07:00
David Farler
67943c437b SwiftRemoteMirrors: Implementationsfor typeRefForMetadata/genericArgumentOfTypeRef
Implement the C wrappers for the corresponding C++ methods in
ReflectionContext.
2016-04-11 19:42:47 -07:00
David Farler
ec4f1fd22b Use external but native runtime target template for SwiftRemoteMirror
Although the SwiftRemoteMirror library targets a specific architecture,
it's still an external runtime, so treat it as such. The InProcess template
argument is reserved for truly in-process reflection in the Runtime.
2016-04-11 19:41:23 -07:00
David Farler
9863e49968 Add SwiftRemoteMirror implementation for addReflectionInfo 2016-04-11 19:11:38 -07:00
David Farler
358a0fefe8 Add SwiftRemoteMirror library
This will wrap the ./lib/Reflection functionality in a C
interface.
2016-04-05 13:45:46 -07:00