Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Forums
  - IRC
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Donate
- Resources
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# Change Log: 2.069.0

Download D 2.069.0
released Nov 3, 2015

#### Compiler Changes

1. DMD has been ported to D.
2. Basic support for Objective-C.
3. The -property switch has been deprecated.
4. DMD's codegen has improved.

#### Library Changes

1. The package std.experimental.allocator was added.
2. More phobos functions were rangified.
3. libcurl is now loaded dynamically
4. Backtraces now include file name and line number.
5. Support to link against VS2015 libraries.
6. The documentation for Phobos has been improved.
7. moveEmplace was added
8. Use isPermutation to test whether two ranges are permutations of each other.
9. The new isSameLength can be more efficient than comparing the walkLength of two ranges.
10. getUDAs was added to help get user-defined attributes of specific types from symbols.
11. getSymbolsByUDA was added to find symbols with specific user-defined attributes.
12. cmp was added, defining total ordering on floating-point numbers, including NaN.
13. 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

1. 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.

2. 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.

3. 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.

4. 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

1. 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

2. 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).

3. 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]

4. 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.

5. 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.

6. 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);
           // move value and emplace it into ptr
           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

1. Bugzilla 13720: [REG2.067] Adding trivial destructor to std.datetime causes Internal error: ..\ztc\cgelem.c 2418
2. Bugzilla 14430: [REG2.060] Null parameter is detected as non-null.
3. Bugzilla 14572: cannot build dmd from source anymore: 'g++ -m64: No such file or directory'
4. Bugzilla 14588: [REG2.067] undefined reference error while linking with -debug option to a static library.
5. Bugzilla 14682: [REG2.037] Incorrect interpretation of ~ []
6. Bugzilla 14699: [REG2.062] ICE: segfaults on array with zero size
7. Bugzilla 14710: VC-built DMD crashes on templated variadic function IFTI
8. Bugzilla 14731: [REG2.068a] Error location insufficient when CTFE
9. Bugzilla 14735: [REG2.068-b1] std.string.indexOf cannot deduce function for char argument
10. Bugzilla 14737: [REG2.058] A concatenation of array literal and static array should make dynamic array
11. Bugzilla 14754: [REG2.068b1] 64bit wrong code with -inline
12. Bugzilla 14779: incorrect addressing of arguments in require/in-contract
13. Bugzilla 14829: [REG2.066.0] wrong code with -O -inline
14. Bugzilla 14886: [REG2.066] std.parallelism.parallel with large static array seems to hang compile
15. Bugzilla 14926: Programs compiled using dmd 2.068 are generating dummy profilegc.log files
16. Bugzilla 14952: Redundant REX.W before FSTP confuses Valgrind
17. Bugzilla 14991: dmd doesn't build under OSX 32 bit
18. Bugzilla 15045: [Reg 2.069-devel] hasElaborateCopyConstructor is true for struct with opDispatch
19. Bugzilla 15072: [REG2.069-devel] Re-introducing codegen performance regression 14805
20. Bugzilla 15079: [REG2.068.1] Assertion `fd->semanticRun == PASSsemantic3done' failed.
21. Bugzilla 15092: [REG2.066.0] ICE on duplicated struct declarations in class members
22. Bugzilla 15123: [REG2.069.0-devel] segfault when compiling simple SIMD code
23. Bugzilla 15126: [REG2.069-devel] dmd crashes when analyzing array literal
24. Bugzilla 15138: [REG2.068.2] ICE with basic use of stdx.data.json
25. Bugzilla 15149: [REG2.068.1] Linker error with separate compilation
26. Bugzilla 15150: [REG2.068.1] Public selective import causes conflict
27. Bugzilla 15152: [REG2.069.0-devel] template fails to instantiate if argument is itself a template
28. Bugzilla 15168: [REG2.068.0] std.variant.Algebraic interacts badly with string alias this sub-types
29. Bugzilla 15176: [REG2.069.0-b1] ICE(glue.c):separate compilation with -inline crash in glue.c
30. Bugzilla 15177: [REG2.069.0-b1] mixin + traits issue with 2.069 beta 1
31. Bugzilla 15181: SYSCONFDIR is broken
32. Bugzilla 15200: [REG2.068.2] ICE(glue.c) when compiling with -inline
33. Bugzilla 15207: [REG2.069.0-b1] Wrong codegen with -inline
34. Bugzilla 15210: [REG2.064][ICE] (glue.c at 1489) with tuples and AAs
35. Bugzilla 15214: [REG2.065.0] ICE in Mangler::mangleFunc
36. Bugzilla 15251: [REG2.069.0-rc1] std.datetime bug with -inline
37. Bugzilla 15253: [REG2.069.0-rc1] inliner prevent compilation
38. Bugzilla 15272: [2.069-rc2,inline] nothing written to output when -inline is set

#### DMD Compiler bugs

1. Bugzilla 1747: class to base interface static cast is incorrect in some cases
2. Bugzilla 2013: interface to interface dynamic cast is incorrect in some cases
3. Bugzilla 2091: D2 final cannot be applied to variable
4. Bugzilla 2354: conditional compilation rejects else if the declaration is a single pragma
5. Bugzilla 3243: instantiated 'static this()' bring on a compiler message ': __gate is thread local'
6. Bugzilla 6417: Wrong context for nested functions in virtual class member function contracts
7. Bugzilla 7625: inlining only works with explicit else branch
8. Bugzilla 7979: Alias this does not work with switch
9. Bugzilla 9383: Wrong context for contracts if closure [dis]appears in override function
10. Bugzilla 9891: Ability to modify immutable using default value of ref/out parameter
11. Bugzilla 12487: DMD correctly reports excessive CTFE recursion, but not template recursion
12. Bugzilla 12744: auto ref crashes DMD on ASSERT
13. Bugzilla 13007: Wrong x86 code: long negate
14. Bugzilla 13203: conflicting aliases allowed with static if
15. Bugzilla 13244: Wrong code with -inline and foreach/map/all
16. Bugzilla 13652: 2D Static Array Init produces wrong result (-m64/-m32)
17. Bugzilla 13792: Segfault with a pointer of opaque enum type
18. Bugzilla 14140: Bad codegen for CTFE union initialisers for immutable structs
19. Bugzilla 14459: String literal merge bug causes incorrect runtime program behavior
20. Bugzilla 14510: Bad tail call optimization with static arrays
21. Bugzilla 14541: "duplicate COMDAT" linker error with the template forward reference in Tuple.opAssign
22. Bugzilla 14653: scoped!range in foreach crashes
23. Bugzilla 14669: auto attribute on function parameter should be error always
24. Bugzilla 14709: dmd/samples/listener.d socket.accept exception handling is incorrect
25. Bugzilla 14743: ICE in TemplateInstance::needsTypeInference() with template forward reference
26. Bugzilla 14745: Qualifiers rejected for delegate literals
27. Bugzilla 14747: compiler insists on unnecessary return statement
28. Bugzilla 14753: pragma(inline) hides the alias "string"
29. Bugzilla 14768: Error: index 174762 overflow for static array
30. Bugzilla 14802: Template argument deduction depends on order of arguments
31. Bugzilla 14815: Destructor is not called for static array assignment
32. Bugzilla 14818: Unhelpful "does not match template overload set" error
33. Bugzilla 14846: Insufficient context deduction with implicit nested lambda
34. Bugzilla 14858: spurious "Error: overload alias 'foo' is not a variable" when overloading template and non-template via aliases
35. Bugzilla 14860: Destructor is not called for block assignment
36. Bugzilla 14862: Constructor of overlapped struct does not initialize correctly global variables
37. Bugzilla 14874: __traits(getFunctionAttributes) does not support the new return attribute
38. Bugzilla 14875: A template instance with deprecated symbol/type needlessly repeats "Deprecation:" messages
39. Bugzilla 14876: Deprecation message is sometimes duplicated
40. Bugzilla 14906: dmd dumps core at incorrect enum declaration
41. Bugzilla 14928: Switches -betterC and -m32mscoff do not appear in DMD's help text
42. Bugzilla 14950: Setting enum value to the last member of another enum causes int overflow error
43. Bugzilla 14996: only(EnumMembers!T) eats all my memory when T : string
44. Bugzilla 15001: Duplicate error message without line number on if statement
45. Bugzilla 15014: Win64: Invalid C++ mangling for multiple long arguments
46. Bugzilla 15018: Win64: ICE when assigning struct of size 4 to slice
47. Bugzilla 15019: [ICE] Heisencrash on OS X 32-bit with non-trivial projects
48. Bugzilla 15065: associative array has no keys property
49. Bugzilla 15080: extern(C++) classes have wrong static data layout
50. Bugzilla 15089: Marks wrong line as where error occurs.
51. Bugzilla 15127: Parser assertion on wrong code

#### DMD Compiler enhancements

1. Bugzilla 12421: Allow simpler syntax for lambda template declarations
2. Bugzilla 14717: Ddoc macro recursion limit too low
3. Bugzilla 14755: Could -profile=gc also give the number of allocations that led to X bytes being allocated?
4. Bugzilla 14975: DMD refuses to inline even trivial struct constructors

#### Phobos regressions

1. Bugzilla 14564: [REG2.067] dmd -property -unittest combination causes compiler error
2. Bugzilla 14685: [REG2.067] Silent incorrect behavior with enforce and custom exception
3. Bugzilla 14712: GIT HEAD : std.net.curl regressions
4. Bugzilla 14817: [REG-master] copy("foo", "bar") std.algorithm/std.file conflict
5. Bugzilla 14881: [REG] posix.mak omits package.d files when building zip file
6. Bugzilla 15027: rangified functions no longer work with alias this'ed strings (e.g. DirEntry)
7. Bugzilla 15039: Algebraic cannot store a Typedef along with Typedef'ed type

#### Phobos bugs

1. Bugzilla 10895: incorrect std.array.join behavior with array of string-like class using alias this
2. Bugzilla 13650: std.algorithm.copy doesn't work with char/wchar
3. Bugzilla 13856: std.stdio.readln stomps arrays
4. Bugzilla 14282: executeShell should use sh and ignore the SHELL env variable
5. Bugzilla 14605: RefAppender fails isOutputRange
6. Bugzilla 14724: std.getopt: config.required breaks --help
7. Bugzilla 14760: Clear content-length for libcurl option to eliminate segmentation fault.
8. Bugzilla 14762: Do not use other method options on persistent connection.
9. Bugzilla 14799: Documentation for std.zlib.compress is incorrect
10. Bugzilla 14868: MmFile destructor seems to corrupt memory
11. Bugzilla 14880: findSkip summary is wrong
12. Bugzilla 14884: among docs broken link to find and canFind
13. Bugzilla 14924: Error in std.uri definition/description
14. Bugzilla 14925: replaceInPlace fail compilation
15. Bugzilla 14949: Non-descriptive "Enforcement failed" when attempting to write to closed file
16. Bugzilla 14994: std.mmfile incorrectly handles map failure
17. Bugzilla 14995: std.mmfile incorrectly handles errors in ctor
18. Bugzilla 15000: Changes to userShell either need to be reverted or the std.process documentation needs to be updated
19. Bugzilla 15003: assumeSorted Allocates GC Memory in Debug Mode
20. Bugzilla 15033: Element type of float iota is double
21. Bugzilla 15115: std.typetuple link to std.meta is 404
22. Bugzilla 15187: dispose for allocators is broken
23. Bugzilla 15188: deallocate cause memory leaks

#### Phobos enhancements

1. Bugzilla 5945: redBlackTree printing
2. Bugzilla 12752: std.algorithm.isPermutation
3. Bugzilla 12966: Merge the heapsort code in std with the binary heap in std.range
4. Bugzilla 13596: permutations range
5. Bugzilla 14433: std.encoding does not support Central European ISO-8859-2 and CP1250 encodings
6. Bugzilla 14763: Use optionsData argument for curl options function.
7. Bugzilla 14777: 0 is not the initial value for std.zlib.adler32
8. Bugzilla 14798: [etc.c.sqlite3] sqlite3_errstr definition missing
9. Bugzilla 14877: std.net.curl needs PATCH http method
10. Bugzilla 14938: std.net.curl tests should use localhost or stub any networking
11. Bugzilla 14940: Can't call logger with more complex objects

#### Druntime regressions

1. Bugzilla 14750: druntime/test/coverage was added to druntime, but not to the MANIFEST - zip file broken again
2. Bugzilla 14882: [REG] MANIFEST is missing test/common.mak
3. Bugzilla 14990: No rule to make target `src/core/sys/windows/stdio_msvc12.d', needed by 'druntime.zip'.
4. Bugzilla 14993: Allocating in a destructor segfaults instead of throwing InvalidMemoryOperationError
5. Bugzilla 15012: Druntime Makefile whitelists compilers

