Martin
eab29ba173
Only define special member functions if semantic3 was run
2016-08-19 23:22:03 +02:00
Martin
642ca606c3
Run semantic3() before defining special member functions (xopEquals etc.)
...
This fixes issue #1698 .
2016-08-19 22:58:20 +02:00
Martin
40fdf7819a
Support non-trivial initializers for enums
...
E.g., non-zero-initialized structs encountered in issue #1581 .
2016-06-26 23:29:10 +02:00
Johan Engelen
1b4b9a07c9
Fix typo: typeinf.h --> typinf.h [NFC]
2016-06-08 10:40:00 +02:00
Johan Engelen
d7ed918766
Fix codegen for static initialization with typeid(A). Resolves issue 1540.
2016-06-08 10:40:00 +02:00
Kai Nacke
763b196a72
Merge remote-tracking branch 'origin/master' into merge-2.070
2016-03-24 22:40:31 +01:00
Kai Nacke
f42273cbe1
Merge branch 'ltsmaster'
2016-03-24 21:50:15 +01:00
Johan Engelen
79d7eb68bc
Define TypeInfo symbols as mutable (instead of immutable), to comply with DMD. Fixes issue #1377 .
2016-03-23 22:36:08 +01:00
Kai Nacke
88f3de8bea
Merge branch 'ltsmaster'
2016-03-22 19:05:07 +01:00
Martin
88dcb4349a
Refactor setting linkage type and COMDAT
2016-03-20 16:37:44 +01:00
David Nadlinger
90c213b52e
Adapt to changed StringExp API
...
Not tested yet. There is also quite a bit of potential for
further cleanup of the glue layer string manipulation code.
2016-02-14 19:35:40 +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
Martin
fa48cabedc
Some more cosmetic fixes
2015-11-02 19:54:18 +01:00
David Nadlinger
05d45350aa
clang-tidy: Add readability-else-after-return
2015-11-02 11:30:40 +02:00
David Nadlinger
9df487edff
gen/ir: clang-tidy the world
2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615
driver/gen/ir: clang-format the world
...
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
David Nadlinger
8eab25f2fa
Another speculative TypeInfo fix
...
No idea how to reproduce this, as it occurs within a 300 frame deep
call stack (nested typeinfo emission), and I couldn't get a smaller
test case so far.
An alternative fix would be to call the typinf.cpp functions that
emmiit the symbol directly instead of going through CodegenVisitor
(which then skips the TypeInfo because it is for a speculative
struct, so that the TypeidExp that wants to use it can't read the
global variable).
2015-10-29 16:49:00 +02:00
David Nadlinger
f8b18f538d
Emit special struct member functions if referenced by speculative TypeInfo
2015-10-28 17:10:29 +02:00
Martin
b63a5e3cf8
Merge branch 'master' into merge-2.068
2015-10-22 22:39:46 +02:00
Martin
05c10d9107
Introduce DtoAlignment() and overload DtoAlloca() for VarDeclarations
...
Trying to get the alignment right by using the first non-default one
in the following order of descending priority:
VarDeclaration::alignment [variables only of course]
Type::alignment()
Type::alignsize()
This fixes `align(x) struct S { ... }`.
2015-10-18 14:38:09 +02:00
David Nadlinger
ab0c0820f3
Merge upstream v2.068.2 tags
2015-09-24 18:41:35 +02:00
David Nadlinger
5037ed0dc8
Update TypeInfo_Struct check for xdtorti added in 2.068
...
This is only set from druntime, no compiler changes necessary.
2015-08-29 03:09:18 +02:00
David Nadlinger
cb0cecb9e7
Implement ToElemVisitor::visit(TypeidExp*)
2015-08-29 03:09:17 +02:00
David Nadlinger
9fd1e8d2a6
Merge frontend tag v2.068.0
...
Kept idgen as C++ program for now. We'll tackle build system integration
once we actually switch to DDMD.
2015-08-29 03:09:17 +02:00
David Nadlinger
0922254dd1
Directly emit IR into same llvm::Module instead of using Linker
...
GitHub: Fixes #970 .
2015-06-14 21:36:35 +02:00
Dan Olson
17c99659cb
Use old builtinTypeInfo logic for type class
...
This restores the previous TypeClass::builtinTypeInfo() logic that
always returns false for Tclass and puts back in a relevant FIXME
comment. This prevents a bunch of missing class TypeInfo definitions.
2015-03-28 11:44:26 -07:00
Kai Nacke
51b9822916
Fix some annoying warnings.
2015-03-21 11:02:27 +01:00
kai
c39c7e9c35
Update to DMD v2.067.0-b2
...
Includes all tagged with v2.067.0-b2. Does not includes latest druntime changes from ldc (head) branch.
This is known to be broken. I only merged the frontend stuff but did not try to compile something...
2015-02-24 22:16:17 +01:00
kai
e455b90456
Merge branch 'master' into merge-2.067
...
Conflicts:
dmd2/template.c
runtime/druntime
runtime/phobos
2015-02-24 07:23:58 +01:00
kai
024b14cd7f
Fix some warnings.
...
These are easy to solve and reduce the noise in the Travis build.
2014-12-26 15:59:23 +01:00
kai
441c98532c
Add changes related to the llvm::Metadata refactoring in LLVM 3.6.
...
In LLVM 3.6, the llvm::Metadata hierarchy is distinct from the llvm::Value hierarchy.
This refactoring causes several changes.
2014-12-25 19:02:15 +01:00
kai
a2748cd2fd
Merge current development state of 2.067
...
First merge of current development stream. Asm blocks are known to be broken.
DMD: 0c9f437bc24015707130ba42dc434d9cd58282fb
druntime: 86d49cfb3670904603df0cfdfe44c6fff565c0fc
Phobos: a8ca4f7964becac680af0eadbde05aa7d10fc338
2014-11-15 18:53:23 +01:00
Alexey Prokhin
66a392a5c2
Rename Type::irtype to ctype for consistency with dmd and gdc
2014-10-05 16:55:12 +04:00
Alexey Prokhin
6ddb649f00
Visitorize TypeInfoDeclaration::llvmDefine()
2014-09-21 22:08:32 +04:00
Kai Nacke
382ad184d8
Merge branch 'master' into merge-2.066
...
Conflicts:
dmd2/builtin.c
gen/classes.cpp
gen/functions.cpp
gen/llvmhelpers.cpp
gen/statements.cpp
gen/toir.cpp
runtime/druntime
runtime/phobos
2014-09-13 23:11:54 +02:00
Alexey Prokhin
32b1d4cc55
Reduce size of IrDsymbol even more
...
resolved/defined/declared/initialized are turned into flags.
2014-09-12 14:43:54 +04:00
Alexey Prokhin
18f33b1815
Make IrDsymbol to be a typesafe union to reduce memory usage
2014-09-12 14:43:49 +04:00
Alexey Prokhin
d9189acbc4
Move toElem/toConstElem to visitors
2014-08-27 16:22:02 +04:00
Alexey Prokhin
5bb12b4838
Support generation of type info for enums with floating type
2014-08-24 13:59:02 +04:00
Alexey Prokhin
76dec46df5
WIP: merge dmdfe 2.066
2014-08-22 16:01:28 +04:00
kai
2b6dbb03f4
Add IF_LOG to more logging statements.
...
Evaluating arguments which call toChars() or toPrettyChars() are much more expensive then checking Logger::enabled().
2014-06-26 06:54:38 +02:00
Christian Kamm
de0ab72324
Update decision to emit typeinfo to what dmd does.
2014-06-14 20:01:52 +02:00
Kai Nacke
fe39da53e3
Merge of 2.065.0-b3.
...
The new visitor class is used for IR generation. This removes some modifications from DMD source.
2014-02-10 08:47:25 +01:00
Alexey Prokhin
89573a731a
Fix DMD Issue 10451 - Array of pointers to opaque struct gives forward reference errors.
2013-12-08 14:43:45 +04:00
Alexey Prokhin
5a181d9312
Update struct type info generation to reflect changes in dmd frontend
2013-12-08 14:36:59 +04:00
Alexey Prokhin
d235e4cc28
Fix DMD Issue 10425 - Link error with templates.
...
Merged dmdfe changes in typeinf.c
2013-12-08 13:17:49 +04:00
Kai Nacke
87965cdc19
Merge branch 'master' into merge-2.064
...
Conflicts:
runtime/druntime
2013-11-26 08:00:10 +01:00
Kai Nacke
7f017608a8
Use enum literal instead of constant
2013-11-26 07:56:50 +01:00
Kai Nacke
cef5b27400
Revert "Declare more TypeClass instances as builtin."
...
This reverts commit f7f62a609d
.
2013-11-07 17:13:45 +01:00
Kai Nacke
f7f62a609d
Declare more TypeClass instances as builtin.
...
Another difference to DMD. With the new TypeInfo, this should work now.
2013-11-03 15:23:11 +01:00