Mercurial > projects > ldc
annotate gen/classes.h @ 1605:1d5721f9ae18
[WIP] Merge DMD r251: bugzilla 111 (appending a dchar to a char[])
This patch needs some work in the code generation, because of the runtime
changes (functions "_d_arrayappendcd" and "_d_arrayappendwd" are added).
This doesn't affect existing code though, it just makes with patch
a little useless, because something like this:
char [] s;
s ~= '\u6211';
That failed to compile with a nice error message previously to this
change, now fails with and ugly error message (a failed assertion).
Apparently there is a regression introduced by this patch too, when
compiling Dil I get this assertion message:
ldc: /home/luca/tesis/ldc/gen/statements.cpp:132: virtual void ReturnStatement::toIR(IRState*): Assertion `p->topfunc()->getReturnType() == llvm::Type::getVoidTy(gIR->context())' failed.
0 ldc 0x08a91628
Thank god we have bisecting capabilities in VCSs now ;)
---
dmd/expression.c | 47 +++++++++++++++++++++++++++++++++++++++++------
1 files changed, 41 insertions(+), 6 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:19 -0300 |
parents | 5d0c043ff131 |
children |
rev | line source |
---|---|
664
eef8ac26c66c
Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents:
486
diff
changeset
|
1 #ifndef LDC_GEN_CLASSES_H |
eef8ac26c66c
Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents:
486
diff
changeset
|
2 #define LDC_GEN_CLASSES_H |
100 | 3 |
217
0806379a5eca
[svn r233] Added: -oq command line option for writing fully qualified object names.
lindquist
parents:
213
diff
changeset
|
4 #include "gen/structs.h" |
0806379a5eca
[svn r233] Added: -oq command line option for writing fully qualified object names.
lindquist
parents:
213
diff
changeset
|
5 |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
705
diff
changeset
|
6 /// Resolves the llvm type for a class declaration |
102
027b8d8b71ec
[svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents:
100
diff
changeset
|
7 void DtoResolveClass(ClassDeclaration* cd); |
027b8d8b71ec
[svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents:
100
diff
changeset
|
8 |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
705
diff
changeset
|
9 /// Provides the llvm declaration for a class declaration |
100 | 10 void DtoDeclareClass(ClassDeclaration* cd); |
11 | |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
705
diff
changeset
|
12 /// Constructs the constant initializer for a class declaration |
100 | 13 void DtoConstInitClass(ClassDeclaration* cd); |
14 | |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
705
diff
changeset
|
15 /// Provides the llvm definition for a class declaration |
100 | 16 void DtoDefineClass(ClassDeclaration* cd); |
17 | |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
705
diff
changeset
|
18 /// Builds the initializer of cd's ClassInfo. |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
705
diff
changeset
|
19 /// FIXME: this should be put into IrStruct and eventually IrClass. |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
705
diff
changeset
|
20 LLConstant* DtoDefineClassInfo(ClassDeclaration* cd); |
100 | 21 |
486
a34078905d01
Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
217
diff
changeset
|
22 DValue* DtoNewClass(Loc loc, TypeClass* type, NewExp* newexp); |
213
7816aafeea3c
[svn r229] Updated the object.d implementation to the latest Tango.
lindquist
parents:
210
diff
changeset
|
23 void DtoInitClass(TypeClass* tc, LLValue* dst); |
7816aafeea3c
[svn r229] Updated the object.d implementation to the latest Tango.
lindquist
parents:
210
diff
changeset
|
24 DValue* DtoCallClassCtor(TypeClass* type, CtorDeclaration* ctor, Array* arguments, LLValue* mem); |
7816aafeea3c
[svn r229] Updated the object.d implementation to the latest Tango.
lindquist
parents:
210
diff
changeset
|
25 void DtoFinalizeClass(LLValue* inst); |
100 | 26 |
114 | 27 DValue* DtoCastClass(DValue* val, Type* to); |
28 DValue* DtoDynamicCastObject(DValue* val, Type* to); | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
29 |
114 | 30 DValue* DtoCastInterfaceToObject(DValue* val, Type* to); |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
31 DValue* DtoDynamicCastInterface(DValue* val, Type* to); |
113
27b9f749d9fe
[svn r117] Initial working implementation of interfaces.
lindquist
parents:
102
diff
changeset
|
32 |
705
5a2983f97498
Fixed weird struct problem from downs, see mini/compile_structs1.d
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
33 LLValue* DtoIndexClass(LLValue* src, ClassDeclaration* sd, VarDeclaration* vd); |
132 | 34 |
1434
5d0c043ff131
Remove code duplication for vtable loads and improve instruction naming to make
Frits van Bommel <fvbommel wxs.nl>
parents:
1228
diff
changeset
|
35 LLValue* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl, char* name); |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
132
diff
changeset
|
36 |
100 | 37 #endif |