#### Druntime bugs

1. Bugzilla 11414: druntime should run debug unittest
2. Bugzilla 14327: Unhandled exception from writeln() in C++/D application
3. Bugzilla 14663: shared library test - link_linkdep - segfaults on FreeBSD 10
4. Bugzilla 14776: shared library test - loadDR - segfaults on FreeBSD 10 when not building with -release
5. Bugzilla 14785: Some corner cases are not handled properly by core.checkedint.
6. Bugzilla 14870: incorrect use of assert to detect environmental errors in core.time
7. Bugzilla 15009: Object.destroy calls unnecessary postblits for destruction of static arrays object
8. Bugzilla 15036: SimpleDllMain assumes various symbols are available unqualified
9. Bugzilla 15104: Switching fibers in finally blocks breaks EH

#### Druntime enhancements

1. Bugzilla 15076: Get ID of current thread
2. Bugzilla 15137: core.time: Support Duration/Duration and Duration%Duration

#### dlang.org regressions

1. Bugzilla 15046: [REG2.068] isForwardRange documentation is documenting issue 14544

#### dlang.org bugs

1. Bugzilla 12072: Regex article needs update
2. Bugzilla 14579: [SPEC] No specification on modifiers in TypeDelegate symbols
3. Bugzilla 14695: [dlang.org] std.uuid Is Not Listed On The Index Page
4. Bugzilla 14879: tuple documentation broken link
5. Bugzilla 15095: Malformed URL in documentation link

#### dlang.org enhancements

1. Bugzilla 14328: The terms "lvalue" and "rvalue" should be added to the glossary
2. Bugzilla 14522: Postfix array declaration examples should be removed from arrays.html
3. Bugzilla 14808: phobos sidebar "D Lib" link is back to homepage
4. Bugzilla 14933: specifications for the pragma(mangle) are vague

#### Tools bugs

1. Bugzilla 15031: rdmd should force rebuild when --compiler changes

#### Tools enhancements

1. Bugzilla 14715: Add README.md to the tools Repository

#### Installer bugs

1. Bugzilla 13234: Windows installer: when updating, uninstaller reports wrong installation directory
2. Bugzilla 14801: OS X installer not compatible with OS X 10.11

#### Installer enhancements

1. Bugzilla 14714: Add README.md to the Installer Repository

Copyright © 1999-2018 by the D Language Foundation | Page generated by Ddoc on Sun Jan 21 22:34:50 2018