Commit graph

14307 commits

Author SHA1 Message Date
Nathan Sashihara
3586763213 Fix Issue 20192 - Make std.math.isSubnormal work in CTFE 2019-09-04 13:10:33 -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
aG0aep6G
018e93cc3e avoid appender in formatElement for strings
On the downside, the new code loops twice over the source
string, meaning it `decode`s every character twice.

On the upside, it writes only one time to memory, avoiding one
or more allocations and a copy from the temporary buffer to the
actual destination.
2019-08-31 22:51:11 +02:00
aG0aep6G
e13a397c61 avoid generating a closure in sformat 2019-08-31 22:28:12 +02:00
JinShil
0de2d66760 Replace hash_t and sizediff_t with size_t and ptrdiff_t 2019-08-31 04:39:57 +09:00
Mike
b3416948d9 Replace sizediff_t with ptrdiff_t in std.random.d 2019-08-30 17:38:39 +09:00
Nicholas Wilson
4acd38d98a
Merge pull request #7149 from BoQsc/patch-1
std.net.curl: Fix example in HTTP documentation
2019-08-30 13:25:15 +08:00
Martin Kinkelin
fe38be185b Fix std.variant unittest
Accomodate for the fact that a `VariantN!24` without explicit allowed
types is at least `real` aligned, and that can be 8 on some platforms
(e.g., 32-bit Windows for LDC with 64-bit `real`), so that the size is
aligned up to `24+4 + /*padding*/ 4 = 32`.
2019-08-29 18:29:35 +03:00
Nathan Sashihara
ef29e25985 Issue 20159 Followup - fix ldc-win32 test failure
https://github.com/dlang/phobos/pull/7153#issuecomment-524536212
2019-08-24 02:46:58 -07:00
Nathan Sashihara
7887d042e6 Fix Issue 20159 - Make std.math.scalbn work in CTFE 2019-08-23 20:52:26 -07:00
Vladimir Panteleev
02b97f851c
Add missing punctuation 2019-08-21 14:30:31 +00:00
Feldwor
6a6b09d176
Add one line of "Example:" Label 2019-08-21 10:44:50 +03:00
Feldwor
e0cc331eb5
Move out comment to outer for consistency 2019-08-21 10:23:47 +03:00
Hiroki Noda
682544575f std.process: use local imports
In current phobos policy, local imports should be preferred over global
imports.
2019-08-21 09:35:00 +09:00
Feldwor
9c62374c56
Asterisk mistake
Co-Authored-By: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
2019-08-20 19:50:08 +03:00
Feldwor
e94895711b
Fix HTTPS issues in the Examples 2019-08-20 19:40:56 +03:00
Feldwor
967b4cfbee
Specifying URL for the request 2019-08-20 19:16:54 +03:00
Feldwor
e775bd9973
Remove all three example lines 2019-08-20 18:31:44 +03:00
Feldwor
b656def0f0
Remove redundant HTTP acronyms, fix spelling 2019-08-20 18:28:02 +03:00
Feldwor
508ac918da
Add missing http declaration 2019-08-20 18:08:01 +03:00
Feldwor
4c00377268
Add empty line 2019-08-20 18:04:48 +03:00
Feldwor
aeea7270bf
Split example into three pieces 2019-08-20 17:30:44 +03:00
Feldwor
d09d4fad98
Update curl.d 2019-08-20 17:03:21 +03:00
Feldwor
d7c66373c5
Use new syntax for concatination 2019-08-20 16:53:27 +03:00
Hiroki Noda
c25c94bb47 std.process: add missing check for failed malloc() (#7116)
std.process: add missing check for failed malloc()
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-08-20 12:34:52 +02:00
Feldwor
2b192be005
Remove concatination completely
Concatination breaks and give wrong results, so I decided to remove it completely
2019-08-20 12:51:43 +03:00
Feldwor
06efd236b2
Update curl.d
* Fixed missing http variable
* Fixed deprecated concatenation 
```
Error: Implicit string concatenation is deprecated, use "http://upload.wikimedia.org/wikipedia/commons/" ~ "5/53/Wikipedia-logo-en-big.png" instead
```
2019-08-20 12:25:13 +03:00
Nicholas Wilson
ad70ff2e08
Merge pull request #7147 from aG0aep6G/20138
prepare for fix of issue 20138 ("is expression not evaluating correct…
2019-08-19 12:15:02 +08:00
The Dlang Bot
81572ffce6
Merge pull request #7146 from WalterBright/byUTFexception
std.utf.byUTF: add option to throw on invalid UTF
merged-on-behalf-of: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
2019-08-18 21:48:20 +02:00
aG0aep6G
dc5e22944a prepare for fix of issue 20138 ("is expression not evaluating correctly?")
With issue 20138 fixed, `const U` and `shared U` do match `const shared T`,
and they leave the other qualifier intact. So `const shared U` must be
attempted first if we want to strip both qualifiers.
2019-08-18 21:02:54 +02:00
Walter Bright
585e5e478a std.utf.byUTF: add option to throw on invalid UTF 2019-08-18 11:06:28 -07:00
Walter Bright
76c31ff3a9
Merge pull request #7138 from CyberShadow/pull-20190815-111010
std.format: Fix compilation with no autodecode
2019-08-17 22:06:08 -07:00
Nicholas Wilson
cd86cebb81
Merge pull request #7126 from rainers/nan_std_math
ieeeFlags unittest: the optimizer might remove operations that the te…
2019-08-17 14:46:24 +08:00
Walter Bright
232d9e616d UTFException should derive from UnicodeException 2019-08-15 23:42:35 -07: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
Martin Kinkelin
7653e97a32 Rewrite dubious refRange() shortcuts in unittests
As preparation for dlang/dmd#10124, which makes elements of array
literals rvalues.
2019-08-15 18:54:08 +02:00
The Dlang Bot
5949c58bbd
Merge pull request #7140 from CyberShadow/pull-20190815-120029
std.stdio: Fix failing unittest with no autodecode
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-08-15 18:05:45 +02:00
The Dlang Bot
aae9a3d20b
Merge pull request #7139 from CyberShadow/pull-20190815-114112
std.file: Fix unittest for no autodecode
merged-on-behalf-of: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
2019-08-15 17:06:34 +02:00
Vladimir Panteleev
2ba25211f3 std.uni: Disambiguate templates with autodecoding off
With autodecoding off (and thus char[]/wchar[] now being random-access
ranges), both the range and array match/skip/test functions accepted a
char[] / wchar[].
2019-08-15 13:46:51 +00:00
Vladimir Panteleev
e9c8d30d7b When parsing char types then appending to a string, parse as dchar
Parsing as the string element type (char, in non-autodecode mode) does
not allow fitting the result of parsing escapes. Those always need to
be parsed into a dchar.
2019-08-15 12:48:11 +00:00
Vladimir Panteleev
108672bd2b std.conv: Allow instantiating parseElement only with dchar
Narrower char types cannot fit the result of parsing an escaped
character.
2019-08-15 12:33:51 +00:00
Vladimir Panteleev
c4ae17a02d std.conv: Fix instantiations of parseElement with const Target
This is a pedantic fix.
2019-08-15 12:30:45 +00:00
Vladimir Panteleev
3892071c32 std.file: Fix unittest for no autodecode 2019-08-15 12:13:58 +00:00
Vladimir Panteleev
5cb4d927e5 std.stdio: Fix failing unittest with no autodecode
The code compiled and ran, but behaved differently.

The silent breakage was due to the implicit conversion of char to
dchar. Forbidding such conversions would prevent the silent breakage.
2019-08-15 11:59:21 +00:00
The Dlang Bot
60af4b76a9
Merge pull request #7136 from burner/concurrency_assert_messages
adds assert messages to std.concurrency
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-08-15 12:04:10 +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
Robert Schadek
2b9e5377f1 adds assert messages to std.concurrency
* Nicholas review
2019-08-15 09:03:02 +01:00
The Dlang Bot
c707e17f81
Merge pull request #7104 from burner/bigint_assert_messages
Addes assert messages to bigint
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-08-15 09:35:26 +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