Commit graph

294 commits

Author SHA1 Message Date
Walter Bright
3061c451d2 [dmd-cxx] printf format fixes 2021-04-02 13:53:32 +08:00
Iain Buclaw
a98d770398 std.internal.math.gammafunction: Define MAXGAMMA, MAXLOG, MINLOG for FreeBSD x86 reals 2020-11-24 12:26:03 +01:00
Steven Schveighoffer
a181958b93 Fix issue 18084 - tempCString type should not change layout when used in
unittests.
2019-04-06 14:46:59 +02:00
Iain Buclaw
dd2edb247f Synchronize dmd-cxx with gdc-stable 2019-01-05 14:10:15 +01:00
H. S. Teoh
9091b16f5c Add unittest.
Needs to be a standalone module because the problem does not show up
within std.range itself.
2017-08-11 08:48:23 -07:00
Sebastian Wilzbach
70f06b2357 Remove old, redundant private import access specifier
Very very old versions of D (well into 0.x) had imports public by default,
like C header files. This modernizes the codebase and removes the
redundant `private` access specifier.
This has been done with:

sed "s/private import/import/g" -i **/*.d
2017-07-11 12:28:39 +02:00
Andrei Alexandrescu
2f16ae7cb7 Eliminate shared this from std/process.d 2017-06-15 17:01:43 +02:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
This reverts commit 998ad51fd7.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
998ad51fd7 Sort selective imports 2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d Sort imports 2017-06-12 07:54:38 +02:00
David Nadlinger
3662b6ff55 std.mathspecial: erf*() for quad-precision reals
Like the 80 bit real implementation, this is a translation of
CEPHES code.

Verified on LDC/AArch64.
2017-06-10 23:06:53 +01:00
Andrei Alexandrescu
78b3328faa Get rid of static this for initializing encoding 2017-05-23 19:17:47 -04:00
Jack Stouffer
4ce5d44dbb Use underscores for number literals with five or more digits 2017-02-23 09:45:49 -05:00
Sebastian Wilzbach
a1bb0515fc Automatically add spaces to binary operators (>=)
command:

sed -E "s/([[:alnum:]]) >= ([[:alnum:]])/\1 >= \2/g" -i **/*.d
sed -E "s/([[:alnum:]])>= ([[:alnum:]])/\1 >= \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) >=([[:alnum:]])/\1 >= \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
203755d296 Automatically add spaces to binary operators (>>)
command:

sed -E "s/([[:alnum:]]) >> ([[:alnum:]])/\1 >> \2/g" -i **/*.d
sed -E "s/([[:alnum:]])>> ([[:alnum:]])/\1 >> \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) >>([[:alnum:]])/\1 >> \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
ef7be4b60d Automatically add spaces to binary operators (<<)
command:

sed -E "s/([[:alnum:]]) << ([[:alnum:]])/\1 << \2/g" -i **/*.d
sed -E "s/([[:alnum:]])<< ([[:alnum:]])/\1 << \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) <<([[:alnum:]])/\1 << \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
d905ef53b1 Automatically add spaces to binary operators (<=)
command:

sed -E "s/([[:alnum:]]) <= ([[:alnum:]])/\1 <= \2/g" -i **/*.d
sed -E "s/([[:alnum:]])<= ([[:alnum:]])/\1 <= \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) <=([[:alnum:]])/\1 <= \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
0b33b50812 Automatically add spaces to binary operators (!=)
command:

sed -E "s/([[:alnum:]]) != ([[:alnum:]])/\1 != \2/g" -i **/*.d
sed -E "s/([[:alnum:]])!= ([[:alnum:]])/\1 != \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) !=([[:alnum:]])/\1 != \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
a2c6398332 Automatically add spaces to binary operators (==)
command:

sed -E "s/([[:alnum:]]) == ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]])== ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) ==([[:alnum:]])/\1 == \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Andrei Alexandrescu
30724e67d9 Merge pull request #5166 from wilzbach/dscanner-unittest-safe-or-system
Dscanner: let unittest be @safe or @system
2017-02-22 14:44:08 -05:00
Sebastian Wilzbach
a36cec8686 DScanner: automatially set all unattributed unittests to @safe or @system 2017-02-22 05:42:04 +01:00
Sebastian Wilzbach
425ab667a3 Automatically set the range style from a..b -> a .. b
Commands:

sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
Sebastian Wilzbach
805c720595 Unify Phobos by ensuring there's always a space after cast(...)
Command:

