Commit Graph

108 Commits

Author SHA1 Message Date
Dmitri Hrybenko
de59d8dcd4 Remove unneeded llvm:: qualifier for llvm::StringRef and llvm::SmallVector
Swift SVN r7089
2013-08-09 18:41:46 +00:00
Joe Groff
7a1009fc9f IRGen: Remove value witnesses from protocol witness tables.
The value witnesses are always available through type metadata (through an extra indirection). Saving that indirection costs 16 words (and growing!) in every witness table, and when we start instantiating conformances for generic instances, would require us to instantiate practically every generic witness table. Removing the value witnesses from the protocol witness table means we will only need to instantiate witness tables when associated types are dependent on the conforming type's type variables.

This is an ABI break, but should have no user-visible functional change.

Swift SVN r6651
2013-07-26 20:55:04 +00:00
Joe Groff
dcc414026e IRGen: Lower SIL DeinitExistentialInst.
Provide a lowering for the DeinitExistential instruction to deallocate the buffer in an existential container with an uninitialized value, using its deallocateBuffer witness.

Swift SVN r5623
2013-06-17 19:57:48 +00:00
John McCall
757c0ae304 Track whether a type is POD and whether it uses inline or allocated
storage in a flags word in the value witness table.  Pack the
alignment into only 16 bits of this word.  Optimize tuple value
witnesses based on whether they're POD and inline.

Swift SVN r5138
2013-05-10 06:16:33 +00:00
John McCall
462c9603ea Demote emitLoadOfValueWitness from being API.
Swift SVN r5137
2013-05-10 06:16:31 +00:00
John McCall
d8cdb0160f Switch IR-generation to generally traffic in alignment
masks rather than raw alignments.

Swift SVN r5136
2013-05-10 06:16:28 +00:00
Joe Groff
08b6f87524 Add 'typeof' to value witness tables.
To be able to get the dynamic type of a generic value, the 'typeof' operation needs to be part of the value witness for the type. Add 'typeof' to the value witness table layout, and in the runtime, provide standard typeof witnesses for static, Swift class, and ObjC class values.

Swift SVN r5013
2013-05-01 18:49:25 +00:00
John McCall
c74ad61247 Extract functions to work with value witnesses into their own file.
Swift SVN r4924
2013-04-26 21:33:21 +00:00