D 2.069.0 released, compiler automatically ported from C++ to D
Change Log: 2.069.0 - D Programming Language
        

        Change Log: 2.069.0
        
        





Download D 2.069.0
released Nov 3, 2015




Library Changes The package std.experimental.allocator was added.
More phobos functions were rangified.
libcurl is now loaded dynamically
Backtraces now include file name and line number.
Support to link against VS2015 libraries.
The documentation for Phobos has been improved.
moveEmplace was added
Use isPermutation to test
    whether two ranges are permutations of each other.
The new isSameLength can be more
     efficient than comparing the walkLength of two
     ranges.
getUDAs was added to help get
    user-defined attributes of specific types from symbols.
getSymbolsByUDA was
    added to find symbols with specific user-defined attributes.
cmp was added, defining total ordering on
    floating-point numbers, including NaN.
FreeBSD now also ships with a shared libphobos2.so library (usage info).
 

List of all bug fixes and enhancements in D 2.069.0.

Compiler Changes 
DMD has been ported to D.

    The DMD frontend code has been ported to D.  Self-hosting the
        compiler allows us to benefit from D's improved productivity
        and modelling power.
    


Basic support for Objective-C.

    Basic support for Objective-C classes, interfaces and instance methods.
        This is implemented by adding a new linkage attribute, Objective-C,
        and a compiler recognized UDA, @selector. The linkage attribute is to
        be used on a class or interface. The UDA is attached to a method.
        See Interfacing to Objective-C
        for more information.
    


The -property switch has
    been deprecated.

    The -property switch used to disallow calling non-properties
        without parentheses. The switch has not been used to build Phobos for
        some time now. So naturally, code that's incompatible with
        -property has found its way in. This means, the switch has
        effectively not been supported by D at large.
    

    Since the behaviour of the -property switch was not well-liked,
        it's been deprecated and made to have no effect when used.
    

    The @property
        attribute is not affected, and remains as a mostly cosmetic keyword.
        Its semantics are going to be revisited in the future.
    


DMD's codegen has improved.

    Several improvements have been made to the backend's codegen. Parameters
        and stack frame set up are optimized to use SUB/MOV instead of PUSH,
        resulting in 30% faster code in some cases. Also, functions marked as
        nothrow no longer generate a BP stack frame on Windows and Linux.
    


 

Library Changes 
More phobos functions were rangified.

    Following the work released with         2.068.0 more phobos functions were rangified.
    

    Rangified Functions:        Module Functions
        
        std.stdio
                            File.this
            
        
        std.file
                            append
                chdir
                copy
                exists
                getAttributes
                getLinkAttributes
                getSize
                getTimes
                getTimesWin
                isDir
                isFile
                isSymlink
                mkdir
                read
                readText
                remove
                rename
                rmdir
                setAttributes
                setTimes
                timeLastModified
                write
            
        
    


libcurl is now loaded dynamically

    std.net.curl was changed to load curl as shared
        library at runtime.  This simplifies the usage as it's no longer
        necessary to link against libcurl or to install any development
        libraries.
    

    The implementation will also try to get the needed curl symbols from the
        executable itself. So it remains possible to link with a specific
        version of libcurl or with a static libcurl library.
    

    To make this work you have to link with --export-dynamic respectively
        use a .DEF file on Windows (see wiki for
        more info on the latter).
    


Backtraces now include file name and line number.

    The default tracehandler on linux and FreeBSD now parses DWARF
        debug info to add file names and line numbers to backtraces.
    

    std.conv.ConvException@DPL/dmd/src/../../phobos/std/conv.d(1720): Unexpected 'a' when converting from type string to type ulong

DPL/dmd/src/../../phobos/std/conv.d:1720 pure @safe ulong std.conv.toImpl!(ulong, immutable(char)[]).toImpl(immutable(char)[]) [0x43b339]
DPL/dmd/src/../../phobos/std/conv.d:298 pure @safe ulong std.conv.to!(ulong).to!(immutable(char)[]).to(immutable(char)[]) [0x437717]
example.d:5 ulong example.foo(immutable(char)[]) [0x4376c7]
example.d:10 _Dmain [0x4376e5]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x444576]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x4444cc]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x444532]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x4444cc]
??:? _d_run_main [0x444429]
??:? main [0x44039f]
??:? __libc_start_main [0xc3ae96ff]
    


Support to link against VS2015 libraries.

    Support for linking against the Microsoft runtime library distributed with VS 2015
       has been added. This affects both the 64-bit build for Win64 and the 32-bit build
       targeting the MS runtime (-m32mscoff).
    

    The compiler detects the library version to adjust the link command line automatically.
        If you don't use dmd for linking, make sure to add legacy_stdio_definitions.lib to your
        command line when linking against the VS2015 runtime.
    


