Commit graph

409 commits

Author SHA1 Message Date
David Isinta Nyakawa
82338661b3
Fix Issue 10523 - Enabled BigInt to work in CTFE (#10725)
made biguint core ctfe valid by removing free keyword at compile time
2025-04-02 13:28:08 +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
Dennis
bf96b99fc2
Update to unicode 16.0.0 (#9058) 2024-10-16 06:24:56 +08:00
Paul Backus
d1dfd094f4 sumtype: add overload-set matching example
This is a useful technique, and non-obvious enough that other D
community members were surprised when I showed it to them.

The unusual formatting and code layout used here achieves the following
goals:

1. Have this example appear below "Basic usage".
2. Have the overload set appear as it would at module level.
3. Have as much of the example code unit-tested as possible.

Goal (2), in particular, rules out the use of a "wrapper" struct to
create an overload set of static methods, which is the technique that's
normally used to include an overload set in a unittest block.
2024-05-31 11:22:43 -04:00
Iain Buclaw
688816eb41 Merge remote-tracking branch 'upstream/stable' into merge_stable 2024-04-25 19:11:41 +00:00
Dennis Korpel
a92d08bcfc std.bigint: remove subSimple 2024-04-19 23:54:27 +02:00
Jonathan M Davis
34ff27e58d Work around bugzilla issue 24415 - only doesn't work with elements with a copy constructor.
Since the compiler is treating the auto-generated copy-constructor for
OnlyResult as private (thus rendering it useless outside of
std.range.package), this commit adds an explicit one and makes it
public. Once the dmd bug has been fixed, the explicit copy constructor
should be removed.
2024-04-09 09:08:12 +02:00
Dennis Korpel
f6b2932268 Remove explicit hex string casts 2024-03-19 23:48:15 +01:00
Dennis
f3ec8b767d
std.uni: replace dstring case table with uint[] hexstring (#8904) 2024-01-31 12:27:28 +02:00
Dennis Korpel
0cd85c7093 std.uni: use hex strings for TrieEntry 2024-01-26 23:30:51 +01:00
Dennis Korpel
e87bab2da2 std.uni: use hex strings for case entries 2024-01-25 10:32:13 +01:00
Dennis
fa7f22b2cf
std.uni: Use dstring for dchar tables (#8889)
* std.uni: use dstring for upper/lower/title tables

* std.uni: make tables use dstring

* Add space after cast for Dscanner

* Remove redundant semicolons
2024-01-10 17:48:25 +02:00
Dennis Korpel
135e9ad193 std.uni: optimize simpleCaseTable
Cuts size of simpleCaseTable entries in half (8 -> 4 bytes), reducing table size from 24 Kb to 12 Kb.
Still only 22 out of 32 bits per entry are actually used, so could be optimized further.
Using plain integers saves 10 ms semantic2 compile time.
2024-01-09 12:02:12 +01:00
Dennis Korpel
90715f3b07 std.uni: use dstring for compositionTable 2024-01-08 23:37:44 +01:00
Dennis Korpel
bdbce3b67d Use static array for table 2024-01-08 00:02:21 +01:00
Dennis Korpel
bd8b943fa2 std.uni: optimize fullCaseTable 2024-01-07 11:35:29 +01:00
Dennis Korpel
89d36e1228 std.uni: use hexstrings for charset strings 2024-01-06 17:49:13 +01:00
Dennis Korpel
a11fb5e3ed Upgrade std.uni to Unicode 15.1.0 2024-01-06 13:06:48 +01:00
Ate Eskola
e53a0aba9f Missing two tables & some clarrifications (Real author is Richard Cattermole, name changed while rebasing) 2023-01-14 17:07:05 +02:00
richard (rikki) andrew cattermole
e848d44d7f Emphasize DO NOT EDIT for the generated Unicode tables 2022-12-12 04:32:30 +13:00
richard (rikki) andrew cattermole
297370abc2 Add URL for Unicode table generator into the headers of the Unicode tables 2022-12-12 02:10:14 +13:00
richard (rikki) andrew cattermole
a1f2e760e7 Make Unicode tables module headers consistent and add DO NOT EDIT to it 2022-12-12 02:10:14 +13:00
richard (rikki) andrew cattermole
122df9272a Upstream Unicode table generator and update tables to v15 2022-12-12 02:10:14 +13:00
Geod24
9f008f2485 Remove usages of 'in' on Windows C bindings 2022-10-14 13:32:48 +02:00
Iain Buclaw
352258539c Fix 'the the' typos in Phobos documentation 2022-09-20 21:31:46 +02:00
Ilia Ki
f522ea4fcc
ditto 2022-05-29 22:07:47 +04:00
Ilia Ki
a9baa6aa3e
Update biguintx86.d 2022-05-29 21:59:57 +04:00
dkorpel
b3b0e74152 Unblock "address of ref can be assigned to non-scope parameter" 2022-02-17 00:44:02 +00:00
dkorpel
ea76f45494 Use return scope instead of just return 2021-11-26 17:03:06 +01:00
dkorpel
cd7389266e Add explicit return to inout functions 2021-11-16 23:22:33 +00:00
Sebastian Wilzbach
63712f491c Remove redundant access specifier from Phobos 2021-10-27 10:04:23 +03:00
Andrei Alexandrescu
4ded9c6796
Eliminate shared this from std/internal/windows/advapi32.d (#5467)
Eliminate shared this from std/internal/windows/advapi32.d

Signed-off-by: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
Signed-off-by: Petar Kirov <PetarKirov@users.noreply.github.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: unknown
2021-10-25 08:08:29 +00:00
dkorpel
9ec24190b1 add explicit scope/return for pure functions 2021-07-11 13:34:25 +00:00
dkorpel
5242beb167 add return scope to realloc 2021-06-08 09:32:30 +00:00
dkorpel
b1281eb67a add more return/scope to pure bigint functions 2021-05-30 01:10:13 +02:00
Walter Bright
f0e8bcf369
Merge pull request #8081 from nordlow/fix-pure-scope-bigint
Annotate std/bigint.d and std/internal/math/biguintcore.d to please d…
2021-05-18 09:40:09 -07:00
nordlow
a44f71813f Annotate std/bigint.d and std/internal/math/biguintcore.d to please dlang/dmd#12520 #8076 2021-05-18 13:14:08 +02:00
nordlow
93ea473f53 Annotate std/internal/digest/sha_SSSE3.d to please dlang/dmd#12520 2021-05-17 23:00:24 +02:00
Nathan Sashihara
efced87ae8 Again use core.math intrinsics instead of std.math wrappers
As in PR #7821 & PR #7825. Mostly changes imports
from std.math being divided into submodules.
2021-05-04 15:59:34 +02:00
berni44
b2019ebab0 Narrow imports of std.math in the rest of phobos. 2021-04-21 03:00:57 +02:00
Nathan Sashihara
52da0ef73c Throughout Phobos use core.math intrinsics instead of std.math wrappers
Followup to PR #7821.
2021-03-02 07:09:08 +01:00
Bernhard Seckinger
9cb7755041 Replace approxEqual with isClose 2021-01-28 10:39:50 +01:00
Martin Kinkelin
8b96f41d9e std.internal.math.gammafunction: Minimally relax 2 unittest checks
I don't remember on which platforms these checks failed with LDC.
2020-11-28 20:17:08 +01:00
Iain Buclaw
a7ba7644ff std.internal.math.gammafunction: Define MAXGAMMA, MAXLOG, MINLOG for FreeBSD x86 reals 2020-11-09 14:25:12 +01:00
Luís Ferreira
c6e24b6e24 math: wrap unused code inside of unittest block to increase coverage
This code affects code coverage and shouldn't be here at all.
Because it may help on debugging, it's not totally removed.

Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2020-10-19 16:15:39 +02:00
Walter Bright
43c7c32694 fix Issue 21182 - asm code is missing int ptr and so defaults to byte op 2020-08-22 13:46:07 +02:00
Walter Bright
bf258e56f2 structure SSSE3 array of constants 2020-08-18 07:32:49 +02:00
Martin Kinkelin
4d3ba080b7
Prepare for properly parsed float/double literals (#7591)
This fixes failing unittests with dlang/dmd#11387 on Linux x64 by
appending a L suffix to (some) literals, to keep full `real` parsing
precision (instead of double precision).
2020-08-14 21:06:56 +08: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
Nathan Sashihara
a0f4b65db8 Fix Issue 20889 - Support construction of std.bigint.BigInt from a sign and a byte-array magnitude
For consistency with other std.bigint functions allows arbitrary ranges.
2020-06-04 16:04:26 -07:00