Skip to content

Commit 8d070a5

Browse files
authored
Merge branch 'master' into fix_i17806
2 parents 4b0b02e + 810ffe6 commit 8d070a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+6120
-2668
lines changed

.dscanner.ini

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ has_public_example="-etc.c.curl,\
226226
-std.container.slist,\
227227
-std.datetime.interval,\
228228
-std.datetime.stopwatch,\
229-
-std.datetime.systime,\
230229
-std.datetime.timezone,\
231230
-std.encoding,\
232231
-std.experimental.allocator,\
@@ -253,7 +252,6 @@ has_public_example="-etc.c.curl,\
253252
-std.internal.scopebuffer,\
254253
-std.internal.test.dummyrange,\
255254
-std.json,\
256-
-std.math,\
257255
-std.mathspecial,\
258256
-std.mmfile,\
259257
-std.net.curl,\
@@ -267,9 +265,7 @@ has_public_example="-etc.c.curl,\
267265
-std.regex.internal.ir,\
268266
-std.socket,\
269267
-std.stdio,\
270-
-std.string,\
271268
-std.uni,\
272-
-std.utf,\
273269
-std.xml,\
274270
-std.zip,\
275271
-std.zlib"
@@ -299,13 +295,10 @@ properly_documented_public_functions="-etc.c.odbc.sql,\
299295
-etc.c.odbc.sqlext,\
300296
-etc.c.zlib,\
301297
-std.algorithm.comparison,\
302-
-std.algorithm.iteration,\
303298
-std.algorithm.mutation,\
304299
-std.algorithm.searching,\
305300
-std.algorithm.setops,\
306301
-std.algorithm.sorting,\
307-
-std.array,\
308-
-std.ascii,\
309302
-std.base64,\
310303
-std.bigint,\
311304
-std.bitmanip,\
@@ -319,11 +312,7 @@ properly_documented_public_functions="-etc.c.odbc.sql,\
319312
-std.container.util,\
320313
-std.csv,\
321314
-std.datetime,\
322-
-std.datetime.date,\
323315
-std.datetime.interval,\
324-
-std.datetime.stopwatch,\
325-
-std.datetime.systime,\
326-
-std.datetime.timezone,\
327316
-std.digest.crc,\
328317
-std.digest,\
329318
-std.digest.hmac,\
@@ -356,7 +345,6 @@ properly_documented_public_functions="-etc.c.odbc.sql,\
356345
-std.experimental.checkedint,\
357346
-std.experimental.logger.core,\
358347
-std.experimental.logger.filelogger,\
359-
-std.file,\
360348
-std.format,\
361349
-std.functional,\
362350
-std.getopt,\
@@ -391,7 +379,6 @@ properly_documented_public_functions="-etc.c.odbc.sql,\
391379
-std.socket,\
392380
-std.stdio,\
393381
-std.string,\
394-
-std.traits,\
395382
-std.typecons,\
396383
-std.uni,\
397384
-std.uri,\
@@ -493,4 +480,4 @@ unused_variable_check="-std.algorithm.comparison,\
493480
; Check for virtual calls in the class constructors
494481
vcall_in_ctor="-std.socket,-std.xml"
495482
; Check for @trusted applied to a bigger scope than a single function
496-
trust_too_much="-std.math,-std.typecons,-std.regex,-std.stdio,-std.uni,-std.internal.cstring"
483+
trust_too_much="-std.regex,-std.stdio,-std.uni,-std.internal.cstring"

changelog/bitflags-property-opdispatch.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
`std.typecons.BitFlags` now supports opDispatch-based property access
22

3-
$(REF BitFlags, std.typecons) was extended so that enum members can be set and tested directly on the
3+
$(REF BitFlags, std, typecons) was extended so that enum members can be set and tested directly on the
44
`BitFlags` instead of having to `&` with the underlying enum.
55

66
-------

