Commit Graph

2520 Commits

Author SHA1 Message Date
Doug Gregor
5240e9a442 Remove Vec4b/Vec4f. They can be added back when someone gives them more thought.
Swift SVN r6026
2013-07-05 22:57:08 +00:00
Dmitri Hrybenko
16d8ddc093 Revert wrong changes, did not intend to commit all that
Swift SVN r6010
2013-07-05 17:13:07 +00:00
Dmitri Hrybenko
b1b1c63be5 Add a comment for r6001
Swift SVN r6009
2013-07-05 17:11:38 +00:00
Dmitri Hrybenko
4277cfa89e Add tests for assertion routines
Also use Console.write() to print the assertion message because it uses
write(2) without buffering.


Swift SVN r5943
2013-07-01 19:58:07 +00:00
Dmitri Hrybenko
8b7b85f769 stdlib/POSIX: add getopt() bindings
Swift SVN r5891
2013-06-28 23:54:18 +00:00
Dave Abrahams
5ffcdaea98 [stdlib] Replace String storage with a reference-counted buffer with capacity
Allows us to use a copy-on-write strategy to efficiently grow Strings.
This should obviate the need for a StringBuffer class anytime soon and
make comfortable formatting efficient.

If we backslide and the COW/capacity functionality of String is no
longer doing its job, the test added here will appear to hang and
hopefully someone will be annoyed enough to fix it.  We can't do
better right now because performance measurements vary based on the
test platform.

Swift SVN r5845
2013-06-27 20:47:21 +00:00
Dave Abrahams
2e0ff6e8ca [stdlib] Add HeapBuffer: a reference-counted buffer of dynamic size
This will be useful in implementing Copy-On-Write value types

Swift SVN r5844
2013-06-27 20:47:18 +00:00
Doug Gregor
9a5c96a8c1 Introduce basic support for LLVM vectors as builtins.
This adds builtin types Builtin.VecNxT, where N is a natural number
and T is a builtin type, which map down to the LLVM type <N x T>. 

Update varous builtins to support vector arguments, e.g., binary
operations, comparisons, negation. Add InsertElement and
ExtractElement builtins for vectors.

On top of these builtins, add Vec4f and Vec4b structs to the standard
library, which provide 4xFloat and 4xBool vectors, respectively, with
basic support for arithmetic. These are mostly straw men, to be burned
down at our leisure.

Some issues as yet unresolved:
  - Comparisons of Vec4f'ss are producing bogus Vec4b's, which I
  haven't tracked down yet.
  - We still don't support the shuffle builtin, although it should be
  easy
  - More testing!



Swift SVN r5820
2013-06-26 21:16:36 +00:00
Chris Lattner
4aa4f66314 rename this test so we can generalize it.
Swift SVN r5712
2013-06-20 16:55:34 +00:00
Dmitri Hrybenko
255f0277b0 stdlib: Char: simplify implementation, expose the value as UInt32 instead of
Builtin.Int32, add tests


Swift SVN r5635
2013-06-18 00:11:05 +00:00
Doug Gregor
dd5626a154 Actually initialize the resulting dictionary when converting from a literal.
Fixes <rdar://problem/14167035>.


Swift SVN r5603
2013-06-15 22:44:24 +00:00
Dave Abrahams
b7b3e0b9cd [stdlib] Add policies for Callable things as a workaround for <rdar://problem/13251236>
(remapping bound function type not implemented yet)

Swift SVN r5454
2013-06-03 20:09:34 +00:00
Dave Abrahams
c5da3b6888 [stdlib] Add Indexable protocol and adapters
Swift SVN r5444
2013-06-03 20:09:24 +00:00
Dave Abrahams
6dbab32a4b [stdlib] Implement (and test) Vector<T>.takeArray()
Swift SVN r5299
2013-05-24 16:39:21 +00:00
Dave Abrahams
b2b4bf9f32 [stdlib] Incorporate CodePoints; split tests out accordingly
Swift SVN r5273
2013-05-22 21:05:47 +00:00
Dave Abrahams
24af18987b [stdlib] Generators and Adaptors
Allows us to write in terms of the "ideal" traversal protocol while
maintaining compatibilty with the existing one

Swift SVN r5101
2013-05-08 21:39:12 +00:00
Dave Abrahams
78cb2016e6 Add Zip2, which zips two Enumerables
Swift SVN r5077
2013-05-07 02:14:24 +00:00
Dave Abrahams
9e0ecddfb9 stdlib: add Optional<T>
Swift SVN r5020
2013-05-01 23:19:48 +00:00
Dave Abrahams
3f6a40b648 Add swift-level argv access
Swift SVN r4566
2013-04-01 22:47:25 +00:00
Joe Groff
c5933016e1 stdlib: Start updating the demangler.
Clean up the code so it better reflects the current mangling grammar. Implement demangling for concrete nominal types and some primitive types.

Swift SVN r4095
2013-02-20 01:41:08 +00:00