Commit Graph

4 Commits

Author SHA1 Message Date
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
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