changelog/rndtonl-deprecated.dd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
std.math.rndtonl has been deprecated
2+
3+
$(REF rndtonl, std, math) is a rounding function only available when using the
4+
Digital Mars C Runtime on Windows. As this function is not cross-platform, it
5+
has been deprecated, and will be removed on version 2.089. Please use
6+
$(REF round, std, math) instead.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Added the SharedBitmappedBlock, as the thread-safe version of the regular BitmappedBlock.
2+
3+
The new $(REF SharedBitmappedBlock, std,experimental,allocator,building_blocks,bitmapped_block) and its single-threaded version can now be instantiated with `Yes.multiblock` or `No.multiblock`.
4+
If instantiated with `Yes.multiblock` (the default behavior), each allocation can return an arbitrary number of blocks.
5+
With `No.multiblock` however, any allocation request can't exceed the block size. This allows for greater performance on both single and multithreaded environments.
6+
7+
---
8+
// The 'BitmappedBlock' is implicitly instantiated with Yes.multiblock
9+
auto a = BitmappedBlock!(blockSize, 8, Mallocator, Yes.multiblock)(numBlocks * blockSize);
10+
11+
// Instantiated with Yes.multiblock, can allocate more than one block at a time
12+
void[] buf = a.allocate(2 * blockSize);
13+
assert(buf.length == 2 * blockSize);
14+
assert(a.deallocate(buf));
15+
---
16+
17+
---
18+
// Instantate the 'BitmappedBlock' with No.multiblock
19+
auto a = BitmappedBlock!(blockSize, 8, Mallocator, No.multiblock)(1024 * blockSize);
20+
21+
// Since instantiated with No.multiblock, can only allocate at most the block size
22+
void[] buf = a.allocate(blockSize + 1);
23+
assert(buf is null);
24+
---
25+
26+
For shared the same rules apply, we only need to replace `BitmappedBlock` with `SharedBitmappedBlock`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Implemented a new allocator, `AlignedBlockList` and its thread-safe version `SharedAlignedBlockList`
2+
3+
$(REF AlignedBlockList, std,experimental,allocator,building_blocks, aligned_block_list) represents
4+
a list of allocators which allows for deallocations in constant time.
5+
Although allocations are in theory served in linear searching time, `deallocate` calls take
6+
$(BIGOH 1) time, by using aligned allocations. The `ParentAllocator` must implement `alignedAllocate`.
7+
8+
$(REF SharedAlignedBlockList, std,experimental,allocator,building_blocks, aligned_block_list) has the
9+
same semantics as its single threaded version, however the internal allocators must be in addition marked
10+
as shared.

posix.mak

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ROOT_OF_THEM_ALL = generated
8282
ROOT = $(ROOT_OF_THEM_ALL)/$(OS)/$(BUILD)/$(MODEL)
8383
DUB=dub
8484
TOOLS_DIR=../tools
85-
DSCANNER_HASH=7b3542fb6aa5b0cca0552aedc5417211b17b3877
85+
DSCANNER_HASH=032ac7e3ed5ea7df5e097badcfcd91d3cb8f18da
8686
DSCANNER_DIR=$(ROOT_OF_THEM_ALL)/dscanner-$(DSCANNER_HASH)
8787

8888
# Set DRUNTIME name and full path
@@ -120,19 +120,20 @@ else
120120
endif
121121

122122
# Set DFLAGS
123-
DFLAGS=-conf= -I$(DRUNTIME_PATH)/import $(DMDEXTRAFLAGS) -w -de -dip25 $(MODEL_FLAG) $(PIC) -transition=complex
123+
DFLAGS=
124+
override DFLAGS+=-conf= -I$(DRUNTIME_PATH)/import $(DMDEXTRAFLAGS) -w -de -dip25 $(MODEL_FLAG) $(PIC) -transition=complex
124125
ifeq ($(BUILD),debug)
125-
DFLAGS += -g -debug
126+
override DFLAGS += -g -debug
126127
else
127-
DFLAGS += -O -release
128+
override DFLAGS += -O -release
128129
endif
129130

130131
ifdef ENABLE_COVERAGE
131-
DFLAGS += -cov
132+
override DFLAGS += -cov
132133
endif
133134
ifneq (,$(TZ_DATABASE_DIR))
134135
$(file > /tmp/TZDatabaseDirFile, ${TZ_DATABASE_DIR})
135-
DFLAGS += -version=TZDatabaseDir -J/tmp/
136+
override DFLAGS += -version=TZDatabaseDir -J/tmp/
136137
endif
137138

138139
UDFLAGS=-unittest
@@ -206,8 +207,8 @@ PACKAGE_std_experimental_logger = core filelogger \
206207
PACKAGE_std_experimental_allocator = \
207208
common gc_allocator mallocator mmap_allocator package showcase typed
208209
PACKAGE_std_experimental_allocator_building_blocks = \
209-
affix_allocator allocator_list ascending_page_allocator bucketizer \
210-
fallback_allocator free_list free_tree bitmapped_block \
210+
affix_allocator aligned_block_list allocator_list ascending_page_allocator \
211+
bucketizer fallback_allocator free_list free_tree bitmapped_block \
211212
kernighan_ritchie null_allocator package quantizer \
212213
region scoped_allocator segregator stats_collector
213214
PACKAGE_std_net = curl isemail

std/algorithm/internal.d

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ version(unittest)
2121

2222
package string[] rndstuff(T : string)()
2323
{
24-
import std.random : Random, unpredictableSeed, uniform;
24+
import std.random : Random = Xorshift, uniform;
2525

2626
static Random rnd;
2727
static bool first = true;
2828
if (first)
2929
{
30-
rnd = Random(unpredictableSeed);
30+
rnd.seed(234_567_891);
3131
first = false;
3232
}
3333
string[] result =
@@ -46,13 +46,13 @@ version(unittest)
4646

4747
package int[] rndstuff(T : int)()
4848
{
49-
import std.random : Random, unpredictableSeed, uniform;
49+
import std.random : Random = Xorshift, uniform;
5050

5151
static Random rnd;
5252
static bool first = true;
5353
if (first)
5454
{
55-
rnd = Random(unpredictableSeed);
55+
rnd = Random(345_678_912);
5656
first = false;
5757
}
5858
int[] result = new int[uniform(minArraySize, maxArraySize, rnd)];

0 commit comments

Comments
 (0)