Commit Graph

14 Commits

Author SHA1 Message Date
John McCall
63072df530 Add class size and address point fields to class metadata.
I've put these fields on the class object for now, just
so we can at least theoretically update them.  A superclass
that grew left rather than right could maybe even be made
to work with this schema, but probably not.

rdar://16705821

Swift SVN r16880
2014-04-26 10:57:50 +00:00
Joe Groff
87c26c3fcb Unit-test that existential metadata is instantiated with the right kind.
Swift SVN r9878
2013-11-01 20:21:46 +00:00
Joe Groff
98f0a5fc03 Update runtime unit tests for getExistentialTypeMetadata name change.
Swift SVN r9875
2013-11-01 18:27:43 +00:00
Joe Groff
37e652b2ba Runtime: Add swift_getExistentialMetadata entry point.
Set up a metadata cache for existential type metadata. Instantiate existential metadata by first sorting the protocol list, so that it is order invariant, precomputing the overall witness table count and class constraint of the composition so it can be cached in the existential metadata.

We still need to implement value witnesses for existential containers in the runtime before this is complete. We can at least test the uniquing and flags computations at this point.

Swift SVN r9727
2013-10-28 20:53:20 +00:00
Joe Groff
3a8f81433f IRGen: Add a nominal type descriptor to class metadata.
Swift SVN r9503
2013-10-18 22:51:27 +00:00
Dmitri Hrybenko
28c24ea5a9 Fix Metadata unittest after r9249
Swift SVN r9256
2013-10-12 07:32:32 +00:00
Joe Groff
d516b1fe59 Update metadata unittest for generic metadata pattern ABI change.
Swift SVN r7902
2013-09-04 17:50:42 +00:00
John McCall
045d7e4934 Fix the unittests suite.
Just assume that there's a snarky comment about the magic of cmake here.

Swift SVN r4533
2013-03-29 03:17:15 +00:00
Dave Zarzycki
2e802a3376 Fix some build failures introduced by r3397
Swift SVN r3412
2012-12-07 21:39:48 +00:00
John McCall
65db19395d Make metatype layout compatible with struct objc_class.
The principal difficulty here is that we need accessing the
value witness table for a type to be an efficient operation,
but there (obviously) isn't a VWT field for ObjC classes.
Placing this field after the metatype would tend to bloat
metatypes by quite a bit.  Placing it before is best, but
it introduces an unfortunate difference between the address
point of a metatype and the address of the global symbol.
That, however, can be fixed with appropriate linker support.
Still, for now this is rather unfortunately over-subtle.

Swift SVN r3307
2012-11-30 02:47:01 +00:00
John McCall
dda270495f Add a runtime entrypoint to map up a level of metatype.
Swift SVN r3179
2012-11-14 08:45:13 +00:00
Dave Zarzycki
4d8739f083 Accept limitations of LLVM build system
1) Move the low-level runtime code into swift/runtime
2) Move the high-level "standard library" code into swift/stdlib

The key difference is that the 'runtime' contains language support logic
(like retain/release logic) that the compiler assumes to always exist
and may assume intimate details about the implementation. This library
will have intimate knowledge of the swift ABI.

In contrast, the 'stdlib' can be completely rewritten and the
language/compiler make little if any assumptions about it. It is
expected to reexport fundamental types and operators, and implement
fundamental policies (precedence, implicit conversions, etc).

Swift SVN r3045
2012-10-23 21:33:52 +00:00
Dave Zarzycki
d0f889764a Various runtime cleanup
1) Move httpd to examples where it belongs.
2) Build examples on a regular basis for now.
3) Move low-level runtime source to a sub directory.

Swift SVN r3040
2012-10-23 04:56:45 +00:00
John McCall
eaae8b50d1 Add a unit test suite, including a test for
swift_getGenericMetadata.  Mostly ripped off clang's
support for same.  I did not feel confident in pulling
over the CMake equivalents, so someone else will need to.

Swift SVN r2982
2012-10-11 06:51:47 +00:00