Commit Graph

20 Commits

Author SHA1 Message Date
David Farler
c453eb4c48 Add Set type.
<rdar://problem/14661754> TLF: [data-structure] Set<T> data type + Bridging from NSSet

Swift SVN r23262
2014-11-12 07:07:00 +00:00
Graham Batty
dc6a776d10 stdlib: Use config directives to work without objective-c.
Swift SVN r23211
2014-11-10 20:06:25 +00:00
Graham Batty
373414864d Revert "Use config directives to carve out a 'portable' kernel stdlib."
This reverts commit r23202 pending further discussion.

Swift SVN r23205
2014-11-10 18:46:42 +00:00
Graham Batty
dfa260fab1 Use config directives to carve out a 'portable' kernel stdlib.
Swift SVN r23202
2014-11-10 18:03:09 +00:00
Dave Abrahams
6786969209 [stdlib] Introduce _SwiftDeferredNSArray
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
2014-10-24 15:48:48 +00:00
Dave Abrahams
418aa75eb2 [stdlib] Rename _NSSwiftXXX => _SwiftNativeNSXXX
...to better reflect the purpose of these classes

Swift SVN r22911
2014-10-24 15:48:46 +00:00
Erik Eckstein
d0697f2ac1 Make internal stdlib functions public, which are called from the stdlib tests.
And make sure that all those public identifiers are preceeded with underscores.

I marked these public-modifiers with "// @testable" to document why they are public.
If some day we have a @testable attribute it should be used instead of those public-modifiers.

Again, this is needed for enabling dead internal function elimination in the stdlib.



Swift SVN r22657
2014-10-10 09:45:10 +00:00
Dave Abrahams
2d850421bc [stdlib] Internalize HeapBuffer[Storage], OnHeap
They were never really useful to users, because their APIs were
insufficiently public.  They have been replaced with a single class,
ManagedBuffer<Value,Element>, which is really designed for user
consumption.

Swift SVN r22636
2014-10-09 21:45:44 +00:00
Dave Abrahams
c93f32a4b3 [stdlib] Eliminate needless intermediate class
Swift SVN r22415
2014-09-30 23:43:25 +00:00
Dave Abrahams
156020de19 [stdlib] Rename 'countElements' => 'count'
The name was not only long and unwieldy, but inconsistent with our
conscious decision to avoid the use of "elements" in APIs as mostly
redundant.

Swift SVN r22408
2014-09-30 22:00:26 +00:00
Dmitri Hrybenko
ae8c52969b StdlibUnittest: make testing return-autoreleased optimization reliable
On some platforms (for example, x86_64), the first call to
`objc_autoreleaseReturnValue` will always autorelease because it would
fail to verify the instruction sequence in the caller.  On x86_64
certain PLT entries would be still pointing to the resolver function,
and sniffing the call sequence would fail.

This change adds a "warmup" return-autoreleased sequence to the test
harness.

rdar://18385128

Swift SVN r22127
2014-09-19 14:06:57 +00:00
Dmitri Hrybenko
f9f3d26ee7 stdlib: improve comment
Swift SVN r22070
2014-09-18 12:41:18 +00:00
Dmitri Hrybenko
2475a4ea57 stdlib: mark _stdlib_AtomicInt class 'final'
Swift SVN r22067
2014-09-18 09:31:52 +00:00
Dmitri Hrybenko
4cf865de73 stdlib: factor all _NSXXXBase classes to a single place
Swift SVN r21969
2014-09-16 11:13:06 +00:00
Dmitri Hrybenko
d68a5c4c98 stdlib: finish implementation of atomics for initializing an ARC
reference, add tests

Swift SVN r21873
2014-09-11 14:52:58 +00:00
Dmitri Hrybenko
4b19606551 stdlib: fix definition of atomics for 32-bit platforms
Swift SVN r21837
2014-09-10 13:05:14 +00:00
Dmitri Hrybenko
96d00d70b5 StdlibUnittest: add infrastructure for race tests (see examples)
This will be used to test rdar://18191358

Swift SVN r21836
2014-09-10 11:58:45 +00:00
Dmitri Hrybenko
57983579ac stdlib: move declarations of runtime entry points for atomics to
Runtime.swift.gyb

Swift SVN r21832
2014-09-10 08:07:45 +00:00
Dave Abrahams
349e730c07 [stdlib] Add a missing mode string in a .gyb file
Swift SVN r21462
2014-08-26 19:59:04 +00:00
Dmitri Hrybenko
44bf1a81a6 stdlib/Printing: print floating point numbers with appropriate precesion for
the type

Printing Float32 with %0.15g not only wastes screen space, but also causes
confusion for users, and pretends that a Float32 has more precision than it
actually does.

rdar://18043123


Swift SVN r21435
2014-08-25 13:56:38 +00:00