Skip to content

Commit 5831167

Browse files
authored
Merge branch 'master' into AliasAssign
2 parents a7978cb + 969ceb1 commit 5831167

Some content is hidden

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

76 files changed

+6973
-2334
lines changed

.htaccess

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ Redirect 301 /dips/1025 https://github.com/dlang/DIPs/tree/master/DIPs/other/DIP
218218
Redirect 301 /dips/1026 https://github.com/dlang/DIPs/tree/master/DIPs/other/DIP1026.md
219219
Redirect 301 /dips/1027 https://github.com/dlang/DIPs/tree/master/DIPs/rejected/DIP1027.md
220220
Redirect 301 /dips/1028 https://github.com/dlang/DIPs/tree/master/DIPs/rejected/DIP1028.md
221-
Redirect 301 /dips/1029 https://github.com/dlang/DIPs/tree/master/DIPs/DIP1029.md
222-
Redirect 301 /dips/1030 https://github.com/dlang/DIPs/tree/master/DIPs/DIP1030.md
221+
Redirect 301 /dips/1029 https://github.com/dlang/DIPs/tree/master/DIPs/accepted/DIP1029.md
222+
Redirect 301 /dips/1030 https://github.com/dlang/DIPs/tree/master/DIPs/accepted/DIP1030.md
223223
Redirect 301 /dips/1031 https://github.com/dlang/DIPs/tree/master/DIPs/other/DIP1031.md
224-
Redirect 301 /dips/1032 https://github.com/dlang/DIPs/tree/master/DIPs/DIP1032.md
225-
Redirect 301 /dips/1033 https://github.com/dlang/DIPs/tree/master/DIPs/DIP1033.md
226-
Redirect 301 /dips/1034 https://github.com/dlang/DIPs/tree/master/DIPs/DIP1034.md
224+
Redirect 301 /dips/1032 https://github.com/dlang/DIPs/tree/master/DIPs/other/DIP1032.md
225+
Redirect 301 /dips/1033 https://github.com/dlang/DIPs/tree/master/DIPs/other/DIP1033.md
226+
Redirect 301 /dips/1034 https://github.com/dlang/DIPs/tree/master/DIPs/accepted/DIP1034.md

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.093.0
1+
2.097.0

