Skip to content

Commit

Permalink
Merge pull request #1495 from MartinNowak/merge_stable
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'upstream/stable' into merge_stable
  • Loading branch information
MartinNowak committed Oct 9, 2016
2 parents cb4129c + 49ea1ee commit b3992d1
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 3 deletions.
53 changes: 51 additions & 2 deletions changelog/2.072.0_pre.dd
Expand Up @@ -28,6 +28,7 @@ $(BUGSTITLE Compiler Changes,
$(LI $(RELATIVE_LINK2 __FILE_FULL_PATH__, Special keyword replaced by the source file's absolute file name.))
$(LI $(RELATIVE_LINK2 dash_safe, Add -transition=safe switch.))
$(LI $(RELATIVE_LINK2 dash_verrors_spec, Add `-verrors=spec` switch.))
$(LI $(RELATIVE_LINK2 iteration_closure, Assumes opApply delegate parameter escapes unless marked `scope`))
)

$(BUGSTITLE Library Changes,
Expand Down Expand Up @@ -108,6 +109,8 @@ $(BUGSTITLE Library Changes,
$(LI $(RELATIVE_LINK2 emplace-inner-class, `std.conv.emplace` no longer allows
to emplace classes directly nested inside other classes without specifying a
suitable `outer` pointer))
$(LI $(RELATIVE_LINK2 drt-oncycle, New druntime switch `--DRT-oncycle`
allows specifying what to do on cycle detection in modules.))
)

$(BR)$(BIG $(RELATIVE_LINK2 bugfix-list, List of all bug fixes and enhancements in D $(VER).))
Expand Down Expand Up @@ -304,6 +307,33 @@ $(BUGSTITLE Compiler Changes,
}
---
)

$(LI $(LNAME2 iteration_closure, Assumes opApply delegate parameter escapes unless marked `scope`)

$(P This breaking change was required to fix bug with `@safe` violation: $(BUGZILLA 16193).)

$(P To list all places where closure may be allocated after the change, use `-transition=safe`
compiler switch.)

$(P Example:)

---
struct S1 {
int opApply(int delegate(int) dg);
}

struct S2 {
int opApply(scope int delegate(int) dg);
}

void foo() {
foreach(i; S1.init) { // will allocate closure
}
foreach(i; S2.init) { // won't allocate closure
}
}
---
)
)

$(BUGSTITLE Library Changes,
Expand Down Expand Up @@ -730,6 +760,19 @@ $(BUGSTITLE Library Changes,
// now it works as expected
-------
)

$(LI $(LNAME2 drt-oncycle, New druntime switch `--DRT-oncycle` allows
specifying what to do on cycle detection in modules.)
$(P When module cycles are detected, the default behavior is to print the cycle, and abort execution. However, in many cases, the cycles are not harmful. With the new `--DRT-oncycle` switch, you can effect a different behavior when cycles are detected:)
$(DL
$(DT `--DRT-oncycle=abort`)
$(DD This is the default behavior, and will abort, printing the cycle to `stderr` when the first cycle is detected)
$(DT `--DRT-oncycle=print`)
$(DD Print all cycles that are detected to `stderr`, but do not halt execution. Order of initialization is arbitrarily chosen based on the order the modules are in the binary)
$(DT `--DRT-oncycle=ignore`)
$(DD Do not print anything, and do not halt execution. Order of initialization is arbitrarily chosen based on the order the modules are in the binary)
)
)
)
)

