This reverts commit r15164. I need to reduce the size of the test case and run
it more times instead. I am reverting this for now to unblock Nadav. When it is
fixed I will recommit it.
Swift SVN r15200
We are actually doing a pretty good job optimizing this (even though I
am sure it could be better). The test case is a 5000 node prim run. IIRC
when I ran the cpp version of this on my local cpu it was instantaneous.
The swift version is ~1.5 seconds.
Swift SVN r15164
Collect the identifiers for the selector pieces we parsed and use them to build a compound DeclName for the func decl. Currently this only manifests when __FUNCTION__ is used inside a selector-style function definition, where we now correctly produce the compound 'foo:bar:' name.
Swift SVN r14717
Add __FUNCTION__ to the repertoire of magic source-location-identifying tokens. Inside a function, it gives the function name; inside a property accessor, it gives the property name; inside special members like 'init', 'subscript', and 'deinit', it gives the keyword name, and at top level, it gives the module name. As a bit of future-proofing, stringify the full DeclName, even though we only ever give declarations simple names currently.
Swift SVN r14710
Lex a backtick-enclosed `[:identifier_start:][:identifier_cont:]+` as an identifier, even if it's a Swift keyword. For now, require that the escaped name still be a valid identifier, keyword collisions notwithstanding. (We could in theory allow an arbitrary string, but we'd have to invent a mangling for non-identifier characters and do other tooling which doesn't seem productive.)
Swift SVN r14671
It's not forming the metatype for the protocol type (exists t: P. t).metatype, it's forming the existential of a metatype of a conforming type, exists t: P. (t.metatype).
Swift SVN r14520
Having one instruction to get the dynamic metatype of a (non-existential) value makes more sense from a generic specialization standpoint and should stave off inevitable crashers when archetype_metatypes get specialized. protocol_metatype remains separate because metatype existentials are more interesting.
Swift SVN r14499
We were wantonly applying 'upcast' to archetypes in some cases, and really, that's OK, since these instructions do the same thing (and generic specialization could turn archetype_ref_to_super into upcast). Make everyone's life easier by folding archetype_to_super into upcast. Fixes <rdar://problem/16192324>.
Swift SVN r14496
There's no real need for this to be included in the
standard build, or even to avoid bit-rot; but if
someone messes around with the data structure, this is a
good way to stress-test it.
Swift SVN r14494
This is fast enough to do all the time and will prevent problems like
the one noted as fixed below.
Also, fix a gyb self-test that had drifted out-of-date.
Swift SVN r14484
It was hard to decide on a replacement character for @, which is a
particularly bad choice for gyb ever since we started using it for
attributes in Swift, since attributes often start a line. Only
graphically-dense characters seem to look right. '%' has the
disadvantage of clashing with SIL, where it begins many lines, but we're
not using gyb to generate any SIL files today, so I optimized for the
common case.
Swift SVN r14483
If an enum has no cases with payloads, make it implicitly Equatable and Hashable, and derive default implementations of '==' and 'hashValue'. Insert the derived '==' into module context wrapped in a new DerivedFileUnit kind, and arrange for it to be codegenned with the deriving EnumDecl by adding a 'DerivedOperatorDecls' array to NominalTypeDecls that gets visited at SILGen time.
Swift SVN r14471
Diagnose a metatype reference that doesn't appear as part of a call or member reference, offering fixits to either default-construct the type or get at the metatype explicitly using '.self'. Also diagnose an attempt to refer to 'T.type' by fixiting it to '.self'.
Swift SVN r14433
The 'override' attribute indicates that the given declaration, which
may be a method, property, or subscript, overrides a declaration in
its superclass. Per today's discussion, the 'override' attribute must
be present if and only if the corresponding declaration overrides a
declaration in its superclass.
This implements most of <rdar://problem/14798539>. There's still more
work to do to on property and subscript overrides.
Swift SVN r14388
I've updated the text to remove any mention of '-D' or build configurations, and updated the descriptions of the various supported target configuration values.
Swift SVN r14372