sed -E 's/([^"])cast\(([^)]*?)\)([[:alnum:]])/\1cast(\2) \3/g' -i **/*.d
2017-02-21 16:40:20 +01:00
Sebastian Wilzbach
5521541032 Unify assert style to have no spaces between the first brace
Application of:

sed -E "s/assert +\(/assert(/" -i **/*.d
2017-02-21 15:27:15 +01:00
Sebastian Wilzbach
a58f6cd249 Dscanner: enable check for conflicts with builtin properties 2017-02-20 14:13:57 +01:00
Sebastian Wilzbach
87dec58a41 DStyle: Constraints on declarations should have the same indentation level 2017-02-17 07:36:23 +01:00
Martin Nowak
7ae36bf176 Merge remote-tracking branch 'upstream/stable' into merge_stable 2017-01-15 01:30:10 +01:00
Nick Treleaven
c32a2f4eda Remove old code - copying is allowed 2017-01-10 12:13:49 +00:00
Nick Treleaven
9118661ca2 Tweak ScopeBuffer docs
* Fix ddoc for commented out `this(this)` showing in `put`'s docs.
* Fix missing ddoc for `put(CT[])` due to private `CT`.
* Use documented unittest for scopeBuffer instead of inline code.
2017-01-09 16:52:04 +00:00
Martin Nowak
19641412f6 Merge remote-tracking branch 'upstream/master' into stable 2017-01-07 04:00:22 +01:00
Martin Nowak
12c56c935c partly fix Issue 9378 - SHA1 asm not PIC compatible
- access SHA1 constants through extra register in x64 code
- tried same for x86 but there is no register left and
  loading constants via stack was way too slow
2016-12-24 16:26:23 +01:00
Sebastian Wilzbach
c352281212 Enforce Allman style for do { 2016-12-09 17:40:50 +01:00
somzzz
682536d586 fix issue 155421 2016-12-08 13:43:56 -08:00
Jack Stouffer
0fed86c07b Removed uses of the delete keyword from std.internal.math.biguintcore.d 2016-10-26 08:59:44 +01:00
Martin Nowak
9d73d18c0c fix Issue 16291 - EncodingScheme.create fails
- add EncodingScheme.register overload that references the registered class
- just adding the FQN name of a class does not reference that class, so
  it must not end up in the binary and subsequently EncodingScheme.create failed
- This used to work by chance b/c all the EncodingScheme implementations
  were in a module w/ static ctor. Any user of std.encoding did drag in
  that ModuleInfo, which in turn referenced all classes of std.encoding.
  Since moving the static ctor to std.internal.phobosinit to break a
  cycle, the classes were no longer referenced by a ModuleInfo w/ shared
  ctor, so they wouldn't end up in the binary unless explicitly
  referenced elsewhere.
- deprecate the old EncodingScheme.register(string fqn) b/c relying on
  Object.factory is slow, error prone (linkage), and really unnecessary
- import encodinginit in std.encoding so that the
  std_encoding_shared_static_this callback actually gets run
2016-10-05 01:54:22 +02:00
Martin Nowak
ebbdf21a7e fix Issue 16580 - spawnShell segfaults on macOS
- partially Revert "Merge pull request #4493 from schveiguy/fixcycles2"
- recreate processinit (and import it from std.process)
  to call std.process shared ctor w/o creating a cycle
- keep it separate from phobosinit to not drag std.encoding
  into any binary using std.process
2016-10-04 23:56:38 +02:00
Andrei Alexandrescu
1efaba0af3 Merge pull request #4786 from WalterBright/cstring-array
cstring: add opIndex to result
2016-09-16 07:45:01 -04:00
Jack Stouffer
0cb88c508d Mark the internal unicode code as package 2016-09-15 08:42:57 +01:00
Walter Bright
60d6169d70 csting: add opIndex to result 2016-09-14 12:49:07 -07:00
Walter Bright
9c5401ce92 fix tempCString() to follow strict scope rules 2016-08-24 01:34:57 -07:00
Jack Stouffer
4f81cb0f63 Added const and immutable to several variables in std.internal.math.biguintcore 2016-07-26 15:54:26 -04:00
Walter Bright
821283c592 cstring.d: fix unsafe use of .ptr 2016-07-25 12:57:46 -07:00
Jack Stouffer
880b13313c Remove too broad local import from phobosinit 2016-07-06 10:00:39 -04:00
Steven Schveighoffer
df168487fc Fix cycles in Phobos 2016-06-28 15:00:01 -04:00
Sebastian Wilzbach
ec47ac4224 Remove the WEB macro in favor of HTTP
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Sebastian Wilzbach
1d34a121e9 apply all-man braces in Phobos
// find common cases
sed -E "s/^(\s*)((if|static if|for|foreach|foreach_reverse|while|unittest|switch|else|version).*)\s*\{$/\1\2\n\1{/" -i **/*.d
// catch else-if
sed -E "s/^(\s*)} (else static if| if|else if|else)(.*)\s*\{$/\1}\n\1\2\3\n\1{/" -i **/*.d
// remove created trailing whitespace
sed -i 's/[ \t]*$//' **/*.d
2016-05-31 13:07:53 +02:00
Sebastian Wilzbach
2dfbc51f17 Standardize whitespace after imports
Unified with:

sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
Jack Stouffer
fafb15bf1c Fixed long lines in unicode_norm.d 2016-05-10 20:51:39 -04:00
Jack Stouffer
547d9aad14 Fixed long lines in unicode_decomp.d 2016-05-10 20:51:39 -04:00
Jack Stouffer
8cd97964a7 Fixed long lines in std/internal/unicode_tables.d 2016-05-10 20:51:39 -04:00