Commit graph

16804 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
The Dlang Bot
a7485d9857
Merge pull request #6749 from nordlow/const-bool-cast-findSplit
Qualify opCast(bool) as const for findSplit, findSplitBefore and findSplitAfter
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-11-05 20:15:11 +01: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
The Dlang Bot
a1112664fd
Merge pull request #6747 from CyberShadow/pull-20181101-212039
std.datetime.date: Clarify that add/roll mutate the current object
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-11-02 05:54:24 +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
The Dlang Bot
4514e3836c
Merge pull request #6745 from MartinNowak/merge_stable
Merge remote-tracking branch 'upstream/stable' into merge_stable
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-11-01 19:24:52 +01:00
Martin Nowak
ddbe050c22 Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-11-01 15:13:32 +01:00
Martin Nowak
4398218c80 purge changelog 2018-11-01 15:11:15 +01:00
The Dlang Bot
d5d287a921
Merge pull request #6744 from ibuclaw/sparcmath
std.math: Use SPARC_Any instead of SPARC64
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-11-01 02:49:15 +01: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
The Dlang Bot
9fcf1f1b77
Merge pull request #6742 from RichardPalme/fix-bitmanip-count
fixed issue 19338
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-10-30 22:08:40 +01: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
Sebastian Wilzbach
591c981772
Merge pull request #6740 from MartinNowak/merge_stable
Merge remote-tracking branch 'upstream/stable' into merge_stable
2018-10-27 02:38:22 +02:00
Martin Nowak
bf44bb571e Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-10-26 16:02:08 +02:00
The Dlang Bot
26eb3d45bc
Merge pull request #6739 from n8sh/issue-19331
std.regex.internal.ir.SmallFixedArray.toHash is ignored because it's non-const
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-10-25 10:38:51 +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
The Dlang Bot
6c448be177
Merge pull request #6402 from nordlow/iterative-traits
Make some traits iterative using static foreach
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-10-24 00:29:31 +02:00
Per Nordlöw
fc96b0a99d make some traits iterative using static foreach 2018-10-23 21:22:57 +02:00
The Dlang Bot
23a1a5f250
Merge pull request #6738 from Geod24/fix-issue-4957
Fix issue 4957 - std.concurrency rejects structs with Tid
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-10-23 11:15:17 +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
The Dlang Bot
262d59f5b5
Merge pull request #6729 from aG0aep6G/std.algorithm-botched-backticks
Ddoc: fix botched backticks
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-10-19 15:37:53 +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
Steven Schveighoffer
4e6f70a134
Merge pull request #6727 from n8sh/strip-ascii
Add ASCII fast path to stripLeft & avoid unnecessary decoding
2018-10-18 10:49:13 -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
dd68d61d53
Merge pull request #6728 from MartinNowak/merge_stable
Merge remote-tracking branch 'upstream/stable' into merge_stable
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-10-16 19:22:05 +02:00
Martin Nowak
2415b371c8 Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-10-16 16:12:51 +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
Martin Nowak
e474d7a22c Merge remote-tracking branch 'upstream/master' into stable 2018-10-16 12:55:59 +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
The Dlang Bot
a364ef4076
Merge pull request #6725 from MartinNowak/merge_stable
Merge remote-tracking branch 'upstream/stable' into merge_stable
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-10-06 11:38:29 +02: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
The Dlang Bot
da29950676
Merge pull request #6724 from aermicioi/master
Fix issue 17276 added additional case for objects that do not have as root class Object.
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-10-02 01:14:58 +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