Expand All @@ -748,13 +791,14 @@ $(LI $(BUGZILLA 16115): [REG2.067] Wrong code with comma operator)
$(LI $(BUGZILLA 16233): [REG2.069] ICE on wrong code)
$(LI $(BUGZILLA 16254): [REG 2.072-devel] wrong switch skips initialization error with mixed in case labels)
$(LI $(BUGZILLA 16292): [REG2.069] bogus Error: goto skips declaration of variable)
$(LI $(BUGZILLA 16536): DMD master does not build on OS X 10.11.6/Xcode 7.3.1)
$(LI $(BUGZILLA 16570): [REG 2.072.0-b1] Enum member with interpreted initializer has type of initializer not enum)
)
)
$(BUGSTITLE DMD Compiler bugs,

$(P
$(LI $(BUGZILLA 1357): Cannot use FFFF and FFFE in Unicode escape sequences.)
$(LI $(BUGZILLA 3960): Unused local variables not reported)
$(LI $(BUGZILLA 5305): Cannot take pointer to intrinsic function)
$(LI $(BUGZILLA 10225): core.simd wrong codegen for XMM.STOUPS with __simd_sto)
$(LI $(BUGZILLA 10591): Error: only one main allowed doesn't show location of conflicting main symbols)
Expand Down Expand Up @@ -825,6 +869,7 @@ $(LI $(BUGZILLA 16228): Insufficient diagnostics for wrong application of DIP25)
$(LI $(BUGZILLA 16229): [Win64] Crash when generating huge symbols)
$(LI $(BUGZILLA 16340): case where version$(LPAREN)unittest$(RPAREN) results in an invalid warning about a dangling else)
$(LI $(BUGZILLA 16365): cannot allow calling function pointer from delegate in @safe code)
$(LI $(BUGZILLA 16439): Non-typesafe variadic functions can never be @safe)
$(LI $(BUGZILLA 16466): Alignment of reals inside structs on 32 bit OSX should be 16, not 8)
$(LI $(BUGZILLA 16525): C++ member variables have no mangling)
$(LI $(BUGZILLA 16530): -O -cov interaction leads to wrong codegen)
Expand Down Expand Up @@ -853,7 +898,10 @@ $(P
$(LI $(BUGZILLA 15457): Symbol Undefined __lseeki64)
$(LI $(BUGZILLA 15918): [2.070] Results from findSplit can no longer be assigned to each other)
$(LI $(BUGZILLA 16179): [REG2.072] git HEAD: multiSort no longer callable with delegate with context)
$(LI $(BUGZILLA 16291): phobosinit never gets called $(LPAREN)EncodingScheme.create fails$(RPAREN))
$(LI $(BUGZILLA 16544): Add File.reopen)
$(LI $(BUGZILLA 16580): [REG 2.072.0-b1] spawnShell segfaults on macOS)
$(LI $(BUGZILLA 16587): split$(LPAREN)"", "x"$(RPAREN) should be [])
)
)
$(BUGSTITLE Phobos bugs,
Expand All @@ -866,13 +914,13 @@ $(LI $(BUGZILLA 11791): std.file.write failed to write huge files)
$(LI $(BUGZILLA 12368): std.file.write conflicts with std.stdio.write)
$(LI $(BUGZILLA 12897): std.json.toJSON doesn't translate unicode chars$(LPAREN)>=0x80$(RPAREN) to "\uXXXX")
$(LI $(BUGZILLA 13572): etc.c.zlib must be nothrow)
$(LI $(BUGZILLA 14136): std.uni.utfMatcher breaks @safety)
$(LI $(BUGZILLA 14137): std.socket.getAddressInfo breaks @safety)
$(LI $(BUGZILLA 14485): .front of empty filtered zip range is accessible)
$(LI $(BUGZILLA 14615): std.regex.replaceFirstInto throws exception when no match is found)
$(LI $(BUGZILLA 14966): Comparing two std.xml.Document result in infinite recursion)
$(LI $(BUGZILLA 15341): segfault with std.signals slots)
$(LI $(BUGZILLA 15658): isFile isn't a template)
$(LI $(BUGZILLA 15735): std.algorithm.iteration.splitter returns empty range)
$(LI $(BUGZILLA 15773): D's treatment of whitespace in character classes in free-form regexes is not the same as Perl's)
$(LI $(BUGZILLA 15791): Cannot get a stored nested struct object from Variant)
$(LI $(BUGZILLA 15823): opIndex doesn't work for const std.variant.Variant)
Expand Down Expand Up @@ -968,6 +1016,7 @@ $(LI $(BUGZILLA 15987): core.sys.windows.msacm remains pseudo definitions)
$(LI $(BUGZILLA 15997): Wrong constant value for ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED in winhttp)
$(LI $(BUGZILLA 16007): Some Win32 API structs has wrong definitions)
$(LI $(BUGZILLA 16049): core.sys.windows structs have wrong sizes and aligns)
$(LI $(BUGZILLA 16594): module destructors called again if an exception got thrown earlier)
)
)
$(BUGSTITLE Druntime enhancements,
Expand Down
2 changes: 1 addition & 1 deletion download.dd
Expand Up @@ -170,7 +170,7 @@ Macros:
_=BETA=$(COMMENT $0)
BETA=$0
B_DMDV2=2.072.0
B_SUFFIX=b1
B_SUFFIX=b2

DEB32=$(DLSITE dmd_$(DMDV2)-0_i386.deb)
DEB64=$(DLSITE dmd_$(DMDV2)-0_amd64.deb)
Expand Down
16 changes: 16 additions & 0 deletions spec/module.dd
Expand Up @@ -542,6 +542,22 @@ $(H3 $(LNAME2 order_of_static_ctor, Order of Static Construction))
in a runtime exception.
)

$(H3 $(LNAME2 override_cycle_abort, Overriding Cycle Detection Abort))

$(P You can override the cyclic detection behavior using the D Runtime
switch `--DRT-oncycle=...` The following behaviors are supported:
)

$(OL
$(LI `abort` The default behavior.)
$(LI `print` Print all cycles detected, but do not abort execution.
Order of static construction is implementation defined, and not
guaranteed to be valid.)
$(LI `ignore` Do not abort execution or print any cycles. Order of
static construction is implementation defined, and not guaranteed
to be valid.)
)

$(H3 $(LNAME2 order_of_static_ctors, Order of Static Construction within a Module))

Within a module, the static construction occurs in the lexical
Expand Down

0 comments on commit b3992d1

Please sign in to comment.