The idea for now is that this is a SIL-only type used for
representing the storage of a weak or unowned reference.
Having it be its own type is pretty vital for reasonable
behavior in SIL and IR-generation, and it's likely that
this will surface into runtime metadata as well (hence
the mangling).
I've implemented a bunch of things that technically I don't
think are necessary if this stays out of the typechecker,
but it's easier to implement half-a-dozen "recurse into
the child type" methods now that it would be to find them
all later if we change our minds.
Swift SVN r6091
This partly rolls back <rdar://problem/14221244>, which caused the
ListMaker build to break. We need to mirror the Clang module structure
properly into Swift to actually get entities mangling into the right
contexts.
Swift SVN r5968
Our mangling grammar says that entities should always be mangled with a context, so in cases where we weren't (Clang module contexts and top-level code), do so. Additionally, for ObjC protocols, mangle them into the special "So" context so we can catch global ObjC runtime namespace collisions with them. Fixes <rdar://problem/14221244>.
Swift SVN r5851
This adds builtin types Builtin.VecNxT, where N is a natural number
and T is a builtin type, which map down to the LLVM type <N x T>.
Update varous builtins to support vector arguments, e.g., binary
operations, comparisons, negation. Add InsertElement and
ExtractElement builtins for vectors.
On top of these builtins, add Vec4f and Vec4b structs to the standard
library, which provide 4xFloat and 4xBool vectors, respectively, with
basic support for arithmetic. These are mostly straw men, to be burned
down at our leisure.
Some issues as yet unresolved:
- Comparisons of Vec4f'ss are producing bogus Vec4b's, which I
haven't tracked down yet.
- We still don't support the shuffle builtin, although it should be
easy
- More testing!
Swift SVN r5820
We were re-counting archetype depth levels and ended up mangling the triangular number of the archetype depth instead of the linear archetype depth. Measure archetype depth starting from zero to fix this.
Swift SVN r5546
Didn't take substitutions into account last time. Always mangle a single-protocol type as a single protocol list, so that substituted protocols mangle as 'PS<n>__' as expected. Also, actually update the tests this time.
Swift SVN r5541
The protocol type mangling is 'P' protocol+ '_', and so needs a trailing '_' to terminate the list, but we were missing the '_' for single-protocol types, which we tried to mangle as a nominal type context.
Swift SVN r5539
We will handle Swift-function-to-ObjC-block bridging in SILGen as part of general Cocoa-to-Swift type bridging. Temporarily disable building swiftAppKit and tests that exercise block bridging until the new implementation lands.
Swift SVN r5090
Remove '@' from the operator character set, but add the math, symbol, punctuation, arrow, and line- and box-drawing characters. Also allow operators to contain (but not start with) combining characters--this should be safe, because identifiers can't start with combining characters either, and we don't allow them anywhere else.
Swift SVN r5019
Extend the character set for identifiers according to WG14 N1518, which recommends an extended character set for identifier start and continuation characters in C. Mangle identifiers containing non-ASCII characters by borrowing the Punycode encoding used for international domain names.
No Unicode operators just yet.
Swift SVN r4968
Tweak the mangling rules to fix some collisions I found:
- Mangle variadic tuples with a lowercase 't' to distinguish them from nonvariadic tuples with a slice as their final element.
- Mangle the fixity of operators using 'op' for prefix, 'oP' for postfix, and 'oi' for infix, so that operator declarations that differ only in fixity can coexist.
While we're here, 'Slice' seems worthy of a standard substitution, so mangle it to 'Sa'.
This fixes <rdar://problem/13757744> and <rdar://problem/13757750>.
Swift SVN r4965
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