acknowledgements.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ $(P
2828
Thomas Kuehne,
2929
Helmut Leitner,
3030
Lubomir Litchev,
31-
$(LINK2 http://www.relisoft.com/, Bartosz Milewski),
31+
$(LINK2 https://bartoszmilewski.com/, Bartosz Milewski),
3232
Christopher E. Miller,
3333
Pavel Minayev,
3434
Antonio Monteiro,

articles/code_coverage.dd

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@ $(LI It can be used to track down why a particular section of code
3434

3535
$(LI Since execution counts are given for each line, it is possible
3636
to use the coverage analysis to reorder the basic blocks in
37-
a function to minimize jmps in the most used path, thus
38-
optimizing it.)
39-
)
37+
a function to minimize branches in the most used path, reducing stress
38+
on the processor's pipeline (a run-of-the-mill X86 processor can usually handle 48 branches in its pipeline). This technique
39+
is a special case of $(LINK2 https://en.wikipedia.org/wiki/Profile-guided_optimization, profile-guided optimization), which can
40+
be performed automatically if either the `LLVM` or `GCC` backend is utilized.
41+
))
4042

4143
$(P Experience with code coverage analyzers show that they dramatically
4244
reduce the number of bugs in shipping code.
43-
But it isn't a panacea, a code coverage analyzer won't help with:)
45+
But it isn't a panacea, a code coverage analyzer won't help (unlike Valgrind or the sanitizers available in GCC and LLVM) with:)
4446

4547
$(OL
4648
$(LI Identifying race conditions.)
@@ -51,18 +53,18 @@ $(LI Verifying that the program got the correct result.)
5153

5254
$(P Code coverage analysers are available for many popular languages,
5355
but they are often third party products that integrate
54-
poorly with the compiler, and are often very expensive.
56+
poorly with the compiler.
5557
A big problem with third party products is, in order to instrument
56-
the source code, they must include what is essentially a full blown
58+
the source code, they must include what is essentially a full-blown
5759
compiler front end for the same language. Not only is this an expensive
5860
proposition, it often winds up out of step with the various compiler
5961
vendors as their implementations change and as they evolve various extensions.
6062
($(LINK2 http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_8.html, gcov),
61-
the Gnu coverage analyzer, is an exception as it is both free
63+
the Gnu coverage analyzer is an exception as it is both free
6264
and is integrated into gcc.)
6365
)
6466

65-
$(P The D code coverage analyser is built in as part of the D compiler.
67+
$(P The D code coverage analyser is part of the D compiler.
6668
Therefore, it is always in perfect synchronization with the language
6769
implementation. It's implemented by establishing a counter for each
6870
line in each module compiled with the $(DDSUBLINK dmd,switch-cov, $(B -cov)) switch.
@@ -78,7 +80,7 @@ $(P For example, consider the Sieve program:)
7880

7981
import std.stdio;
8082

81-
bool flags[8191];
83+
bool[8191] flags;
8284

8385
int main()
8486
{
@@ -124,7 +126,7 @@ $(CONSOLE
124126
|
125127
|import std.stdio;
126128
|
127-
|bool flags[8191];
129+
|bool[8191] flags;
128130
|
129131
|int main()
130132
|{
@@ -163,13 +165,13 @@ as the execution count.
163165
At the end of the .lst file, the percent coverage is given.
164166
)
165167

166-
$(P There are 3 lines with an exection count
168+
$(P There are 3 lines with an execution count
167169
of 1, these were each executed once. The declaration line for $(D i, prime),
168170
etc., has 5 because there are 5 declarations, and the initialization of
169171
each declaration counts as one statement.)
170172

171173
$(P The first $(D for) loop shows 22. This is the sum of the 3 parts
172-
of the for header. If the for header is broken up into 3 lines, the
174+
of the for-header. If the for-header is broken up into 3 lines, the
173175
data is similarly divided:)
174176

175177
$(CONSOLE
@@ -263,7 +265,7 @@ sieve --DRT-covopt="merge:1 dstpath:reports"
263265

264266
$(H3 References)
265267

266-
$(LINK2 https://en.wikipedia.org/wiki/Code_coverage, Wikipedia)
268+
$(LINK2 https://en.wikipedia.org/wiki/Code_coverage, Wikipedia: "Code Coverage")
267269

268270
)
269271

articles/exception-safe.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Transaction transaction()
177177
}
178178
---
179179

180-
With the try-finally approach:
180+
With the try-catch approach:
181181

182182
---
183183
Transaction transaction()
@@ -188,7 +188,7 @@ Transaction transaction()
188188
Bar b = dobar();
189189
return Transaction(f, b);
190190
}
191-
catch (Object o)
191+
catch (Exception o)
192192
{
193193
dofoo_undo(f);
194194
throw o;

articles/lazy-evaluation.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ need to do this need to be broken up into multiple statements,
254254
and extra variables are introduced.
255255
(For a thorough treatment of this issue, see Andrei Alexandrescu and
256256
Petru Marginean's paper
257-
$(LINK2 http://erdani.org/publications/cuj-06-2003.html, Enforcements)).
257+
$(LINK2 https://erdani.org/publications/cuj-06-2003.php.html, Enforcements)).
258258
With lazy evaluation, this can all be encapsulated into a single
259259
function:
260260
)

articles/variadic-function-templates.dd

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,33 +124,32 @@ $(H2 $(LNAME2 d-solutions, D Programming Language Solutions))
124124

125125
$(H3 The D Look Ma No Templates Solution)
126126

127-
$(P It is not practical to solve this problem in C++ without
128-
using templates. In D, one can because D supports typesafe
129-
variadic function parameters.
127+
$(P The current best practice, e.g. as espoused by the standard library, favours
128+
the variadic template solution. However, if the template solution is not practical, D provides a runtime solution
129+
utilizing the $(D TypeInfo) system (An example is shown below). There is a lexical similarity with the
130+
non-template variadic functions provided by C and C++ ($(D va_list)), however the solution D provides is
131+
typesafe whereas the aforementioned alternative is not.
130132
)
131133

132134
------
133135
import core.vararg;
134136
import core.stdc.stdio;
135-
import std.format;
136-
137+
/*
138+
This function was part of D1.0, but does not exist anymore, it has been
139+
resurrected here to give a realistic example of how this feature could be used.
140+
*/
141+
void doFormat(void delegate(dchar) putc, TypeInfo[] arguments, va_list argptr);
137142
void print(...)
138143
{
139144
void putc(dchar c)
140145
{
141146
fputc(c, stdout);
142147
}
143148

144-
std.format.doFormat(&putc, _arguments, _argptr);
149+
doFormat(&putc, _arguments, _argptr);
145150
}
146151
------
147152

148-
$(P It isn't elegant or the most efficient,
149-
but it does work. However it is not the recommended way to write variadic functions.
150-
(It relies on the parameters `_argptr` and `_arguments` imported from `core.vararg`
151-
which give a pointer to the values and their types, respectively.)
152-
)
153-
154153
$(H3 Translating the Variadic C++ Solution into D)
155154

156155
$(P Variadic templates in D enable a straightforward translation
@@ -195,7 +194,7 @@ $(H3 The Static If Solution)
195194

196195
$(P It would be nice to encapsulate all the logic into a
197196
single function. One way to do that is by using
198-
$D(static if)s, which provide for conditional compilation:
197+
$(D static if)s, which provide for conditional compilation:
199198
)
200199

201200
---

changelog/2.093.1.dd

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
Ddoc
2+
3+
$(CHANGELOG_NAV_INJECT)
4+
5+
$(VERSION Aug 15, 2020, =================================================,
6+
7+
$(CHANGELOG_HEADER_STATISTICS
8+
$(VER) comes with 10 fixed Bugzilla issues.
9+
A huge thanks goes to the
10+
$(LINK2 #contributors, 13 contributors)
11+
who made $(VER) possible.)
12+
13+
$(CHANGELOG_SEP_HEADER_TEXT_NONEMPTY)
14+
15+
$(CHANGELOG_SEP_HEADER_TEXT)
16+
17+
$(CHANGELOG_SEP_TEXT_BUGZILLA)
18+
19+
$(BUGSTITLE_BUGZILLA DMD Compiler regressions,
20+
21+
$(LI $(BUGZILLA 21063): getLinkage is wrong for forward reference extern$(LPAREN)C++$(RPAREN) class)
22+
$(LI $(BUGZILLA 21074): const lost in mixin)
23+
$(LI $(BUGZILLA 21095): [ICE] AssertError@dmd/expressionsem.d$(LPAREN)5015$(RPAREN): Assertion failure)
24+
)
25+
$(BUGSTITLE_BUGZILLA DMD Compiler bugs,
26+
27+
$(LI $(BUGZILLA 16400): naked variadic C function emits broken prologue)
28+
$(LI $(BUGZILLA 17351): Static const array can't be evaluated at compile time when passed as ref argument)
29+
$(LI $(BUGZILLA 21085): [glue] Only 9999 "hidden identifiers" can be generated)
30+
$(LI $(BUGZILLA 21092): [ICE] Segmentation fault in ExpressionPrettyPrintVisitor::visit$(LPAREN)CommaExp*$(RPAREN) at dmd/hdrgen.d:2293)
31+
$(LI $(BUGZILLA 21096): [ICE] Segmentation fault in dmd.hdrgen.sizeToBuffer at dmd/hdrgen.d:3153)
32+
$(LI $(BUGZILLA 21122): __traits$(LPAREN)getAttributes$(RPAREN) wrong scope on enums)
33+
)
34+
$(BUGSTITLE_BUGZILLA dlang.org bugs,
35+
36+
$(LI $(BUGZILLA 21059): install.sh: posix_terminal returns false on Linux Mint 20)
37+
)
38+
)
39+
$(D_CONTRIBUTORS_HEADER 13)
40+
$(D_CONTRIBUTORS
41+
$(D_CONTRIBUTOR Andrej Mitrovic)
42+
$(D_CONTRIBUTOR Bastiaan Veelo)
43+
$(D_CONTRIBUTOR Boris Carvajal)
44+
$(D_CONTRIBUTOR dkorpel)
45+
$(D_CONTRIBUTOR Iain Buclaw)
46+
$(D_CONTRIBUTOR Martin Kinkelin)
47+
$(D_CONTRIBUTOR Martin Nowak)
48+
$(D_CONTRIBUTOR Mathias Lang)
49+
$(D_CONTRIBUTOR Nicholas Wilson)
50+
$(D_CONTRIBUTOR Razvan Nitu)
51+
$(D_CONTRIBUTOR Sebastian Wilzbach)
52+
$(D_CONTRIBUTOR Stefan Koch)
53+
$(D_CONTRIBUTOR Walter Bright)
54+
)
55+
$(D_CONTRIBUTORS_FOOTER)
56+
$(CHANGELOG_NAV_INJECT)
57+
58+
Macros:
59+
VER=2.093.1
60+
TITLE=Change Log: $(VER)

0 commit comments

Comments
 (0)