Match the new SILGen pattern, where only the box parameter is partially applied to the closure, and the address of the value is projected on the callee side.
The demangler recently regressed to not printing any context
names, including nominal type contexts. This means that symbols
like Optional.init where only printed as init. Continue printing
contexts but not modules (per the original simplified demangling
design).
rdar://problem/19312992
Swift SVN r31066
Break up "Simplified" demangling mode (shortened demangled descriptions
for the sake of displaying in UI with small areas) into more
fine-grained options instead of an opaque "Simplified" option and
provide a static preset of options for displaying stack traces in
Xcode UI and other tools, for example.
- Don't print unmangled suffixes
- Don't print module names
- Shorten various generic specialization descriptions as just
"specialized"
- Don't display long protocol conformances
- Truncate where clauses
- Don't display so-called "entity" types
- Shorten "partial apply *"
- Shorten thunk phrases
- Shorten value witness phrases
- Truncate archetype references
rdar://problem/21753651
Swift SVN r30247
These will be used for reflection, and eventually to speed up generic
operations on single payload enums as well.
Progress on <rdar://problem/21739870>.
Swift SVN r30214
Leave the qualification off of enum cases and type names when 'print'-ing them, but keep them on 'debugPrint'. (At least, at the outermost level; since ad-hoc printing of structs and tuples uses debugPrint, we'll still get qualification at depth, which kind of sucks but needs more invasive state management in print to make possible.) Implements rdar://problem/21788604.
Swift SVN r30166
This enables dead argument elimination to be paired with @owned -> @guaranteed
optimization. It has the additional advantage of allowing us to potentially
eliminate additional retains, releases since the fact that the use is dead
implies that the lifetime of the value no longer needs to be live across the
function call.
Since dead argument elimination can be composed with @owned -> @guaranteed, I
had to modify the mangler, remangler, demangler, to be able to handle a mangling
that combines the two.
I just saw noise in the perf test suite.
rdar://21114206
Swift SVN r29966
Our hack to generate a unique name by appending the class pointer doesn't produce a stable class name that can persist in NSKeyedArchiver, or eventually be used as a key for dynamic runtime instantiation. Generate a proper mangled name for the class instance by building a demangling AST from the metadata nodes and feeding it into the remangler. Should fix rdar://problem/18884563, though I need to try using an archiver with a generic class to verify.
Swift SVN r29316
This changes things like Swift.Dictionary<Swift.Int, Swift.AnyObject> to Dictionary<Int, AnyObject>
It has been suggested that playgrounds would benefit from not showing the fully qualified name.
Playgrounds use the runtime demangler to obtain type names, and honestly, I do not see enough value in those qualifiers being printed out to justify hackery in PlaygroundLogger or separate demangling logic
Swift SVN r28997
To support UI applications displaying demangled names in a limited
amount of screen space, provide a new SwiftDemangle API and Demangler
option to do the following:
- Skip all module name prefixes when printing contexts
- Don't print implicit self/metatype parameters when printing
function types
Add a '-simplified' flag to swift-demangle to support testing at the
command line.
Swift SVN r28727
The __lldb_expr modules are special as in they are autogenerated by LLDB and meant to not be user-accessible, so showing them adds visual noise for no user benefit
I am open to the notion of adding a flag to swift-demangle to the same effect, but that seems much lower priority
Swift SVN r28195
demangling tree back into a mangled string.
Also, extend the demangling API in a few obvious
ways, and simplify testing for failure in the
node-returning APIs by having them simply return
null instead of a spurious Failure node.
Also, preserve slightly more information in the
demangling tree. The goal here is eventually to
always allow a perfect round-trip through the
demangler parse tree. This patch gets us close,
but we're not quite there yet.
Tests to follow.
Swift SVN r24473
Not NFC: changes some of the demangling tree schemata (in
interest of regularity and expressivity) and, incidentally,
improves support for initializer manglings.
The main schema change is that Path is now gone, and instead
the first child of an entity is its context. All contexts
are now labelled with their kind (variable/function/etc.)
rather than that being much more obscure or missing.
A secondary change is that the top-level node is now a
single node with the <global> and all its attributes as
children, rather than being weirdly sibling-linked.
Also, the representation has changed so that nodes link
only to their children, not to siblings or parents, which
means that it is no longer necessary to clone nodes when
replacing substitutions.
Finally, dump/print was brought in from swift-demangler
and made part of the core API for debugging purposes.
Swift SVN r11470
iVars of a given type should be unique by name and so in certain cases, their types will not actually add information to a consumer of the demangled string
This mode is mostly useful for LLDB. When searching for a field offset by name in a generic scenario, the search can succeed or fail depending on whether archetypes are
obtained through the Demangler ("A","B","C") or through the module (which will vend proper archetype names when poked the right way)
This mode removes that ambiguity
Swift SVN r10761