Commit graph

13 commits

Author SHA1 Message Date
Kai Nacke
802923c06b Add new extern(C++, class) and extern(C++, struct) declarations.
VS has different name manglings for classes and structs. With the
new extern(C++, class) and extern(C++, struct) declarations, the
name mangling algorithm is changed to use a mangling different
from the used D entity.

A common use case is to map a value type modeled as class in C++ to
a struct in D.

This is backport of https://github.com/dlang/dmd/pull/5875.
2016-06-25 14:39:39 +02:00
Johan Engelen
28487120dc Merge DMD tag 'v2.071.1-b2' 2016-05-30 11:08:00 +02:00
Johan Engelen
776e32d801 Add experimental -hash-threshold option to hash very long symbol names. 2016-05-24 11:39:08 +02:00
David Nadlinger
4460a18396 Work around invalid AST produced by issue 15839 fix
The fix for 15839 (accessing this.outer from a member function
inside a nested class) in bb5f550 produces a ThisExp that
refers to the 'this' VarDecl in an outer scope, leading to the
latter being referenced from the nested scope without that being
added to its nestedRefs. Subsequently, the VarDecl is also not
present in the outer FuncDecls closureVars.

This is a weird construct, and outside the AST invariants that
would previously hold. This commit properly at least properly
registers the nested reference, but using a ThisExp in this
manner might not be the cleanest way in the first place.

This is a back-port of DMD commit a117c87a8a (#5741),
and fixes runnable/inner.d.
2016-05-09 09:23:21 +01:00
David Nadlinger
7e49c49c8f Update frontend to the final 2.071 release
There were no druntime/Phobos changes between b1 and the final version.
2016-05-08 21:54:22 +01:00
David Nadlinger
9f998a398d Initial merge of upstream v2.071.0-b2
Notably, the glue layer side of the changed multiple interface
inheritance layout (DMD a54e89d) has not been implemented yet.

This corresponds to DMD commit 3f6a763c0589dd03c1c206eafd434b593702564e.
2016-04-03 15:15:14 +01:00
David Nadlinger
4e45bef490 Merge frontend tag v2.070.1-b1 2016-02-25 20:07:07 +01:00
David Nadlinger
2ec740061e Add ddmd.gluelayer stub for LDC 2016-02-14 19:35:40 +01:00
David Nadlinger
1a6c2f9248 Comment out some ddmd.gluelayer imports. Will need to be fixed. 2016-02-14 19:35:40 +01:00
David Nadlinger
168f28607e Initial merge of the v2.070.0 frontend 2016-02-14 19:35:40 +01:00
Johan Engelen
c1b5212c8c Fix build for MSVC: make real == double for LDC built with MSVC. 2016-02-09 18:30:13 +01:00
Johan Engelen
29ce4012af dmd2 --> ddmd. Merge (almost all of) our changes to dmd source into the new D source of dmd 2.069.2.
Also adds the CMake infrastructure to compile and link the D source files.

The build is partially broken:
- A few files in Phobos and druntime do not build
- MSVC build is broken because of unresolved symbols involving reals
2016-01-28 19:03:58 +01:00
Johan Engelen
9ae8ce6165 Add DDMD source tag v2.069.2 2016-01-28 18:35:03 +01:00