Commit Graph

259 Commits

Author SHA1 Message Date
Joe Groff
101522bdfd Don't generate offensive words in our value witness mangling.
Swift SVN r5601
2013-06-15 22:12:50 +00:00
Doug Gregor
85f32c5c07 Prepend the magic "\01" to asm names of Clang declarations.
Should actually fix <rdar://problem/14094368> properly.


Swift SVN r5522
2013-06-07 21:26:10 +00:00
Doug Gregor
b4e68f1eaa Head Clang's AsmLabelAttr when mangling the name for the Clang declaration.
Fixes <rdar://problem/14094368>.


Swift SVN r5516
2013-06-07 20:08:27 +00:00
Joe Groff
fcd7b06eb5 IRGen: Disregard uncurry level of property accessors when mangling.
We mangle the type of the property, not the type of the accessor, so the uncurry level of the accessor is irrelevant to the mangler and causes the mangler to mangle properties of function type incorrectly--'var x : () -> ()', for instance, gets mangled to '_T6module1xfT_T_g' (with a lowercase uncurried 'f') instead of the proper '_T6module1xFT_T_g'. This broke the ListMaker test because SILGen and IRGen were coming up with inconsistent manglings for the 'handler' property of UndoManager in NSUndoManagerExts. Fixes <rdar://problem/13926113>.

Swift SVN r5229
2013-05-20 19:11:16 +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
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
b818405034 Replace direct use of [[clang::fallthrough]] with a macro.
Add a SWIFT_FALLTHROUGH macro that expands to [[clang::fallthrough]] for Clang and nothing for other compilers. No functionality change.

Swift SVN r5043
2013-05-05 18:54:03 +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
Joe Groff
0566088bf2 Move name mangling into SIL.
Sever the last load-bearing link between SILFunction and SILConstant by naming SILFunctions with their mangled symbol names. Move the core of the mangler up to SIL, and teach SILGen how to use it to mangle a SILConstant.

Swift SVN r4964
2013-04-28 03:32:41 +00:00