David Simcha
d6cefbcf7e
Fix unittests in std.range.
2010-06-23 13:07:31 +00:00
David Simcha
6f1dc2378d
save() for std.algorithm.filter, WITH proper unittests.
2010-06-23 12:45:32 +00:00
Lars T. Kyllingstad
80974fc70e
Fixed unlisted bug: std.range.cycle() doesn't work with infinite ranges.
...
It was attempted to use the eponymous template trick inside a templated struct, like this:
struct Cycle(R)
{
static if (isInfinite!R) alias R Cycle;
...
}
but of course that doesn't work. I've written the isInfinite case as a separate template instead, and added a unittest for it.
2010-06-23 08:53:42 +00:00
Sean Kelly
d144aa0061
Added static checking to forbid spawn or send params containing aliases to mutable thread-local data (ie. immutable and shared are both allowed).
2010-06-23 04:52:47 +00:00
Shin Fujishiro
b5a054159c
Fixed bugzilla 978: std.utf's toUTF* functions accept some invalid and reject some valid UTF.
...
* Fixed decode() to accept U+FFFE and U+FFFF.
* Changed some assert contracts (which check input for validity) to if-throw.
* Fixed static array argument to be passed by ref (regression).
2010-06-23 03:03:56 +00:00
Masahiro Nakagawa
8854724323
bugzilla 4363: std.algorithm.Until is not a forward range
2010-06-23 00:54:07 +00:00
Andrei Alexandrescu
94855ad96c
Improved iota
2010-06-22 22:45:26 +00:00
Sean Kelly
114c40a947
Added hasLocalAliasing!T as an analog of hasAliasing!T which evaluates to false for shared T as well as immutable T. Gratuitous code duplication, but it keeps the two template routines logically separate, which is nice. This is being added to support static analysis of parameters in std.concurrency.
2010-06-22 22:35:06 +00:00
Lars T. Kyllingstad
d2ee581d50
Fix "statement is not reachable" warnings in std.concurrency.
2010-06-22 17:02:59 +00:00
David Simcha
11de4c570c
Bug 4362: std.range.repeat and cycle do not have a .save() method
2010-06-22 12:31:44 +00:00
Lars T. Kyllingstad
032d9dab2d
Fixed bug 3202: std.math.pow cause dead loop
2010-06-22 07:12:24 +00:00
Shin Fujishiro
5160b4e052
Fixed typecons.Tuple static assert failure
2010-06-22 05:33:16 +00:00
Don Clugston
11d92705e4
B sting. I think this is the last one.
2010-06-21 20:24:25 +00:00
Don Clugston
80edeca151
Two more B stings.
2010-06-21 20:22:18 +00:00
Don Clugston
33ee9fbaaf
B sting: a&b==c bug.
2010-06-21 20:21:26 +00:00
Sean Kelly
ebf24cc632
This should fix the issues with sending and receiving Tuples.
2010-06-20 04:48:43 +00:00
Sean Kelly
3229f1aa37
Cleaned up ctor def. I can still get bizarre compile errors in some cases, but I don't think the remaining ones are ctor-related.
2010-06-19 18:53:51 +00:00
Sean Kelly
7bd396b135
Fixed compile error for unittest. The concurrency unittest still hangs when sending an explicit tuple though, because it isn't matching correctly. Fixing that now.
2010-06-19 18:17:20 +00:00
Sean Kelly
3f20e149fc
Added a default ctor for Tuple (needed to put a Tuple in a Variant).
...
Fixed an issue with the Tuple copy ctor. It now compiles.
Added prioritySend per TDPL. Needs more testing, but it looks good so far.
2010-06-19 06:46:39 +00:00
Sean Kelly
daded040c0
Fixed a segfault calling convertsTo for large types.
2010-06-19 05:58:20 +00:00
Don Clugston
b6e2b3f692
Fixed glossary link (bug 3896). But there are TWO different versions of std.ddoc -- which one is the correct one?
...
Walter modified this one a week ago, so I'm guessing it is this one.
2010-06-18 19:32:34 +00:00
Sean Kelly
b5fc866431
Implemented setMaxMailboxSize(). Also added docs for some functions. The receive() method is still more complicated than I'd like, mostly because of the special handling of the OwnerTerminated message.
2010-06-18 07:20:55 +00:00
Sean Kelly
14ee7621a3
The void initializer for "ubyte[size] store" caused a compile error to be generated when assigning Variant.init to a variant value (voids have no value). Since initialization is taking place anyway it seems pointless to have the "=void" here so I'm removing it.
2010-06-18 05:53:46 +00:00
David Simcha
73f91e5d72
Add infiniteness propagation to Map, Filter.
2010-06-18 02:31:03 +00:00
David Simcha
2d576cfb8d
Bug 2872: Length, opIndex for Map
2010-06-18 02:18:55 +00:00
David Simcha
69fddbe212
Bug 3439: std.range.Sequence.opIndex not consistent after calling popFront().
2010-06-18 01:47:10 +00:00
David Simcha
eee2ea59bd
Bug 3436: std.functional.compose with only one function
2010-06-18 01:21:17 +00:00
David Simcha
791ee0460d
Bug 4171: std.random.uniform does not work for a range of characters
2010-06-18 01:05:36 +00:00
Sean Kelly
a9b75b725f
Fixed SList.insertAfter to actually use the supplied range as a hint for where the insertion should occur.
2010-06-17 22:39:30 +00:00
Shin Fujishiro
251d447850
std.traits: Added workaround for compiler bug 4333.
...
Added unittests for regression bug 4312 (caused by bug 4333). This regression bug is just workarounded, not fixed, so I don't mark it as fixed. The bug 4312 will be closed when compiler bug 4217 or 4333 is fixed (these are blockers against this regression 4312).
Made some templates to print error message on failure, rather than just failing instantiation.
2010-06-16 22:41:46 +00:00
Sean Kelly
534e5497e6
Changed spawnLinked so the owner relationship is preserved. The thread link takes precedence when one of the linked threads terminates, but if the link is broken (via the not yet implemented unlink() routine) then an OwnerTerminated exception will still be thrown when the owner terminates.
2010-06-16 18:48:01 +00:00
Lars T. Kyllingstad
cc1cb99255
4327 - std.container.Array.Range.~this() tries to call free(T[])
2010-06-16 09:31:28 +00:00
Shin Fujishiro
80716f3150
Restored an assertion commented out in r1643. It was my local problem (related to bug 3779 and 4298) and linker error does not occur for other people.
...
The other assertion commented out in the same changeset is not restored because its validity depends on bug 4237.
2010-06-16 00:27:55 +00:00
Shin Fujishiro
b2d816da2b
Added changelog and unittest for bug 4109.
2010-06-16 00:27:45 +00:00
Sean Kelly
2206b4233c
Fixed compile error in spawnLinked.
2010-06-15 22:03:40 +00:00
Sean Kelly
a980bb4ec2
Added spawnLinked as an experimental feature to test bidirectional linking. A spawnLinked thread won't have an owner, but if either it or the calling process terminates a LinkTerminated exception will be thrown from receive() when called by the other. Another difference is that this exception will be thrown once message list processing has passed through enough of the queue to encounter it rather than when no valid matches were found in the queue and the caller would have to block. I'd like to change the OwnerTerminated mechanism to work the same way (ie. throw when the message is encountered rather than continue scanning the queue looking for valid messages) but this warrants further discussion.
2010-06-15 21:30:06 +00:00
Lars T. Kyllingstad
e89be73a46
Made std.string.icmp() a template function and fixed issue 3386, "to!bool(string) is not implemented"
2010-06-15 08:40:50 +00:00
Lars T. Kyllingstad
9b426a8add
One more unittest for std.string.cmp()
2010-06-14 19:41:03 +00:00
Shin Fujishiro
db2a794961
Commented out an assertion. For some reason it caused a link error about __dollar on unittest.
2010-06-14 15:36:29 +00:00
Shin Fujishiro
4ceb920f40
Fixed reopened bug 4109: writeln doesn't work with empty static array
2010-06-14 15:36:17 +00:00
Lars T. Kyllingstad
6ae2dd14d8
3355 - std.string.cmp works incorrectly for mixed-type and different-length strings
2010-06-14 14:07:27 +00:00
Lars T. Kyllingstad
5e624d18c2
2275 - std.utf.toUTF16z() should return const(wchar)*
2010-06-14 13:40:18 +00:00
Lars T. Kyllingstad
5d1a02bba5
3447 - std.file uses unconventional file permissions
2010-06-14 10:57:16 +00:00
David Simcha
4459b1dca6
Bug 4306: std.numeric.CustomFloat doesn't work on Mac OS X.
2010-06-13 23:34:05 +00:00
Masahiro Nakagawa
e219831f74
Move 'import std.conv' to outside of 'version(unittest)'. CustomFloat requires std.conv.text.
2010-06-13 18:57:00 +00:00
David Simcha
bb1a55b4a6
Added save() for std.range.repeat.
2010-06-13 15:48:00 +00:00
Masahiro Nakagawa
32605802a0
Fix unittest of std.container.SList
2010-06-13 15:41:50 +00:00
Walter Bright
cd0512c962
Sean's update
2010-06-12 20:57:44 +00:00
Walter Bright
245e29f630
notify gc of malloc'd data
2010-06-12 20:56:25 +00:00
Sean Kelly
eb019b9df3
Added owner/owned thread behavior. One bug remains where messages from an owned to an owner thread about owned thread termination aren't remoevd from the queue. Annoying, but just a leak and I'm out of time.
2010-06-12 13:13:08 +00:00