Exposing the raw baseAddress without lifetime control is error-prone.
Began to strip actual uses of baseAddress from specific models of
_ArrayBufferType, too.
Swift SVN r22950
The indenter does great until it sees the Python triple-quoted string
containing a swift string with a string intepolation inside; that brings
it out to quotation level zero and then the backslash escapes the open
paren causing the nesting level to go negative when it sees the close
paren. Sheesh.
Swift SVN r22948
This is mostly just a renaming of _SwiftNativeNSArray, except that we
want to add another NSArray subclass for verbatim-bridged elements, so
we want a common base class. _SwiftNativeNSArray is the name of that
new base class, to parallel the other _SwiftNativeNSXXX classes.
Swift SVN r22913
We're going to replace StdlibUnittest's use of ContiguousArray with
_UnitTestArray so that we can work on (and potentially break)
_ContiguousArray and still get useful test results. When refactoring is
complete, we can optionally replace StdlibUnittest's use of
_UnitTestArray with ContiguousArray, or move the decoupled component
into the StdlibUnittest module.
Swift SVN r22874
This reapplies commit r22864 - it is not changing the public api as we initially
thought. sqrt() was never available without importing Darwin.
This change only changes where sqrt() gets "forwarded" to. Before 'sqrt' called
the builtin '_sqrt' defined in BuiltinMath now it just calls the math library's
'sqrt' function.
I also added a stdlib test.
rdar://18371371
Swift SVN r22870
The buffer stored in a _ContiguousArrayBuffer<T> is not always
_ContiguousArrayStorage<T>. It might in fact be the special empty
buffer class.
Swift SVN r22835
This reverts commit r22829, because reverting r22828 depends on it.
Reverting r22828 because it
was apparently causing an assertion on the bot:
Swift SVN r22830
The buffer stored in a _ContiguousArrayBuffer<T> is not always
_ContiguousArrayStorage<T>. It might in fact be the special empty
buffer class.
Swift SVN r22823
We're going to use it for Array internals. When we do, it should be
expected to cause a performance hit on arrays of value types until
rdar://18125016 is handled.
Swift SVN r22784
It was doing an unsafeBitCast and possibly not managing lifetimes;
replace it with more-typesafe and memory-safe calls where possible.
Swift SVN r22779
Buffer identity is only used by tests. The switch to an identity
representation that accounts for the buffer length was actually
incorrect for the way many tests used it.
Swift SVN r22771
Fixes rdar://problem/18646425
Running the test uncovered avoidable inefficiencies in Array copying, so
dispatch of _copyToNativeArrayBuffer was revamped. It's reasonable to
expect some speedups from this.
Also, the internal Array API requestNativeBuffer was highly error prone
when the source was a Slice, because it could return an array buffer
that represented more than the entire slice. That capability was
probably used for optimization once, but is no longer, and the error
prone API probably caused bugs, so it was reformed.
Swift SVN r22746