comparison gen/tollvm.h @ 100:5071469303d4 trunk

[svn r104] TONS OF FIXES. Split up declaration, constant initializer gen and definition for globals, structs, classes and functions. Improved ClassInfo support (not complete), not in vtable yet. Fixed a bunch of forward reference problems. Much more. Major commit! :)
author lindquist
date Fri, 16 Nov 2007 08:21:47 +0100
parents c4e161556a21
children 027b8d8b71ec
comparison
equal deleted inserted replaced
99:a676a7743642 100:5071469303d4
6 struct DValue; 6 struct DValue;
7 7
8 const llvm::Type* DtoType(Type* t); 8 const llvm::Type* DtoType(Type* t);
9 bool DtoIsPassedByRef(Type* type); 9 bool DtoIsPassedByRef(Type* type);
10 Type* DtoDType(Type* t); 10 Type* DtoDType(Type* t);
11
12 const llvm::FunctionType* DtoFunctionType(Type* t, const llvm::Type* thistype, bool ismain = false);
13 const llvm::FunctionType* DtoFunctionType(FuncDeclaration* fdecl);
14 llvm::Function* DtoDeclareFunction(FuncDeclaration* fdecl);
15 11
16 const llvm::StructType* DtoDelegateType(Type* t); 12 const llvm::StructType* DtoDelegateType(Type* t);
17 llvm::Value* DtoNullDelegate(llvm::Value* v); 13 llvm::Value* DtoNullDelegate(llvm::Value* v);
18 llvm::Value* DtoDelegateCopy(llvm::Value* dst, llvm::Value* src); 14 llvm::Value* DtoDelegateCopy(llvm::Value* dst, llvm::Value* src);
19 llvm::Value* DtoCompareDelegate(TOK op, llvm::Value* lhs, llvm::Value* rhs); 15 llvm::Value* DtoCompareDelegate(TOK op, llvm::Value* lhs, llvm::Value* rhs);
26 22
27 const llvm::Type* DtoSize_t(); 23 const llvm::Type* DtoSize_t();
28 24
29 const llvm::StructType* DtoComplexType(const llvm::Type* base); 25 const llvm::StructType* DtoComplexType(const llvm::Type* base);
30 26
31 void DtoMain();
32
33 void DtoCallClassDtors(TypeClass* tc, llvm::Value* instance);
34 void DtoInitClass(TypeClass* tc, llvm::Value* dst);
35
36 llvm::Constant* DtoConstInitializer(Type* type, Initializer* init); 27 llvm::Constant* DtoConstInitializer(Type* type, Initializer* init);
28 llvm::Constant* DtoConstFieldInitializer(Type* type, Initializer* init);
37 DValue* DtoInitializer(Initializer* init); 29 DValue* DtoInitializer(Initializer* init);
38 30
39 llvm::Function* LLVM_DeclareMemSet32(); 31 llvm::Function* LLVM_DeclareMemSet32();
40 llvm::Function* LLVM_DeclareMemSet64(); 32 llvm::Function* LLVM_DeclareMemSet64();
41 llvm::Function* LLVM_DeclareMemCpy32(); 33 llvm::Function* LLVM_DeclareMemCpy32();
64 56
65 bool DtoIsTemplateInstance(Dsymbol* s); 57 bool DtoIsTemplateInstance(Dsymbol* s);
66 58
67 void DtoLazyStaticInit(bool istempl, llvm::Value* gvar, Initializer* init, Type* t); 59 void DtoLazyStaticInit(bool istempl, llvm::Value* gvar, Initializer* init, Type* t);
68 60
69 void DtoClassInfo(ClassDeclaration* cd); 61 void DtoDefineDsymbol(Dsymbol* dsym);
62 void DtoConstInitDsymbol(Dsymbol* dsym);
63 void DtoConstInitGlobal(VarDeclaration* vd);
70 64
71 // llvm wrappers 65 // llvm wrappers
72 void DtoMemCpy(llvm::Value* dst, llvm::Value* src, llvm::Value* nbytes); 66 void DtoMemCpy(llvm::Value* dst, llvm::Value* src, llvm::Value* nbytes);
73 bool DtoCanLoad(llvm::Value* ptr); 67 bool DtoCanLoad(llvm::Value* ptr);
74 llvm::Value* DtoLoad(llvm::Value* src); 68 llvm::Value* DtoLoad(llvm::Value* src);