The documentation for Phobos has been improved

    A large portion of the functions in Phobos have improved documentation, including but
        not limited to spelling fixes, clarifications, better explanations of function and template
        parameters, and better explanations of return values.
    


A combined moveEmplace was added.

    moveEmplace efficiently combines
        move with emplace thus avoids
        having to initialize and destroy a value before moving into uninitialized data.
    

T* moveToHeap(T)(ref T value)
{
    import core.memory : GC;

    auto ptr = cast(T*)GC.malloc(T.sizeof);
        moveEmplace(value, *ptr);
    return ptr;
}

    There are also moveEmplaceAll
        and moveEmplaceSome as counterparts of
        moveAll and moveSome.
    


 

List of all bug fixes and enhancements in D 2.069.0:DMD Compiler regressions 
Bugzilla 13720: [REG2.067] Adding trivial destructor to std.datetime causes Internal error: ..\ztc\cgelem.c 2418
Bugzilla 14430: [REG2.060] Null parameter is detected as non-null.
Bugzilla 14572: cannot build dmd from source anymore: 'g++ -m64: No such file or directory'
Bugzilla 14588: [REG2.067] undefined reference error while linking with -debug option to a static library.
Bugzilla 14682: [REG2.037] Incorrect interpretation of ~ []
Bugzilla 14699: [REG2.062] ICE: segfaults on array with zero size
Bugzilla 14710: VC-built DMD crashes on templated variadic function IFTI
Bugzilla 14731: [REG2.068a] Error location insufficient when CTFE
Bugzilla 14735: [REG2.068-b1] std.string.indexOf cannot deduce function for char argument
Bugzilla 14737: [REG2.058] A concatenation of array literal and static array should make dynamic array
Bugzilla 14754: [REG2.068b1] 64bit wrong code with -inline
Bugzilla 14779: incorrect addressing of arguments in require/in-contract
Bugzilla 14829: [REG2.066.0] wrong code with -O -inline
Bugzilla 14886: [REG2.066] std.parallelism.parallel with large static array seems to hang compile
Bugzilla 14926: Programs compiled using dmd 2.068 are generating dummy profilegc.log files
Bugzilla 14952: Redundant REX.W before FSTP confuses Valgrind
Bugzilla 14991: dmd doesn't build under OSX 32 bit
Bugzilla 15045: [Reg 2.069-devel] hasElaborateCopyConstructor is true for struct with opDispatch
Bugzilla 15072: [REG2.069-devel] Re-introducing codegen performance regression 14805
Bugzilla 15079: [REG2.068.1] Assertion `fd->semanticRun == PASSsemantic3done' failed.
Bugzilla 15092: [REG2.066.0] ICE on duplicated struct declarations in class members
Bugzilla 15123: [REG2.069.0-devel] segfault when compiling simple SIMD code
Bugzilla 15126: [REG2.069-devel] dmd crashes when analyzing array literal
Bugzilla 15138: [REG2.068.2] ICE with basic use of stdx.data.json
Bugzilla 15149: [REG2.068.1] Linker error with separate compilation
Bugzilla 15150: [REG2.068.1] Public selective import causes conflict
Bugzilla 15152: [REG2.069.0-devel] template fails to instantiate if argument is itself a template
Bugzilla 15168: [REG2.068.0] std.variant.Algebraic interacts badly with string alias this sub-types
Bugzilla 15176: [REG2.069.0-b1] ICE(glue.c):separate compilation with -inline crash in glue.c
Bugzilla 15177: [REG2.069.0-b1] mixin + traits issue with 2.069 beta 1
Bugzilla 15181: SYSCONFDIR is broken
Bugzilla 15200: [REG2.068.2] ICE(glue.c) when compiling with -inline
Bugzilla 15207: [REG2.069.0-b1] Wrong codegen with -inline
Bugzilla 15210: [REG2.064][ICE] (glue.c at 1489) with tuples and AAs
Bugzilla 15214: [REG2.065.0] ICE in Mangler::mangleFunc
Bugzilla 15251: [REG2.069.0-rc1] std.datetime bug with -inline
Bugzilla 15253: [REG2.069.0-rc1] inliner prevent  compilation
Bugzilla 15272: [2.069-rc2,inline] nothing written to output when -inline is set
 
DMD Compiler bugs 
Bugzilla 1747: class to base interface static cast is incorrect in some cases
Bugzilla 2013: interface to interface dynamic cast is incorrect in some cases
Bugzilla 2091: D2 final cannot be applied to variable
Bugzilla 2354: conditional compilation rejects else if the declaration is a single pragma
Bugzilla 3243: instantiated 'static this()' bring on a compiler message ': __gate is thread local'
Bugzilla 6417: Wrong context for nested functions in virtual class member function contracts
Bugzilla 7625: inlining only works with explicit else branch
Bugzilla 7979: Alias this does not work with switch
Bugzilla 9383: Wrong context for contracts if closure [dis]appears in override function
Bugzilla 9891: Ability to modify immutable using default value of ref/out parameter
Bugzilla 12487: DMD correctly reports excessive CTFE recursion, but not template recursion
Bugzilla 12744: auto ref crashes DMD on ASSERT
Bugzilla 13007: Wrong x86 code: long negate
Bugzilla 13203: conflicting aliases allowed with static if
Bugzilla 13244: Wrong code with -inline and foreach/map/all
Bugzilla 13652: 2D Static Array Init produces wrong result (-m64/-m32)
Bugzilla 13792: Segfault with a pointer of opaque enum type
Bugzilla 14140: Bad codegen for CTFE union initialisers for immutable structs
Bugzilla 14459: String literal merge bug causes incorrect runtime program behavior
Bugzilla 14510: Bad tail call optimization with static arrays
Bugzilla 14541: "duplicate COMDAT" linker error with the template forward reference in Tuple.opAssign
Bugzilla 14653: scoped!range in foreach crashes
Bugzilla 14669: auto attribute on function parameter should be error always
Bugzilla 14709: dmd/samples/listener.d socket.accept exception handling is incorrect
Bugzilla 14743: ICE in TemplateInstance::needsTypeInference() with template forward reference
Bugzilla 14745: Qualifiers rejected for delegate literals
Bugzilla 14747: compiler insists on unnecessary return statement
Bugzilla 14753: pragma(inline) hides the alias "string"
Bugzilla 14768: Error: index 174762 overflow for static array
Bugzilla 14802: Template argument deduction depends on order of arguments
Bugzilla 14815: Destructor is not called for static array assignment
Bugzilla 14818: Unhelpful "does not match template overload set" error
Bugzilla 14846: Insufficient context deduction with implicit nested lambda
Bugzilla 14858: spurious "Error: overload alias 'foo' is not a variable" when overloading template and non-template via aliases
Bugzilla 14860: Destructor is not called for block assignment
Bugzilla 14862: Constructor of overlapped struct does not initialize correctly global variables
Bugzilla 14874: __traits(getFunctionAttributes) does not support the new return attribute
Bugzilla 14875: A template instance with deprecated symbol/type needlessly repeats "Deprecation:" messages
Bugzilla 14876: Deprecation message is sometimes duplicated
Bugzilla 14906: dmd dumps core at incorrect enum declaration
Bugzilla 14928: Switches -betterC and -m32mscoff do not appear in DMD's help text
Bugzilla 14950: Setting enum value to the last member of another enum causes int overflow error
Bugzilla 14996: only(EnumMembers!T) eats all my memory when T : string
Bugzilla 15001: Duplicate error message without line number on if statement
Bugzilla 15014: Win64: Invalid C++ mangling for multiple long arguments
Bugzilla 15018: Win64: ICE when assigning struct of size 4 to slice
Bugzilla 15019: [ICE] Heisencrash on OS X 32-bit with non-trivial projects
Bugzilla 15065: associative array has no keys property
Bugzilla 15080: extern(C++) classes have wrong static data layout
Bugzilla 15089: Marks wrong line as where error occurs.
Bugzilla 15127: Parser assertion on wrong code
 
DMD Compiler enhancements 
Bugzilla 12421: Allow simpler syntax for lambda template declarations
Bugzilla 14717: Ddoc macro recursion limit too low
Bugzilla 14755: Could -profile=gc also give the number of allocations that led to X bytes being allocated?
Bugzilla 14975: DMD refuses to inline even trivial struct constructors
 
Phobos regressions 
Bugzilla 14564: [REG2.067] dmd -property -unittest combination causes compiler error
Bugzilla 14685: [REG2.067] Silent incorrect behavior with enforce and custom exception
Bugzilla 14712: GIT HEAD : std.net.curl regressions
Bugzilla 14817: [REG-master] copy("foo", "bar") std.algorithm/std.file conflict
Bugzilla 14881: [REG] posix.mak omits package.d files when building zip file
Bugzilla 15027: rangified functions no longer work with alias this'ed strings (e.g. DirEntry)
Bugzilla 15039: Algebraic cannot store a Typedef along with Typedef'ed type
 
Phobos bugs 
Bugzilla 10895: incorrect std.array.join behavior with array of string-like class using alias this
Bugzilla 13650: std.algorithm.copy doesn't work with char/wchar
Bugzilla 13856: std.stdio.readln stomps arrays
Bugzilla 14282: executeShell should use sh and ignore the SHELL env variable
Bugzilla 14605: RefAppender fails isOutputRange
Bugzilla 14724: std.getopt: config.required breaks --help
Bugzilla 14760: Clear content-length for libcurl option to eliminate segmentation fault.
Bugzilla 14762: Do not use other method options on persistent connection.
Bugzilla 14799: Documentation for std.zlib.compress is incorrect
Bugzilla 14868: MmFile destructor seems to corrupt memory
Bugzilla 14880: findSkip summary is wrong
Bugzilla 14884: among docs broken link to find and canFind
Bugzilla 14924: Error in std.uri definition/description
Bugzilla 14925: replaceInPlace fail compilation
Bugzilla 14949: Non-descriptive "Enforcement failed" when attempting to write to closed file
Bugzilla 14994: std.mmfile incorrectly handles map failure
Bugzilla 14995: std.mmfile incorrectly handles errors in ctor
Bugzilla 15000: Changes to userShell either need to be reverted or the std.process documentation needs to be updated
Bugzilla 15003: assumeSorted Allocates GC Memory in Debug Mode
Bugzilla 15033: Element type of float iota is double
Bugzilla 15115: std.typetuple link to std.meta is 404
Bugzilla 15187: dispose for allocators is broken
Bugzilla 15188: deallocate cause memory leaks
 
Phobos enhancements 
Bugzilla 5945: redBlackTree printing
Bugzilla 12752: std.algorithm.isPermutation
Bugzilla 12966: Merge the heapsort code in std with the binary heap in std.range
Bugzilla 13596: permutations range
Bugzilla 14433: std.encoding does not support Central European ISO-8859-2 and CP1250 encodings
Bugzilla 14763: Use optionsData argument for curl options function.
Bugzilla 14777: 0 is not the initial value for std.zlib.adler32
Bugzilla 14798: [etc.c.sqlite3] sqlite3_errstr definition missing
Bugzilla 14877: std.net.curl needs PATCH http method
Bugzilla 14938: std.net.curl tests should use localhost or stub any networking
Bugzilla 14940: Can't call logger with more complex objects
 
Druntime regressions 
Bugzilla 14750: druntime/test/coverage was added to druntime, but not to the MANIFEST - zip file broken again
Bugzilla 14882: [REG] MANIFEST is missing test/common.mak
Bugzilla 14990: No rule to make target `src/core/sys/windows/stdio_msvc12.d', needed by 'druntime.zip'.
Bugzilla 14993: Allocating in a destructor segfaults instead of throwing InvalidMemoryOperationError
Bugzilla 15012: Druntime Makefile whitelists compilers
 
