Mercurial > projects > ldc
annotate ir/irtype.cpp @ 945:03d7c4aac654
SWITCHED TO LLVM 2.5 !
Applied patch from ticket #129 to compile against latest LLVM. Thanks Frits van Bommel.
Fixed implicit return by asm block at the end of a function on x86-32. Other architectures will produce an error at the moment. Adding support for new targets is fairly simple.
Fixed return calling convention for complex numbers, ST and ST(1) were switched around.
Added some testcases.
I've run a dstress test and there are no regressions. However, the runtime does not seem to compile with symbolic debug information. -O3 -release -inline works well and is what I used for the dstress run. Tango does not compile, a small workaround is needed in tango.io.digest.Digest.Digest.hexDigest. See ticket #206 .
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sun, 08 Feb 2009 05:26:54 +0100 |
parents | 340acf1535d0 |
children |
rev | line source |
---|---|
173
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
1 #include "gen/llvm.h" |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
2 #include "ir/ir.h" |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
3 #include "ir/irtype.h" |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
4 |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
5 std::set<IrType*> IrType::list; |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
6 |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
7 void IrType::resetAll() |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
8 { |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
9 std::set<IrType*>::iterator it; |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
10 for(it = list.begin(); it != list.end(); ++it) |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
11 (*it)->reset(); |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
12 } |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
13 |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
14 IrType::IrType() |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
15 { |
174
16e676ae5ab4
[svn r190] Fixed array concatenation for some broken cases.
lindquist
parents:
173
diff
changeset
|
16 assert(list.insert(this).second); |
173
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
17 reset(); |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
18 } |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
19 |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
20 IrType::IrType(const IrType& s) |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
21 { |
174
16e676ae5ab4
[svn r190] Fixed array concatenation for some broken cases.
lindquist
parents:
173
diff
changeset
|
22 assert(list.insert(this).second); |
173
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
23 type = s.type; |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
24 } |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
25 |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
26 IrType::~IrType() |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
27 { |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
28 list.erase(this); |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
29 } |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
30 |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
31 void IrType::reset() |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
32 { |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
33 type = NULL; |
db9890b3fb64
[svn r189] moving IR data back into DMD frontend nodes
ChristianK
parents:
diff
changeset
|
34 } |