Commit Graph

10 Commits

Author SHA1 Message Date
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
24fe53ed6c [stdlib] Propagate OutputStream docs
240 undocumented public non-operator APIs remain in core

Note: previous estimates were wrong because my regex was broken.  The
previous commit, for example, had 260 undocumented APIs.

Swift SVN r22234
2014-09-23 22:01:49 +00:00
Joe Groff
8338e69c86 Actually set up the 'rawValue' argument label on derived enum initializers.
Somehow, protocol conformance checking didn't actually care that this was missing...

Swift SVN r21898
2014-09-12 01:29:51 +00:00
Joe Groff
419ba5cbea Change RawRepresentable to use failable initializers and property requirements.
Redefine the RawRepresentable protocol to use an 'init?' method instead of 'fromRaw(Raw)', and a 'raw' get-only property instead of 'toRaw()'. Update the compiler to support deriving conformances for enums and option sets with the new protocol. rdar://problem/18216832

Swift SVN r21762
2014-09-06 18:40:14 +00:00
Dave Abrahams
1438d617cd [stdlib] Rename ConstUnsafePointer=>UnsafePointer
Swift SVN r20318
2014-07-22 17:10:54 +00:00
Jordan Rose
da29f099f0 Update stdlib for accessibility modifiers becoming context-sensitive keywords.
Swift SVN r19672
2014-07-08 02:17:46 +00:00
Dmitri Hrybenko
313cfcaaa7 Unicode trie generator: add tests for the generator itself that use non-default
trie parameters and fix a few bugs

The bugs did not affect correctness of the particular instance of trie created
for grapheme cluster property, because trie parameters that were confused with
each other happened to be equal.

Also, fix a trie size bug: we were creating a trie large enough to store
information for 0x200000 code points, but there are only 0x10ffff.  It saved
only 15 bytes in the grapheme cluster tree, because that extra information was
compressed with some supplementary planes that also had default values.  This
also improved trie generation time by almost 2x.


Swift SVN r19457
2014-07-02 10:29:52 +00:00
Dmitri Hrybenko
3f2006a00b stdlib/UnicodeTrie: add more comments, replace a _precondition()/#if
pair with _sanityCheck

Swift SVN r19395
2014-07-01 13:18:20 +00:00
Dave Abrahams
8e7d45f2c0 [stdlib] Normalize .gyb files
- Follow LLVM conventions for emacs mode specification

- Use local variables suffix to make the output read-only (at least on
  Emacs)

- But drop the admonitions not to edit the generated files;
  line-directive mostly takes care of that problem now.

Swift SVN r19381
2014-06-30 23:24:17 +00:00
Dmitri Hrybenko
4814e00fda stdlib/String: implement Unicode extended grapheme cluster segmentation
algorithm

The implementation uses a specialized trie that has not been tuned to the table
data.  I tried guessing parameter values that should work well, but did not do
any performance measurements.

There is no efficient way to initialize arrays with static data in Swift.  The
required tables are being generated as C++ code in the runtime library.

rdar://16013860


Swift SVN r19340
2014-06-30 14:38:53 +00:00