[stdlib] Kill some dead code

That this code is dead implies we are throwing away the knowledge that
we have a native buffer whenever we downcast an array.  That'll be fixed
when the array buffer simplification goes in.

Swift SVN r23350
This commit is contained in:
Dave Abrahams
2014-11-15 03:42:12 +00:00
parent e455dec9fa
commit d59e781b61

View File

@@ -213,15 +213,12 @@ extension _ArrayBuffer {
if !_isClassOrObjCExistential(T.self) {
return
}
if _slowPath(indirect.needsElementTypeCheck) {
if _fastPath(_isNative) {
for x in _native[subRange] {
_precondition(
unsafeBitCast(x, AnyObject.self) is T,
"NSArray element failed to match the Swift Array Element type")
}
}
else if !subRange.isEmpty {
_sanityCheck(
!_isNative, "A native array that needs a type check?")
if !subRange.isEmpty {
let ns = _nonNative
// Could be sped up, e.g. by using
// enumerateObjectsAtIndexes:options:usingBlock: