view gen/classes.h @ 705:5a2983f97498

Fixed weird struct problem from downs, see mini/compile_structs1.d Rewrote DtoIndexStruct/Class , the old implementation were way too complex for what we really need now - since the DotVar changes.
author Tomas Lindquist Olsen <>
date Tue, 14 Oct 2008 15:35:49 +0200
parents eef8ac26c66c
children 79758fd2f48a
line wrap: on
line source

#include "gen/structs.h"

 * Resolves the llvm type for a class declaration
void DtoResolveClass(ClassDeclaration* cd);

 * Provides the llvm declaration for a class declaration
void DtoDeclareClass(ClassDeclaration* cd);

 * Constructs the constant initializer for a class declaration
void DtoConstInitClass(ClassDeclaration* cd);

 * Provides the llvm definition for a class declaration
void DtoDefineClass(ClassDeclaration* cd);

void DtoDeclareClassInfo(ClassDeclaration* cd);
void DtoDefineClassInfo(ClassDeclaration* cd);

DValue* DtoNewClass(Loc loc, TypeClass* type, NewExp* newexp);
void DtoInitClass(TypeClass* tc, LLValue* dst);
DValue* DtoCallClassCtor(TypeClass* type, CtorDeclaration* ctor, Array* arguments, LLValue* mem);
void DtoFinalizeClass(LLValue* inst);

DValue* DtoCastClass(DValue* val, Type* to);
DValue* DtoDynamicCastObject(DValue* val, Type* to);

DValue* DtoCastInterfaceToObject(DValue* val, Type* to);
DValue* DtoDynamicCastInterface(DValue* val, Type* to);

LLValue* DtoIndexClass(LLValue* src, ClassDeclaration* sd, VarDeclaration* vd);

LLValue* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl);