Commit graph

13812 commits

Author SHA1 Message Date
Vladimir Panteleev
8889ef2f07
std.string: Optimize indexOf with start index a bit
Use of early returns improves readability and reduces the instruction
count in DMD's output.
2018-11-24 08:31:48 +00:00
Vladimir Panteleev
2f7854cc9a
std.string: Expose case-sensitive functions as separate overloads
Allow taking advantage of new nothrow/@nogc implementations from
nothrow/@nogc code.

Fixes issue 19429.
2018-11-23 22:44:06 +00:00
Vladimir Panteleev
f12e43e3b3
std.string: Optimize implementation for same-type case-sensitive search
Add a special case for case-sensitive search when the character size
of substrings matches. We do not need to decode in this case, so
perform a basic array search on the strings' representations.
2018-11-23 21:45:01 +00:00
Vladimir Panteleev
606465af0b
std.string: Refactor indexOf to a per-CaseSensitive template
Use the same code for case sensitive and insensitive search, but
refactor the case sensitivity parameter to a compile-time value under
the hood, so that each instantiation receives its own propagated
attributes.
2018-11-23 21:45:01 +00:00
Per Nordlöw
6b64ed9d57 Fix Issue 19366 - Qualify opCast(bool) as const for findSplit, findSplitBefore and findSplitAfter. 2018-11-05 10:48:27 -05:00
The Dlang Bot
f961aa8686
Merge pull request #6155 from wilzbach/fix-5502
Fix Issue 5502 - More handy ways to create associative arrays
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-11-03 23:30:21 +01:00
Vladimir Panteleev
d18d52641c
std.datetime.date: Clarify that add/roll mutate the current object
It was not clear from the documentation whether these methods mutate
the current object, or return a new object with the applied
modification. The fact that these functions have a non-void return
type adds to the confusion.

Clarify this by explicitly mentioning that the functions mutate the
current object, and add a "Returns:" DDoc section documenting that the
methods simply return `this`.
2018-11-01 21:24:52 +00:00
Iain Buclaw
918954a3d9 std.math: Use SPARC_Any instead of SPARC64 2018-11-01 01:24:46 +01:00
The Dlang Bot
c8afcb736b
Merge pull request #6741 from dukc/fuzzyTestFix
Removed an unittest of minimallyInitializedArray that can fail randomly
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-10-31 12:46:58 +01:00
dukc
84fe94c00e Removed an unittest of minimallyInitializedArray that can fail randomly 2018-10-31 12:38:38 +02:00
Sebastian Wilzbach
3cfe2c11fa Fix Issue 5502 - More handy ways to create associative arrays 2018-10-30 15:59:52 -04:00
Richard Palme
9d7f453f1f fixed issue 19338 2018-10-30 20:40:23 +01:00
The Dlang Bot
67cc14806d
Merge pull request #6737 from Andu033/master
Update the coding style in errorfunction.d
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-10-27 11:02:28 +02:00
Martin Nowak
bf44bb571e Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-10-26 16:02:08 +02:00
Nathan Sashihara
725278b2ce Fix Issue 19331 - std.regex.internal.ir.SmallFixedArray.toHash is ignored because it's non-const 2018-10-25 03:22:04 -04:00
Per Nordlöw
fc96b0a99d make some traits iterative using static foreach 2018-10-23 21:22:57 +02:00
Geod24
1f2da409cc Fix Issue 4957: std.concurrency rejects structs with Tid
In addition to the fix which makes it recurse in struct, the
instantiation was changed to not use recursive template instantiation,
exception for struct's tupleof.
2018-10-23 04:12:59 -04:00
Andu033
57ceb139c7
Update errorfunction.d 2018-10-21 16:15:08 +03:00
The Dlang Bot
e2709ee1e8
Merge pull request #6700 from schveiguy/fixsplitter
Allow no-arg splitter function to work on ranges that aren't standard strings
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-10-19 15:50:54 +02:00
Steven Schveighoffer
f7154ec86a Fix issue 19238 - Allow splitter on random-access ranges of characters that aren't
character arrays.
2018-10-18 11:05:57 -04:00
Nathan Sashihara
2e6c538dc6 Fix issue 19308 - optimize stripLeft
Add ASCII fast path to stripLeft & avoid redundant decoding.
2018-10-17 11:58:18 -04:00
aG0aep6G
08f76c2974 Ddoc: fix botched backticks 2018-10-16 23:37:17 +02:00
The Dlang Bot
76ef073df3
Merge pull request #6726 from FeepingCreature/fix/Issue-19297-handle-jsonvalue-signed-unsigned-comparison
Fix issue 19297: handle comparison of signed, unsigned and floating JSONValues as in D
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2018-10-16 14:57:03 +02:00
Mathis Beer
b07b215424 Fix issue 19297: handle comparison of signed, unsigned and floating JSONValues 2018-10-11 10:47:28 +02:00
The Dlang Bot
264ab218dc
Merge pull request #6723 from crocopaw/transposed
Fix Issue 19289 - std.range.transposed with enforceNotJagged not throwing
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-10-06 17:49:03 +02:00
devel
aaa00b7232 Fix Issue 19289 - std.range.transposed with enforceNotJagged not throwing 2018-10-06 10:53:31 -04:00
Martin Nowak
95a1713806 Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-10-05 17:26:18 +02:00
The Dlang Bot
0994f692e2
Merge pull request #6711 from FeepingCreature/fix/join-unassignable-const-arrays
Fix issue 19257: std.array.join: only remove const if you can actually assign const to non-const values
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-10-03 01:06:34 +02:00
Alexandru ermicioi
0648b8706f Fix issue 17276 added additional case for objects that do not have as root class Object. 2018-10-01 18:21:30 -04:00
The Dlang Bot
a531a9ca97
Merge pull request #6722 from rainers/issue19275
Fix Issue 19275 - std.process: redirecting output in a non-console application fails
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-10-01 12:56:37 +02:00
The Dlang Bot
a00b2e59af
Merge pull request #6719 from jpf91/aarch64
[AArch64] [GDC] Fix two small AArch64 bugs / typos
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-09-30 10:24:39 +02:00
Johannes Pfau
00301f0f0b AArch64: Fix typo in std.math 2018-09-30 09:28:47 +02:00
Johannes Pfau
5870efca77 Allow small differences in real number in test
The implementations are not equal and may lead slightly different
results (e.g. on AArch64 with GDC)
2018-09-30 09:28:41 +02:00
Rainer Schuetze
8f0aeedfc7 Fix issue 19275 - std.process: redirecting output in a non-console application fails
MS runtime up to VS2013 used pseudo handle _NO_CONSOLE_FILENO in that case
2018-09-29 20:37:45 +02:00
Ryan David Sheasby
3dfbbe7dbc
Fix typo 2018-09-27 08:37:30 +02:00
The Dlang Bot
656798f2b3
Merge pull request #6717 from ibuclaw/bshedversion
[refactor] posix.mak: Enforce whitespace before opening parenthesis for version …
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-09-26 15:39:36 +02:00
Iain Buclaw
f8e19a134f posix.mak: Enforce no whitespace after opening parenthesis for version conditions 2018-09-23 17:38:58 +02:00
Iain Buclaw
10847bcf1d std.stdio: Remove redundant enum declarations 2018-09-22 23:35:10 +02:00
Iain Buclaw
fd5facfe04 posix.mak: Enforce whitespace before opening parenthesis for version conditions 2018-09-22 16:57:24 +02:00
Mathis Beer
7a32298747 Fix issue 19257: Only remove const on .join if you can actually assign const to non-const values. 2018-09-21 11:43:40 +02:00
The Dlang Bot
c029ef2ead
Merge pull request #6715 from dcarp/patch-2
Fix formattedRead throwing Exception
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-09-21 01:09:44 +02:00
The Dlang Bot
0032c8d580
Merge pull request #6692 from n8sh/allocate-zeroed-pt2
Implement allocateZeroed for building-block allocators
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-09-20 21:46:07 +02:00
Dragos Carp
838f5994ed
Fix formattedRead throwing Exception
formattedRead is documented as throwing FormatException.
2018-09-20 21:28:50 +02:00
The Dlang Bot
60c801872d
Merge pull request #6712 from Biotronic/Issue-19240
Fix issue 19240 - std.typecons.Tuple should check for reserved identi…
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-09-20 19:42:52 +02:00
wolframw
0f999e0a0a fix issue 18851 2018-09-20 18:52:31 +02:00
Mathis Beer
c156f4ad95 Fix issue 19252: avoid ridiculous format length overestimate; dynamic-width strings should estimate width 0, not int.max 2018-09-19 21:13:21 +02:00
Simen Kjærås
ad8361b369 Fix issue 19240 - std.typecons.Tuple should check for reserved identifiers 2018-09-19 08:28:06 +02:00
Iain Buclaw
a55fcb7349 std.math: Remove support for IBM extended reals 2018-09-15 12:07:21 +02:00
aG0aep6G
b9fe8b9ed0
Ddoc: fix unescaped dollar sign 2018-09-13 19:22:55 +02:00
Iain Buclaw
2d458405e1 std.typecons: Unittest isn't safe 2018-09-11 01:18:07 +02:00