John Colvin
bea3184479
Add low-overhead InPlaceAppender
( #8789 )
...
- Internal for now.
- Previously known as `FixedAppender` (during development).
Co-authored-by: Elias Batek <0xEAB@users.noreply.github.com>
2025-01-19 08:03:43 +08:00
Sebastian Wilzbach
0124e4772a
Add isSliceOf to check the origin of a slice ( #6147 )
2024-12-26 14:22:29 +08:00
Martin Kinkelin
b0ef9ac009
Merge remote-tracking branch 'origin/stable' into merge_stable
2024-11-17 01:17:07 +01:00
Steven Schveighoffer
567b3758de
Fix appender code that might not initialize memory that might point at huge allocations ( #9084 )
2024-11-15 07:59:01 +08:00
Vladiwostok
231ae8b68a
Fix D-Scanner linting issues ( #9070 )
...
* Fix UndocumentedDeclarationCheck linting issue
* Fix IfConstraintsIndentCheck linting issue
* Address feedback
* Fix publictests CI
* Fix old (libdparse) D-Scanner linting warn
2024-10-27 01:21:56 -07:00
Nick Treleaven
f11b19d411
Fix Bugzilla 24698 - Appender needs to expose readonly property 'size_t length' without using 'data' property
...
Add `length` property rather than `app[].length`.
Also remove `@trusted` attribute from `@safe` function.
2024-08-09 00:32:24 +02:00
Nick Treleaven
4641576812
Fix Bugzilla 20872 - std.array.assocArray trusts user-provided 'front… ( #9036 )
2024-07-31 20:07:23 +08:00
Dennis Korpel
2959a22641
Bugzilla 23300 - add testcase for std.array on scope InputRange
2024-07-21 13:12:30 +02:00
Nick Treleaven
17bafda797
Fix assert on array literal ( #8851 )
...
Needed for https://github.com/dlang/dmd/pull/15837 .
2023-11-21 07:20:13 +08:00
Nick Treleaven
3a8d5018bc
[std/array] Split staticArray overloads into two groups
...
It's easier to follow with the range overloads separate.
Tweak wording.
2023-08-12 02:21:04 +02:00
Christian Koestlin
1720e03241
fix Issue 6106 - Keep track of changes during replace function
...
The functions without the newly introduced parameter forward
to the full implementation to reduce code duplication.
2023-03-05 12:49:26 +01:00
Nathan Sashihara
68c7ec8d25
Fix recent isPointer changes to use is(T == U*, U) instead of is(T : U*, U)
...
The behaviors are different and the changes appear accidental rather
than deliberate. In at least one case the change would result in wrong
behavior:
https://github.com/dlang/phobos/pull/8635#issuecomment-1433898162
Affected PRs: #8635 , #8636 , #8637 , #8638 , #8639
2023-02-16 19:46:24 -05:00
RazvanN7
61658d2372
Remove alias this from classes in phobos
2023-01-26 14:35:08 +02:00
Razvan Nitu
662055e60a
Merge pull request #8636 from WalterBright/arrayIsPointer
...
remove use of isPointer from std.array
2022-12-01 18:08:28 +08:00
Walter Bright
2c7e732236
replace isImplicitlyConvertible with is expression
2022-12-01 00:52:55 -08:00
Walter Bright
12bb393be3
remove use of isPointer from std.array
2022-11-30 23:36:17 -08:00
Nick Treleaven
94997e70fb
[std/array] Fix wrong Appender docs 'global locking for each append'
...
@schveiguy explained there is a thread-local cache that avoids a global
lock once the cache is filled.
See https://github.com/dlang/dlang.org/pull/3445#discussion_r1002773401 .
Add link to spec (capacity LREF already exists just above Appender).
2022-11-01 19:18:27 +01:00
Per Nordlöw
05d6e97d1e
Use ref element in foreach in assocArray to avoid any calls to copy constructor of element type
2022-10-20 14:12:46 +02:00
Nick Treleaven
281f42d306
Fix missing unittests in docs ( #8603 )
...
* Fix missing staticArray unittest in docs
Found using https://github.com/dlang/dmd/pull/14527 .
* Fix missing FloatRep and DoubleRep unittests in docs
* 2 JSONValue op overloads
* std.random
* detabber
* remove
* std.digest.murmurhash
2022-10-17 05:43:13 +08:00
Walter Bright
61e2bc08cb
more static class in std.array
2022-08-15 06:21:45 -07:00
Walter Bright
89049160cc
make nested class & struct static
2022-08-15 11:48:48 +00:00
Max Haughton
e7724164b2
Fixes issues 22185, 22673 ( #8359 )
...
Fixes issues 22185, 22673
Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2022-01-26 11:24:59 +00:00
H. S. Teoh
75d7378f66
Fix issue 14892: std.array.array support for -profile=gc.
2022-01-18 11:32:13 -08:00
Ate Eskola
ee836dd748
Completed attribute lithany on sameTail
and sameHead
2021-09-15 03:09:09 +00:00
Ate Eskola
c5c559343d
fix issue 20937 - std.range.array of a lengthless range with indirection is not @safe
2021-08-24 23:15:08 +03:00
lucica28
95c0aa6786
[DSSv3] Fix issue - 16339 ( #8181 )
...
[DSSv3] Fix issue - 16339
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2021-07-30 15:40:04 +00:00
John Colvin
220e92223e
Change private variable canExtend to tryExtendBlock to reflect use
2021-07-20 10:42:00 +00:00
dkorpel
9ec24190b1
add explicit scope/return for pure functions
2021-07-11 13:34:25 +00:00
Luís Ferreira
47546dd850
std: array: refactor std.array unittest blocks and attribute annotation ( #8155 )
...
std: array: refactor std.array unittest blocks and attribute annotation
Signed-off-by: Mathias LANG <pro.mathias.lang@gmail.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2021-07-07 14:14:44 +00:00
berni44
6f2a0934a7
Adapt imports of std.format to new structure of std.format.
2021-03-19 13:22:00 +01:00
Ate Eskola
a9081b1828
Miscellaenous improvements to std.array unit tests
2021-03-08 18:40:44 +02:00
Boris Carvajal
276053dd07
Remove a few uses of fully qualified names that rely on a DMD bug
2021-02-22 08:16:13 -03:00
Martin Kinkelin
1a459c5996
Get rid of std.conv.emplace[Ref](), use core[.internal].lifetime
...
The emplace() stuff was moved to druntime; for some reason, it's still
in Phobos.
I've diffed the two versions, and they are still almost identical (incl.
unittests); the druntime version appears to have seen some improvements
(e.g., forwarding r/lvalueness of the arguments) in the meantime.
2021-01-17 16:02:25 +01:00
Vladimir Panteleev
fe60735735
std.array: Don't assume that .idup of immutable array will reallocate
2020-11-24 14:56:38 +01:00
Kazuya Takahashi
f3c8d75a9e
Fix Issue 21256 - Segfault with Appender!string.init.toString()
2020-11-18 00:17:44 +01:00
Richard Manthorpe
10e862b458
Fix Issue 21337: Join can iterate ranges multiple times
2020-10-23 20:47:48 +02:00
Steven Schveighoffer
17ae8fc9be
Make it so std.utf can be tested with no autodecoding.
2020-08-17 06:53:34 +02:00
Steven Schveighoffer
6065ce793c
Fix 21131. Detect certain string appending situations and properly
...
handle them.
2020-08-07 13:03:26 +02:00
Andrei Alexandrescu
42138c021c
Replace Unqual-based idiom with immutable-based idiom ( #7576 )
...
Replace Unqual-based idiom with immutable-based idiom
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2020-08-04 04:32:14 +02:00
Nathan Sashihara
453faadf5b
Replace is(Unqual!T == Unqual!U) with is(immutable T == immutable U) for speed & memory usage
2020-08-03 15:07:32 +02:00
Geod24
04f3979317
Replace 'Issue XXX' with Bugzilla links
...
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Adam D. Ruppe
ae93f5317c
Use consistent quickindex wrapper around hand-written list-of-links tables
2020-02-21 21:04:05 -05:00
Alexandru Militaru
bb62aaca3d
Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest
2020-01-19 14:05:17 +02:00
MoonlightSentinel
2ef69be4b2
Remove deprecated Appender.toString overload
2019-11-16 18:23:04 +01:00
Walter Bright
e7aa772fb5
array.d: replace Error with assert()
2019-09-12 22:32:00 -07:00
Vladimir Panteleev
fe87dc7c42
Fix Issue 20186 - File size of "Hello, world" executable increased by 185KB
...
We can delay the std.format import until the relevant templates are
instantiated.
2019-09-01 03:24:17 +00:00
The Dlang Bot
858b1d4a46
Merge pull request #7134 from WalterBright/array-nad2
...
fix assocArray() unittests for no autodecode
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2019-08-16 01:16:26 +02:00
The Dlang Bot
5b83b74bf1
Merge pull request #7135 from WalterBright/array-nad3
...
fix unittests for array.join() for no autodecode
merged-on-behalf-of: Walter Bright <WalterBright@users.noreply.github.com>
2019-08-15 10:28:27 +02:00
Walter Bright
ce46d9ae20
fix unittests for array.join() for no autodecode
2019-08-14 23:54:58 -07:00
Walter Bright
1d0153dc58
fix assocArray() unittests for no autodecode
2019-08-14 23:28:03 -07:00