Hello community, here is the log from the commit of package dmd for openSUSE:Factory checked in at 2017-12-11 18:56:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dmd (Old) and /work/SRC/openSUSE:Factory/.dmd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dmd" Mon Dec 11 18:56:38 2017 rev:3 rq:555600 version:2.077.1 Changes: -------- --- /work/SRC/openSUSE:Factory/dmd/dmd.changes 2017-11-18 00:22:31.164436361 +0100 +++ /work/SRC/openSUSE:Factory/.dmd.new/dmd.changes 2017-12-11 18:56:40.586065946 +0100 @@ -1,0 +2,12 @@ +Sat Dec 9 22:57:27 UTC 2017 - [email protected] + +- Update to 2.0.77.1 + * [REG2.068] compile-time string concatenation fails with CTFE and char[] literal involved + * compiler segfault in DsymbolSemanticVisitor::visit(UnittestDeclaration*) + * [REG 2.077.0] dmd 2.077.0 crashes when computing mangling symbol for simple program + * [Reg 2.077] don't build libphobos2.a with PIC for i386 + * [Reg 2.075] Fibers guard page uses a lot more memory mappings +- Add "-fPIC" to DFLAGS in dmd.conf for 32bit so we can compile D programs for i586. + + +------------------------------------------------------------------- Old: ---- dmd-2.077.0.tar.gz druntime-2.077.0.tar.gz phobos-2.077.0.tar.gz New: ---- dmd-2.077.1.tar.gz druntime-2.077.1.tar.gz phobos-2.077.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dmd.spec ++++++ --- /var/tmp/diff_new_pack.X3Dak9/_old 2017-12-11 18:56:42.353981739 +0100 +++ /var/tmp/diff_new_pack.X3Dak9/_new 2017-12-11 18:56:42.353981739 +0100 @@ -24,7 +24,7 @@ %define incbase %{_includedir}/dlang %define include %{incbase}/dmd-%{version} Name: dmd -Version: 2.077.0 +Version: 2.077.1 Release: 0 Summary: D Programming Language 2.0 License: BSL-1.0 ++++++ dmd-2.077.0.tar.gz -> dmd-2.077.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmd-2.077.0/VERSION new/dmd-2.077.1/VERSION --- old/dmd-2.077.0/VERSION 2017-11-02 00:19:26.000000000 +0100 +++ new/dmd-2.077.1/VERSION 2017-11-29 20:31:16.000000000 +0100 @@ -1 +1 @@ -v2.077.0 +v2.077.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmd-2.077.0/changelog/mangleBackref.dd new/dmd-2.077.1/changelog/mangleBackref.dd --- old/dmd-2.077.0/changelog/mangleBackref.dd 2017-11-02 00:19:26.000000000 +0100 +++ new/dmd-2.077.1/changelog/mangleBackref.dd 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -Mangled Symbols now back reference types and identifiers. - -Symbols with extern(D) linkage are now mangled using back references -to types and identifiers if these occur more than once in the mangled name -as emitted before. This reduces symbol length, especially with chained expressions -of templated functions with Voldemort return types. For example, the average -symbol length of the 127000+ symbols created by a phobos unittest build -is reduced by a factor of about 3, while the longest symbol -shrinks from 416133 to 1142 characters. - -See details in the $(LINK2 $(ROOT_DIR)spec/abi.html#name_mangling, ABI) -specification. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmd-2.077.0/changelog/removePreludeAssert.dd new/dmd-2.077.1/changelog/removePreludeAssert.dd --- old/dmd-2.077.0/changelog/removePreludeAssert.dd 2017-11-02 00:19:26.000000000 +0100 +++ new/dmd-2.077.1/changelog/removePreludeAssert.dd 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -Removed prelude assert for constructors & destructors - -The compiler used to insert an `assert(this, "null this");` at the start of constructors & destructors. -To trigger these asserts one needed to construct or destruct an aggregate at the null memory location. -This would crash upon any data member access, which is required for a constructor or destructor to do anything useful. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmd-2.077.0/changelog/reproducible_builds.dd new/dmd-2.077.1/changelog/reproducible_builds.dd --- old/dmd-2.077.0/changelog/reproducible_builds.dd 2017-11-02 00:19:26.000000000 +0100 +++ new/dmd-2.077.1/changelog/reproducible_builds.dd 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -DMD builds are now reproducible - -The dmd reference compiler now deterministically produces identical binaries for -a given source code and configuration, thus allowing third parties to verify -that distributed binaries indeed originate from specified source code. - -This guarantee only applies when the same compiler version and configuration is -used. Also values of the non-deterministic lexer tokens `__DATE__`, `__TIME__`, -and `__TIMESTAMP__` must not end up in the binary. - -See $(LINK2 https://reproducible-builds.org/, reproducible-builds.org) for further information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmd-2.077.0/src/ddmd/dcast.d new/dmd-2.077.1/src/ddmd/dcast.d --- old/dmd-2.077.0/src/ddmd/dcast.d 2017-11-02 00:19:26.000000000 +0100 +++ new/dmd-2.077.1/src/ddmd/dcast.d 2017-11-29 20:31:16.000000000 +0100 @@ -647,7 +647,8 @@ MATCH m = MATCH.exact; if (e.type.nextOf().mod != tn.mod) { - if (!tn.isConst()) + // https://issues.dlang.org/show_bug.cgi?id=16183 + if (!tn.isConst() && !tn.isImmutable()) return; m = MATCH.constant; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmd-2.077.0/src/ddmd/dclass.d new/dmd-2.077.1/src/ddmd/dclass.d --- old/dmd-2.077.0/src/ddmd/dclass.d 2017-11-02 00:19:26.000000000 +0100 +++ new/dmd-2.077.1/src/ddmd/dclass.d 2017-11-29 20:31:16.000000000 +0100 @@ -872,7 +872,7 @@ /* If the base class is not abstract, then this class cannot * be abstract. */ - if (!baseClass || !baseClass.isAbstract()) + if (!isInterfaceDeclaration() && (!baseClass || !baseClass.isAbstract())) return no(); /* If any abstract functions are inherited, but not overridden, @@ -893,7 +893,7 @@ extern (C++) static int virtualSemantic(Dsymbol s, void* param) { auto fd = s.isFuncDeclaration(); - if (fd && !(fd.storage_class & STCstatic)) + if (fd && !(fd.storage_class & STCstatic) && !fd.isUnitTestDeclaration()) fd.semantic(null); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmd-2.077.0/src/ddmd/dmangle.d new/dmd-2.077.1/src/ddmd/dmangle.d --- old/dmd-2.077.0/src/ddmd/dmangle.d 2017-11-02 00:19:26.000000000 +0100 +++ new/dmd-2.077.1/src/ddmd/dmangle.d 2017-11-29 20:31:16.000000000 +0100 @@ -503,20 +503,25 @@ //printf("fd.type = %s\n", fd.type.toChars()); if (fd.needThis() || fd.isNested()) buf.writeByte('M'); - if (inParent) + + if (!fd.type || fd.type.ty == Terror) + { + // never should have gotten here, but could be the result of + // failed speculative compilation + buf.writestring("9__error__FZ"); + + //printf("[%s] %s no type\n", fd.loc.toChars(), fd.toChars()); + //assert(0); // don't mangle function until semantic3 done. + } + else if (inParent) { TypeFunction tf = cast(TypeFunction)fd.type; TypeFunction tfo = cast(TypeFunction)fd.originalType; mangleFuncType(tf, tfo, 0, null); } - else if (fd.type) - { - visitWithMask(fd.type, 0); - } else { - printf("[%s] %s no type\n", fd.loc.toChars(), fd.toChars()); - assert(0); // don't mangle function until semantic3 done. + visitWithMask(fd.type, 0); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmd-2.077.0/test/compilable/test16183.d new/dmd-2.077.1/test/compilable/test16183.d --- old/dmd-2.077.0/test/compilable/test16183.d 1970-01-01 01:00:00.000000000 +0100 +++ new/dmd-2.077.1/test/compilable/test16183.d 2017-11-29 20:31:16.000000000 +0100 @@ -0,0 +1,7 @@ +// https://issues.dlang.org/show_bug.cgi?id=16183 + +void main() +{ + const string g(const string s) { return s; } + enum string y = ['f'] ~ g("g"); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmd-2.077.0/test/fail_compilation/fail17955.d new/dmd-2.077.1/test/fail_compilation/fail17955.d --- old/dmd-2.077.0/test/fail_compilation/fail17955.d 1970-01-01 01:00:00.000000000 +0100 +++ new/dmd-2.077.1/test/fail_compilation/fail17955.d 2017-11-29 20:31:16.000000000 +0100 @@ -0,0 +1,84 @@ +// https://issues.dlang.org/show_bug.cgi?id=17955 + +alias Alias(alias a) = a; + +template isISOExtStringSerializable(T) +{ + enum isISOExtStringSerializable = T.fromISOExtString(""); +} + +template RedisObjectCollection(){} + +struct RedisStripped(T, bool strip_id = true) +{ + alias unstrippedMemberIndices = indicesOf!(Select!(strip_id, + isRedisTypeAndNotID, isRedisType), T.tupleof); +} + +template indicesOf(alias PRED, T...) +{ + template impl(size_t i) + { + static if (PRED!T) + impl TypeTuple; + } + + alias indicesOf = impl!0; +} + +template isRedisType(alias F) +{ + enum isRedisType = toRedis!(typeof(F)); +} + +template isRedisTypeAndNotID(){} + +string toRedis(T)() +{ + static if (isISOExtStringSerializable!T) + return; +} + +struct User +{ + SysTime resetCodeExpireTime; +} + +class RedisUserManController +{ + RedisObjectCollection!(RedisStripped!User) m_users; +} + +class TimeZone +{ + abstract bool hasDST(); +} + +class SimpleTimeZone : TimeZone +{ + unittest {} + + immutable(SimpleTimeZone) fromISOExtString(S)(S) + { + new SimpleTimeZone; + } +} + +struct SysTime +{ + + static fromISOExtString(S)(S) + { + dstring zoneStr; + + try + SimpleTimeZone.fromISOExtString(zoneStr); + + catch DateTimeException; + } +} + +template Select(bool condition, T...) +{ + alias Select = Alias!(T[condition]); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmd-2.077.0/test/fail_compilation/fail17969.d new/dmd-2.077.1/test/fail_compilation/fail17969.d --- old/dmd-2.077.0/test/fail_compilation/fail17969.d 1970-01-01 01:00:00.000000000 +0100 +++ new/dmd-2.077.1/test/fail_compilation/fail17969.d 2017-11-29 20:31:16.000000000 +0100 @@ -0,0 +1,18 @@ +/* TEST_OUTPUT: +--- +fail_compilation/fail17969.d(9): Error: no property 'sum' for type 'MapResult2!((b) => b)' +--- + * https://issues.dlang.org/show_bug.cgi?id=17969 + */ + + +alias fun = a => MapResult2!(b => b).sum; + +int[] e; +static assert(!is(typeof(fun(e)) == void)); +void foo() { fun(e); } + +struct MapResult2(alias fun) +{ + int[] _input; +} ++++++ dmd.conf ++++++ --- /var/tmp/diff_new_pack.X3Dak9/_old 2017-12-11 18:56:43.213940778 +0100 +++ /var/tmp/diff_new_pack.X3Dak9/_new 2017-12-11 18:56:43.213940778 +0100 @@ -13,7 +13,7 @@ ; [Environment32] -DFLAGS=-I/usr/include/dlang/dmd-@VERSION@/phobos -I/usr/include/dlang/dmd-@VERSION@/druntime -L-L/usr/lib -L--export-dynamic +DFLAGS=-I/usr/include/dlang/dmd-@VERSION@/phobos -I/usr/include/dlang/dmd-@VERSION@/druntime -L-L/usr/lib -L--export-dynamic -fPIC [Environment64] DFLAGS=-I/usr/include/dlang/dmd-@VERSION@/phobos -I/usr/include/dlang/dmd-@VERSION@/druntime -L-L/usr/lib64 -L--export-dynamic -fPIC \ No newline at end of file ++++++ druntime-2.077.0.tar.gz -> druntime-2.077.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/druntime-2.077.0/changelog/atomicLoad-return-types.dd new/druntime-2.077.1/changelog/atomicLoad-return-types.dd --- old/druntime-2.077.0/changelog/atomicLoad-return-types.dd 2017-10-19 10:30:13.000000000 +0200 +++ new/druntime-2.077.1/changelog/atomicLoad-return-types.dd 1970-01-01 01:00:00.000000000 +0100 @@ -1,43 +0,0 @@ -`core.atomic.atomicLoad`'s returns types have changed for aggregate types that have indirections. - -$(REF atomicLoad, core,atomic) used to strip the `shared` qualifier off too -eagerly. When an aggregate type has a "head" and a "tail", connected by an -indirection, then `atomicLoad` used to strip `shared` off the tail. That was a -bug ($(BUGZILLA 16230)). `atomicLoad` only loads the head. The tail remains in -shared memory, and must keep the `shared` qualifier. - -When loading a struct that contains indirections, `atomicLoad` now returns a -wrapper that provides getters which return properly typed values. - -When loading a class reference, `atomicLoad` now leaves the `shared` qualifier -on. - -Example: ----- -class C { int value; } -shared C shc = new C; - -struct S { int head; int* tailPointer; } -shared int tail = 1; -auto shs = shared S(2, &tail); - -void main() -{ - import core.atomic : atomicLoad, atomicOp; - - // Loading a class reference: - shared C c = atomicLoad(shc); - // c itself is not actually shared. It's safe to copy it non-atomically: - shared C c2 = c; // ok - // c's fields are still shared and need to be loaded atomically: - int v = atomicLoad(c.value); - - // Loading a struct that has an indirection: - auto s = atomicLoad(shs); - // The struct's head has been copied and can be modified non-atomically: - ++s.head; - // The tail is still shared and needs to be handled atomically: - shared(int)* t = s.tailPointer; - atomicOp!"+="(*t, 1); -} ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/druntime-2.077.0/changelog/vectorized_array_ops.dd new/druntime-2.077.1/changelog/vectorized_array_ops.dd --- old/druntime-2.077.0/changelog/vectorized_array_ops.dd 2017-10-19 10:30:13.000000000 +0200 +++ new/druntime-2.077.1/changelog/vectorized_array_ops.dd 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -Vectorized array operations are now templated - -Array operations have been converted from dedicated assembly routines for $(B some) array operations to a generic template implementation for $(B all) array operations. This provides huge performance increases (2-4x higher throughput) for array operations that were not previously vectorized. -Furthermore the implementation makes better use of vectorization even for short arrays to heavily reduce latency for some operations (up to 4x). - -For GDC/LDC the implementation relies on auto-vectorization, for DMD the implementation performs the vectorization itself. Support for vector operations with DMD is determined statically (`-march=native`, `-march=avx2`) to avoid binary bloat and the small test overhead. DMD enables SSE2 for 64-bit targets by default. - -Also see $(DRUNTIMEPR 1891) - -$(RED Note:) The implementation no longer weakens floating point divisions (e.g. `ary[] / scalar`) to multiplication (`ary[] * (1.0 / scalar)`) as that may reduce precision. To preserve the higher performance of float multiplication when loss of precision is acceptable, use either `-ffast-math` with GDC/LDC or manually rewrite your code to multiply by `(1.0 / scalar)` for DMD. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/druntime-2.077.0/posix.mak new/druntime-2.077.1/posix.mak --- old/druntime-2.077.0/posix.mak 2017-10-19 10:30:13.000000000 +0200 +++ new/druntime-2.077.1/posix.mak 2017-11-20 18:25:27.000000000 +0100 @@ -29,13 +29,22 @@ DOCDIR=doc IMPDIR=import -# -fPIC is enabled by default and can be disabled with DISABLE_PIC=1 -ifeq (,$(DISABLE_PIC)) - PIC_FLAG:=-fPIC +OPTIONAL_COVERAGE:=$(if $(TEST_COVERAGE),-cov,) + +# default to PIC on x86_64, use PIC=1/0 to en-/disable PIC. +# Note that shared libraries and C files are always compiled with PIC. +ifeq ($(PIC),) + ifeq ($(MODEL),64) # x86_64 + PIC:=1 + else + PIC:=0 + endif +endif +ifeq ($(PIC),1) + override PIC:=-fPIC else - PIC_FLAG:= + override PIC:= endif -OPTIONAL_COVERAGE:=$(if $(TEST_COVERAGE),-cov,) ifeq (osx,$(OS)) DOTDLL:=.dylib @@ -60,7 +69,7 @@ endif # Set DFLAGS -UDFLAGS:=-conf= -Isrc -Iimport -w -dip1000 $(MODEL_FLAG) $(PIC_FLAG) $(OPTIONAL_COVERAGE) +UDFLAGS:=-conf= -Isrc -Iimport -w -dip1000 $(MODEL_FLAG) $(PIC) $(OPTIONAL_COVERAGE) ifeq ($(BUILD),debug) UDFLAGS += -g -debug DFLAGS:=$(UDFLAGS) @@ -186,7 +195,7 @@ ######################## Create a shared library ############################## -$(DRUNTIMESO) $(DRUNTIMESOLIB) dll: DFLAGS+=-version=Shared +$(DRUNTIMESO) $(DRUNTIMESOLIB) dll: DFLAGS+=-version=Shared -fPIC dll: $(DRUNTIMESOLIB) $(DRUNTIMESO): $(OBJS) $(SRCS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/druntime-2.077.0/src/core/thread.d new/druntime-2.077.1/src/core/thread.d --- old/druntime-2.077.0/src/core/thread.d 2017-10-19 10:30:13.000000000 +0200 +++ new/druntime-2.077.1/src/core/thread.d 2017-11-20 18:25:27.000000000 +0100 @@ -4028,7 +4028,9 @@ * fn = The fiber function. * sz = The stack size for this fiber. * guardPageSize = size of the guard page to trap fiber's stack - * overflows + * overflows. Beware that using this will increase + * the number of mmaped regions on platforms using mmap + * so an OS-imposed limit may be hit. * * In: * fn must not be null. @@ -4054,7 +4056,9 @@ * dg = The fiber function. * sz = The stack size for this fiber. * guardPageSize = size of the guard page to trap fiber's stack - * overflows + * overflows. Beware that using this will increase + * the number of mmaped regions on platforms using mmap + * so an OS-imposed limit may be hit. * * In: * dg must not be null. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/druntime-2.077.0/test/common.mak new/druntime-2.077.1/test/common.mak --- old/druntime-2.077.0/test/common.mak 2017-10-19 10:30:13.000000000 +0200 +++ new/druntime-2.077.1/test/common.mak 2017-11-20 18:25:27.000000000 +0100 @@ -14,18 +14,11 @@ GENERATED:=./generated ROOT:=$(GENERATED)/$(OS)/$(BUILD)/$(MODEL) -# -fPIC is enabled by default and can be disabled with DISABLE_PIC=1 -ifeq (,$(DISABLE_PIC)) - PIC_FLAG:=-fPIC -else - PIC_FLAG:= -endif - ifneq (default,$(MODEL)) MODEL_FLAG:=-m$(MODEL) endif -CFLAGS:=$(MODEL_FLAG) -Wall -DFLAGS:=$(MODEL_FLAG) -w -I../../src -I../../import -I$(SRC) -defaultlib= -debuglib= -dip1000 $(PIC_FLAG) +CFLAGS:=$(MODEL_FLAG) $(PIC) -Wall +DFLAGS:=$(MODEL_FLAG) $(PIC) -w -I../../src -I../../import -I$(SRC) -defaultlib= -debuglib= -dip1000 # LINK_SHARED may be set by importing makefile DFLAGS+=$(if $(LINK_SHARED),-L$(DRUNTIMESO),-L$(DRUNTIME)) ifeq ($(BUILD),debug) ++++++ phobos-2.077.0.tar.gz -> phobos-2.077.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/phobos-2.077.0/posix.mak new/phobos-2.077.1/posix.mak --- old/phobos-2.077.0/posix.mak 2017-10-28 15:22:08.000000000 +0200 +++ new/phobos-2.077.1/posix.mak 2017-11-20 15:30:23.000000000 +0100 @@ -40,7 +40,7 @@ export MACOSX_DEPLOYMENT_TARGET=10.7 endif -# Default to a release built, override with BUILD=debug +# Default to a release build, override with BUILD=debug ifeq (,$(BUILD)) BUILD_WAS_SPECIFIED=0 BUILD=release @@ -54,11 +54,19 @@ endif endif -# -fPIC is enabled by default and can be disabled with DISABLE_PIC=1 -ifeq ($(DISABLE_PIC),) - PIC_FLAG:=-fPIC +# default to PIC on x86_64, use PIC=1/0 to en-/disable PIC. +# Note that shared libraries and C files are always compiled with PIC. +ifeq ($(PIC),) + ifeq ($(MODEL),64) # x86_64 + PIC:=1 + else + PIC:=0 + endif +endif +ifeq ($(PIC),1) + override PIC:=-fPIC else - PIC_FLAG:= + override PIC:= endif # Configurable stuff that's rarely edited @@ -120,7 +128,7 @@ endif # Set DFLAGS -DFLAGS=-conf= -I$(DRUNTIME_PATH)/import $(DMDEXTRAFLAGS) -w -de -dip25 $(MODEL_FLAG) $(PIC_FLAG) +DFLAGS=-conf= -I$(DRUNTIME_PATH)/import $(DMDEXTRAFLAGS) -w -de -dip25 $(MODEL_FLAG) $(PIC) ifeq ($(BUILD),debug) DFLAGS += -g -debug else @@ -312,6 +320,7 @@ $(ROOT)/$(SONAME): $(LIBSO) ln -sf $(notdir $(LIBSO)) $@ +$(LIBSO): override PIC:=-fPIC $(LIBSO): $(OBJS) $(ALL_D_FILES) $(DRUNTIMESO) $(DMD) $(DFLAGS) -shared -debuglib= -defaultlib= -of$@ -L-soname=$(SONAME) $(DRUNTIMESO) $(LINKDL) $(D_FILES) $(OBJS) @@ -353,6 +362,7 @@ $(UT_D_OBJS): $(DRUNTIMESO) +$(UT_LIBSO): override PIC:=-fPIC $(UT_LIBSO): $(UT_D_OBJS) $(OBJS) $(DRUNTIMESO) $(DMD) $(DFLAGS) -shared -unittest -of$@ $(UT_D_OBJS) $(OBJS) $(DRUNTIMESO) $(LINKDL) -defaultlib= -debuglib= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/phobos-2.077.0/std/algorithm/iteration.d new/phobos-2.077.1/std/algorithm/iteration.d --- old/phobos-2.077.0/std/algorithm/iteration.d 2017-10-28 15:22:08.000000000 +0200 +++ new/phobos-2.077.1/std/algorithm/iteration.d 2017-11-20 15:30:23.000000000 +0100 @@ -119,7 +119,7 @@ /++ $(D cache) eagerly evaluates $(D front) of $(D range) on each construction or call to $(D popFront), -to store the result in a cache. +to store the result in a _cache. The result is then directly returned when $(D front) is called, rather than re-evaluated. @@ -129,24 +129,24 @@ to $(D filter). $(D cache) may provide -$(REF_ALTTEXT bidirectional range, isBidirectionalRange, std,range,primitives) +$(REF_ALTTEXT bidirectional _range, isBidirectionalRange, std,_range,primitives) iteration if needed, but since this comes at an increased cost, it must be explicitly requested via the -call to $(D cacheBidirectional). Furthermore, a bidirectional cache will +call to $(D cacheBidirectional). Furthermore, a bidirectional _cache will evaluate the "center" element twice, when there is only one element left in -the range. +the _range. $(D cache) does not provide random access primitives, -as $(D cache) would be unable to cache the random accesses. +as $(D cache) would be unable to _cache the random accesses. If $(D Range) provides slicing primitives, then $(D cache) will provide the same slicing primitives, but $(D hasSlicing!Cache) will not yield true (as the $(REF hasSlicing, std,_range,primitives) trait also checks for random access). Params: - range = an $(REF_ALTTEXT input range, isInputRange, std,range,primitives) + range = an $(REF_ALTTEXT input _range, isInputRange, std,_range,primitives) Returns: - an input range with the cached values of range + an input _range with the cached values of _range +/ auto cache(Range)(Range range) if (isInputRange!Range)
