Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

root/gen/classes.h

Revision 1434:5d0c043ff131, 1.3 kB (checked in by Frits van Bommel <fvbommel wxs.nl>, 3 years ago)

Remove code duplication for vtable loads and improve instruction naming to make
bitcode with virtual calls easier to read.

Line 
1 #ifndef LDC_GEN_CLASSES_H
2 #define LDC_GEN_CLASSES_H
3
4 #include "gen/structs.h"
5
6 /// Resolves the llvm type for a class declaration
7 void DtoResolveClass(ClassDeclaration* cd);
8
9 /// Provides the llvm declaration for a class declaration
10 void DtoDeclareClass(ClassDeclaration* cd);
11
12 /// Constructs the constant initializer for a class declaration
13 void DtoConstInitClass(ClassDeclaration* cd);
14
15 /// Provides the llvm definition for a class declaration
16 void DtoDefineClass(ClassDeclaration* cd);
17
18 /// Builds the initializer of cd's ClassInfo.
19 /// FIXME: this should be put into IrStruct and eventually IrClass.
20 LLConstant* DtoDefineClassInfo(ClassDeclaration* cd);
21
22 DValue* DtoNewClass(Loc loc, TypeClass* type, NewExp* newexp);
23 void DtoInitClass(TypeClass* tc, LLValue* dst);
24 DValue* DtoCallClassCtor(TypeClass* type, CtorDeclaration* ctor, Array* arguments, LLValue* mem);
25 void DtoFinalizeClass(LLValue* inst);
26
27 DValue* DtoCastClass(DValue* val, Type* to);
28 DValue* DtoDynamicCastObject(DValue* val, Type* to);
29
30 DValue* DtoCastInterfaceToObject(DValue* val, Type* to);
31 DValue* DtoDynamicCastInterface(DValue* val, Type* to);
32
33 LLValue* DtoIndexClass(LLValue* src, ClassDeclaration* sd, VarDeclaration* vd);
34
35 LLValue* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl, char* name);
36
37 #endif
Note: See TracBrowser for help on using the browser.
Copyright © 2008, LDC Development Team.