- Print "assign_expr" with color (using `printCommon`).
- Print "function_ref" for UnresolvedDotExpr with color, to be
consistent with all other "function_ref" printing.
Most instances of "decl=" were printed with color but some were not.
Now, all instances of "decl=" (and the subsequent ValueDecl or
ConcreteDeclRef) are printed with color.
Some colored open parentheses (printed by `printCommon`) had uncolored
closing parenthesis counterparts. Now, all such closing parentheses are
colored.
The storage kind has been replaced with three separate "impl kinds",
one for each of the basic access kinds (read, write, and read/write).
This makes it far easier to mix-and-match implementations of different
accessors, as well as subtleties like implementing both a setter
and an independent read/write operation.
AccessStrategy has become a bit more explicit about how exactly the
access should be implemented. For example, the accessor-based kinds
now carry the exact accessor intended to be used. Also, I've shifted
responsibilities slightly between AccessStrategy and AccessSemantics
so that AccessSemantics::Ordinary can be used except in the sorts of
semantic-bypasses that accessor synthesis wants. This requires
knowing the correct DC of the access when computing the access strategy;
the upshot is that SILGenFunction now needs a DC.
Accessor synthesis has been reworked so that only the declarations are
built immediately; body synthesis can be safely delayed out of the main
decl-checking path. This caused a large number of ramifications,
especially for lazy properties, and greatly inflated the size of this
patch. That is... really regrettable. The impetus for changing this
was necessity: I needed to rework accessor synthesis to end its reliance
on distinctions like Stored vs. StoredWithTrivialAccessors, and those
fixes were exposing serious re-entrancy problems, and fixing that... well.
Breaking the fixes apart at this point would be a serious endeavor.
This doesn't fix the fundamental problem of correctly handling such cases, but
it is better than the "error message" that occurred previously:
Assertion failed: ((bool)typeSig == (bool)extensionSig && "unexpected generic-ness mismatch on conformance").
Fixes the crash rdar://problem/41281406 (that in
https://bugs.swift.org/browse/SR-6569 (rdar://problem/36068136)),
https://bugs.swift.org/browse/SR-8019 (rdar://problem/41216423) and
https://bugs.swift.org/browse/SR-7989 (rdar://problem/41126254).
Introduce some metaprogramming of accessors and generally prepare
for storing less-structured accessor lists.
NFC except for a change to the serialization format.
Not NFC because it changes the printing behavior for function type
parameters. They are no longer reported as types (paren, tuple, or raw),
but as Params.
Previously, only DictionaryExpr dumped its semanticExpr, and it replaced the direct contents. With this change, all nodes with a semanticExpr dump it, and they all handle it in the same way: they append it to the end of the list of children, in a separate S-expression marked by “semantic_expr”.
Otherwise, since typealiases are used so often, one ends up with dumps
that say nothing new/useful:
(normal_conformance type=X protocol=P
(assoc_type req=A type=X.A))
Within a dump of a DeclRef (or, more likely, a larger entity that includes one),
the full multiline details of a substitution map are likely to not be hugely
relevant, and just get in the way of understanding the interesting parts of the
dump. Thus, this is a variant that is a single line and just includes the
substitutions; the conformances (or, at least, the protocols involved) can be
inferred from the generic signature combined with those substitutions.
The style is controlled via a enum rather than a boolean, to avoid problems with
trying to pass an indent like `map->dump(out, indent)`, where the integer indent
coerces to a bool, rather than error.
Fixes rdar://problem/40074968.
This is much easier to read when part of a larger dump, where it now occurs in
expressions and specialized conformances.
Part of rdar://problem/40074968.
A recursive conformance would previously recur infinitely, but now prints just
the header plus "(details printed above)".
Fixes (most of) rdar://problem/40074968
Introduced during the bring-up of the generics system in July, 2012,
Substitution (and SubstitutionList) has been completely superseded by
SubstitutionMap. R.I.P.
Replace two prominent uses of SubstitutionList, in ConcreteDeclRef and
Witness, with SubstitutionMap. Deal with the myriad places where we
now have substitution maps and need substitution lists (or vice versa)
caused by this change.
Overall, removes ~50 explicit uses of SubstitutionList (of ~400).