Commit Graph

9 Commits

Author SHA1 Message Date
Chris Lattner
79ed57f9f2 standardize naming of tuples and tuple patterns on "elements".
Previously some parts of the compiler referred to them as "fields",
and most referred to them as "elements".  Use the more generic 'elements'
nomenclature because that's what we refer to other things in the compiler
(e.g. the elements of a bracestmt).

At the same time, make the API better by providing "getElement" consistently
and using it, instead of getElements()[i].

NFC.



Swift SVN r26894
2015-04-02 20:23:49 +00:00
Doug Gregor
38cc1fe5c6 Remove LazyResolver arguments from API entry points to the conformance lookup table.
Swift SVN r26838
2015-04-02 00:06:01 +00:00
Doug Gregor
7708c5a65e Start moving away from (Nominal)?TypeDecl::getProtocols().
Instead, use other entry points, particularly those that use the conformance lookup table.

Swift SVN r26412
2015-03-22 12:35:21 +00:00
Arnold Schwaighofer
752c402dc2 DestructorAnalysis: Fix a spelling error
NFC.

Swift SVN r26081
2015-03-13 02:01:35 +00:00
Arnold Schwaighofer
a68f488e99 Revert "DestructorAnalysis: Don't rely on stable cannonical type pointers"
This reverts commit r26049.

Canonical types really should to be stable across the lifetime of one module.

Swift SVN r26080
2015-03-13 02:01:35 +00:00
Arnold Schwaighofer
07ef1bb68a DestructorAnalysis: Don't rely on stable cannonical type pointers
This should be NFC. Pointers to cannonical types should be stable accross
processing of a module.

Swift SVN r26049
2015-03-12 17:43:44 +00:00
Arnold Schwaighofer
165bfb6f95 DestructorAnalysis: Fix for recursive types
We can't just recursively process types without caching. Instead mark a type as
safe before we recurse and reset this assumption if we proved otherwise on the
recursive traversal.

rdar://20132313

Swift SVN r26048
2015-03-12 17:14:25 +00:00
Doug Gregor
09021d97ce Add a detailed AST dumper for types.
... because pretty-printed types are useless for debugging.

Swift SVN r25422
2015-02-20 06:22:46 +00:00
Arnold Schwaighofer
06a0a23562 Add a destructor memory effect analysis
This adds an analysis to the compiler that identifies types that are may store
to memory on destruction.

It adds a compiler known protocol _DestructorSafeContainer that allows the
standard library to identify containers whose destructor's memory effects
depends strictly on the type parameters of the container.

Array<T> : _DestructorSafeContainer {} may not store to memory during
destruction if the bound T is a type that does not store to memory on
destruction.

This is needed to deduce that for example Array<Array<Int>> is does not store to
memory on destruction (e.g during a call to release).

rdar://18940376

Swift SVN r23242
2014-11-11 19:27:41 +00:00