Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.075.1
2.076.0
4 changes: 2 additions & 2 deletions changelog/2.075.1.dd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Ddoc

$(CHANGELOG_NAV_LAST 2.075.0)
$(CHANGELOG_NAV 2.075.0,2.076.0)

$(VERSION Aug 11, 2017, =================================================,

Expand Down Expand Up @@ -32,7 +32,7 @@ $(LI $(BUGZILLA 17667): regex$(LPAREN)[r".", r"[\$(LPAREN)\{[\]\}\$(RPAREN)]"]$(
$(LI $(BUGZILLA 17668): regex$(LPAREN)q"<[^]>"$(RPAREN))
)
)
$(CHANGELOG_NAV_LAST 2.075.0)
$(CHANGELOG_NAV 2.075.0,2.076.0)
Macros:
VER=2.075.1
TITLE=Change Log: $(VER)
96 changes: 93 additions & 3 deletions changelog/2.076.0_pre.dd → changelog/2.076.0.dd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ $(VERSION Sep 1, 2017, =================================================,

$(BUGSTITLE Compiler changes,

$(LI $(RELATIVE_LINK2 staticforeach,Implement DIP 1010 - $(LINK2 https://github.com/dlang/DIPs/blob/master/DIPs/DIP1010.md, Static foreach)))
$(LI $(RELATIVE_LINK2 betterc,$(TT -betterC) enhancements))
$(LI $(RELATIVE_LINK2 avx2,AVX2 was added as $(TT -mcpu=avx2) architecture.))
$(LI $(RELATIVE_LINK2 betterc,$(TT -betterC) enhancements))
$(LI $(RELATIVE_LINK2 fix17697,Fix Issue 17697 - Ddoc: automatically highlight URLs outside of macro arguments))
$(LI $(RELATIVE_LINK2 staticforeach,Implement DIP 1010 - $(LINK2 https://github.com/dlang/DIPs/blob/master/DIPs/DIP1010.md, Static foreach)))

Expand Down Expand Up @@ -42,6 +45,78 @@ $(HR)

$(BUGSTITLE Compiler changes,

$(LI $(LNAME2 staticforeach,Implement DIP 1010 - $(LINK2 https://github.com/dlang/DIPs/blob/master/DIPs/DIP1010.md, Static foreach))
$(P
Support for `static foreach` has been added.
)

$(P
`static foreach` is a conditional compilation construct that is to `foreach` what `static if` is to `if`.
It is a convenient way to generate declarations and statements by iteration.
)

---
import std.conv: to;

static foreach(i; 0 .. 10)
{

// a `static foreach` body does not introduce a nested scope
// (similar to `static if`).

// The following mixin declaration is at module scope:
mixin(`enum x` ~ to!string(i) ~ ` = i;`); // declares 10 variables x0, x1, ..., x9
}

import std.range: iota;
// all aggregate types that can be iterated with a standard `foreach`
// loop are also supported by static foreach:
static foreach(i; iota(10))
{
// we access the declarations generated in the first `static foreach`
pragma(msg, "x", i, ": ", mixin(`x` ~ to!string(i)));
static assert(mixin(`x` ~ to!string(i)) == i);
}

void main()
{
import std.conv: text;
import std.typecons: tuple;
import std.algorithm: map;
import std.stdio: writeln;

// `static foreach` has both declaration and statement forms
// (similar to `static if`).

static foreach(x; iota(3).map!(i => tuple(text("x", i), i)))
{
// generates three local variables x0, x1 and x2.
mixin(text(`int `,x[0],` = x[1];`));

scope(exit) // this is within the scope of `main`
{
writeln(mixin(x[0]));
}
}

writeln(x0," ",x1," ",x2); // first runtime output
}
---
)

$(LI $(LNAME2 betterc,$(TT -betterC) enhancements)
$(P
Many improvements were added to the dmd's $(TT -betterC) implementation, most
notably programs compiled with $(TT -betterC) will no longer reference unused
druntime symbols, asserts are implemented as C `<assert.h>` calls, and phobos is
not linked by default.
)

$(P
See the $(LINK2 $(ROOT_DIR)spec/betterc.html, Better C) specs for more details.
)
)

$(LI $(LNAME2 avx2,AVX2 was added as $(TT -mcpu=avx2) architecture.)
$(P
This allows the backend to emit AVX2 instructions. The compiler will
Expand All @@ -50,6 +125,19 @@ AVX2 support is automatically detected with -mcpu=native.
)
)

$(LI $(LNAME2 betterc,$(TT -betterC) enhancements)
$(P
Many improvements were added to the dmd's $(TT -betterC) implementation, most
notably programs compiled with $(TT -betterC) will no longer reference unused
druntime symbols, asserts are implemented as C `<assert.h>` calls, and phobos is
not linked by default.
)

$(P
See the $(LINK2 $(ROOT_DIR)spec/betterc.html, Better C) specs for more details.
)
)

$(LI $(LNAME2 fix17697,Fix Issue 17697 - Ddoc: automatically highlight URLs outside of macro arguments)
$(P
URLs which appear in Ddoc text:
Expand Down Expand Up @@ -113,7 +201,7 @@ static foreach(i; 0 .. 10)

// a `static foreach` body does not introduce a nested scope
// (similar to `static if`).

// The following mixin declaration is at module scope:
mixin(`enum x` ~ to!string(i) ~ ` = i;`); // declares 10 variables x0, x1, ..., x9
}
Expand All @@ -137,7 +225,7 @@ void main()

// `static foreach` has both declaration and statement forms
// (similar to `static if`).

static foreach(x; iota(3).map!(i => tuple(text("x", i), i)))
{
// generates three local variables x0, x1 and x2.
Expand All @@ -148,7 +236,7 @@ void main()
writeln(mixin(x[0]));
}
}

writeln(x0," ",x1," ",x2); // first runtime output
}
---
Expand Down Expand Up @@ -308,6 +396,7 @@ $(LI $(BUGZILLA 16680): dmd doesn't use druntime optimized versions of subtracti
$(LI $(BUGZILLA 17522): win64.mak broken)
$(LI $(BUGZILLA 17582): [REG2.059] Applying const to struct declaration should make the struct type const)
$(LI $(BUGZILLA 17612): [REG2.063] Segmentation fault with bad object.d)
$(LI $(BUGZILLA 17684): [REG 2.062] `static alias this` bug or incomplete implementation?)
$(LI $(BUGZILLA 17690): [REG2.066.0] scope guards leak declarations)
$(LI $(BUGZILLA 17695): [Reg 2.076] ICE with vector negation)
$(LI $(BUGZILLA 17761): [REG2.075] dmd 2.075.1 creates object files that can't be linked by ld.bfd)
Expand Down Expand Up @@ -423,6 +512,7 @@ $(LI $(BUGZILLA 17322): Add Magikcraft to organizations using D)
$(LI $(BUGZILLA 17480): [Downloads])
$(LI $(BUGZILLA 17524): [The C Preprocessor vs D] "need to worry about"?)
$(LI $(BUGZILLA 17560): Enhancement: view and copy full code example for offline compile/play)
$(LI $(BUGZILLA 17581): Document behavior of -betterC)
$(LI $(BUGZILLA 17594): Define DDOC_BLANKLINE as an empty HTML paragraph, thus obviating the need to wrap text in $$(LPAREN)P ...$(RPAREN))
)
$(BUGSTITLE Tools bugs,
Expand Down
2 changes: 1 addition & 1 deletion changelog/changelog.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ CHANGELOG_VERSION = $(LI <a id="$1" href="$1.html">$1</a><span class="hide-from-
CHANGELOG_VERSION_PRE = $(LI <a id="$1" href="$1_pre.html">$1</a><span class="hide-from-nav"> ($+)</span>)
_=BEGIN_GENERATED_CHANGELOG_VERSIONS
CHANGELOG_VERSIONS =
$(CHANGELOG_VERSION_PRE 2.076.0, not yet released)
$(CHANGELOG_VERSION 2.076.0, Sep 01, 2017)
$(CHANGELOG_VERSION 2.075.1, Aug 11, 2017)
$(CHANGELOG_VERSION 2.075.0, Jul 19, 2017)
$(CHANGELOG_VERSION 2.074.1, May 30, 2017)
Expand Down
4 changes: 2 additions & 2 deletions download.dd
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ Macros:

DMDV2=$(LATEST)

_=BETA=$(COMMENT $0)
BETA=$0
BETA=$(COMMENT $0)
_=BETA=$0
B_DMDV2=2.076.0
B_SUFFIX=rc1

Expand Down