Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit f393213

Browse files
committed
Merge remote-tracking branch 'upstream/master' into stable
2 parents 5a46342 + 1dcbd74 commit f393213

File tree

191 files changed

+7318
-2314
lines changed

Some content is hidden

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

191 files changed

+7318
-2314
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ DRuntime: Runtime Library for the D Programming Language
44
[![GitHub tag](https://img.shields.io/github/tag/dlang/druntime.svg?maxAge=86400)](https://github.com/dlang/druntime/releases)
55
[![Bugzilla Issues](https://img.shields.io/badge/issues-Bugzilla-green.svg)](https://issues.dlang.org/buglist.cgi?component=druntime&list_id=220148&product=D&resolution=---)
66
[![CircleCI](https://circleci.com/gh/dlang/druntime/tree/master.svg?style=svg)](https://circleci.com/gh/dlang/druntime/tree/master)
7+
[![Buildkite](https://badge.buildkite.com/48ab4b9005c947aa3dbf0eeb4125391989c00c9545342b7b24.svg?branch=master)](https://buildkite.com/dlang/druntime)
78
[![Code coverage](https://img.shields.io/codecov/c/github/dlang/druntime.svg?maxAge=86400)](https://codecov.io/gh/dlang/druntime)
8-
[![Issue Stats](https://img.shields.io/issuestats/p/github/dlang/druntime.svg?maxAge=2592000)](http://www.issuestats.com/github/dlang/druntime)
99
[![license](https://img.shields.io/github/license/dlang/druntime.svg)](https://github.com/dlang/druntime/blob/master/LICENSE.txt)
1010

1111
This is DRuntime. It is the low-level runtime library
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Added `GC.profileStats()` to `core.memory`
2+
3+
Allows access to current GC profiling information.
4+
See $(REF GC.ProfileStats, core,memory) for a list of profile stats.

changelog/cpp_new.dd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Added `core.stdcpp.new_`
2+
3+
Added `core.stdcpp.new_`, which exposes interfaces for C++ global new/delete operators.
4+
This allows D programs to conveniently allocate from the C++ heap, which is useful when sharing memory between languages.

changelog/cpu_count.dd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Added `core.sys.linux.sched.CPU_COUNT`.
2+
3+
Added `core.sys.linux.sched.CPU_COUNT`, which returns the number of CPUs in set.

changelog/cpu_isset.dd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Added `core.sys.linux.sched.CPU_ISSET`.
2+
3+
Added `core.sys.linux.sched.CPU_ISSET`, which tests to see if cpu is a member of set.

changelog/emplace.dd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Moved `std.conv.emplace`, `std.algorithm.mutation.move`, `std.algorithm.mutation.moveEmplace`, and `std.functional.forward` to core/lifetime.d
2+
3+
`emplace` is the counterpart to `destroy`, so it has been moved to also live in druntime (core/lifetime.d) where it is accessible by projects that use a shallow runtime library stack.
4+
`move`, `moveEmplace`, and `forward` are related low-level construction machinery which also belong in `core.lifetime`.

changelog/gc_cleanup.dd

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
GC cleanup can now be configured as a DRT GC option
2+
3+
The default cleanup method for the GC is to unconditionally run a
4+
collection before runtime termination to finalize objects
5+
that are still alive and hold resources that affect system state outside
6+
the current process. This combines the worst of possible alternatives:
7+
it can cause a considerable delay and does not guarantee finalization
8+
of all objects as roots might still exist.
9+
10+
The cleanup behaviour can now be configured by a DRT option to the
11+
$(LINK2 $(ROOT_DIR)spec/garbage.html, GC configuration),
12+
e.g. by passing `--DRT-gcopt=cleanup:none` on the command
13+
line. Three options are provided:
14+
15+
$(UL
16+
$(LI collect: run a collection (the default for backward compatibility))
17+
$(LI none: do nothing)
18+
$(LI finalize: all live objects are finalized unconditionally)
19+
)
20+
21+
As usual, you can also embed the configuration into the application by
22+
redefining `rt_options`, e.g.
23+
24+
-------
25+
extern(C) __gshared string[] rt_options = [ "gcopt=cleanup:none" ];
26+
-------

changelog/gc_precise.dd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
A garbage collector with precise heap scanning can now be selected
2+
3+
Precise heap scanning can now be enabled by a DRT option to the
4+
$(LINK2 $(ROOT_DIR)spec/garbage.html, GC configuration),
5+
e.g. by passing `--DRT-gcopt=gc:precise` on the command
6+
line or by redefining `rt_options`. See the
7+
$(LINK2 $(ROOT_DIR)spec/garbage.html#precise_gc, documentation)
8+
for details.

changelog/gc_realloc.dd

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
GC.realloc is now more consistent and robust
2+
3+
The specification of $(REF GC.realloc, core, memory) has changed slightly:
4+
5+
$(UL
6+
$(LI `GC.realloc` now returns `null` for failure. (It used to return the original pointer but
7+
that is is not a good indication of failure as it might also be returned on success. It can
8+
lead to overwriting memory if an enlargement was requested.))
9+
$(LI as with `GC.free`, the caller has to ensure that there are no other live pointers to the
10+
memory passed to `GC.realloc` (This used to be required only when passing a new size `0`).)
11+
$(LI as a consequence the GC is allowed to free the memory immediately (the previous
12+
implementation did this for objects larger than 4kB when shrinking).)
13+
$(LI block attribute bits on the existing block are only set if it is reused (the previous
14+
implementation didn't set bits if it reused a small block).)
15+
)
16+
17+
The implementation now properly verifies that pointers are actually base pointers to allocated
18+
GC memory (passing other pointers could have crashed immediately or corrupt the GC).

changelog/gc_registry.dd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
User supplied garbage collectors can now be linked with the runtime
2+
3+
A GC registry has been implemented that allows to add
4+
garbage collector implementations by just linking them into
5+
the binary. See the
6+
$(LINK2 $(ROOT_DIR)spec/garbage.html#gc_registry, documentation)
7+
for details.

0 commit comments

Comments
 (0)