Druntime bugs 
Bugzilla 11414: druntime should run debug unittest
Bugzilla 14327: Unhandled exception from writeln() in C++/D application
Bugzilla 14663: shared library test - link_linkdep - segfaults on FreeBSD 10
Bugzilla 14776: shared library test - loadDR - segfaults on FreeBSD 10 when not building with -release
Bugzilla 14785: Some corner cases are not handled properly by core.checkedint.
Bugzilla 14870: incorrect use of assert to detect environmental errors in core.time
Bugzilla 15009: Object.destroy calls unnecessary postblits for destruction of static arrays object
Bugzilla 15036: SimpleDllMain assumes various symbols are available unqualified
Bugzilla 15104: Switching fibers in finally blocks breaks EH
 

dlang.org regressions 
Bugzilla 15046: [REG2.068] isForwardRange documentation is documenting issue 14544
 
dlang.org bugs 
Bugzilla 12072: Regex article needs update
Bugzilla 14579: [SPEC] No specification on modifiers in TypeDelegate symbols
Bugzilla 14695: [dlang.org] std.uuid Is Not Listed On The Index Page
Bugzilla 14879: tuple documentation broken link
Bugzilla 15095: Malformed URL in documentation link
 
dlang.org enhancements 
Bugzilla 14328: The terms "lvalue" and "rvalue" should be added to the glossary
Bugzilla 14522: Postfix array declaration examples should be removed from arrays.html
Bugzilla 14808: phobos sidebar "D Lib" link is back to homepage
Bugzilla 14933: specifications for the pragma(mangle) are vague
 
Tools bugs 
Bugzilla 15031: rdmd should force rebuild when --compiler changes
 
Tools enhancements 
Bugzilla 14715: Add README.md to the tools Repository
 
Installer bugs 
Bugzilla 13234: Windows installer: when updating, uninstaller reports wrong installation directory
Bugzilla 14801: OS X installer not compatible with OS X 10.11
 
Installer enhancements 
Bugzilla 14714: Add README.md to the Installer Repository
 







        Copyright © 1999-2024 by the D Language Foundation | Page generated by
Ddoc on Wed Nov  6 22:48:39 2024

    