[svn r117] Initial working implementation of interfaces.

Groundwork for all the different types of class/interface casts laid out.
This commit is contained in:
Tomas Lindquist Olsen
2007-11-24 06:33:00 +01:00
parent 0a8ff5931a
commit b43f5729b0
18 changed files with 867 additions and 145 deletions

View File

@@ -192,7 +192,7 @@ const llvm::FunctionType* DtoFunctionType(FuncDeclaration* fdecl)
if (AggregateDeclaration* ad = fdecl->isMember()) {
Logger::print("isMember = this is: %s\n", ad->type->toChars());
thisty = DtoType(ad->type);
Logger::cout() << "this llvm type: " << *thisty << '\n';
//Logger::cout() << "this llvm type: " << *thisty << '\n';
if (isaStruct(thisty) || (!gIR->structs.empty() && thisty == gIR->topstruct()->recty.get()))
thisty = llvm::PointerType::get(thisty);
}
@@ -277,7 +277,8 @@ void DtoResolveFunction(FuncDeclaration* fdecl)
DtoFunctionType(fdecl);
// queue declaration
gIR->declareList.push_back(fdecl);
if (!fdecl->isAbstract())
gIR->declareList.push_back(fdecl);
}
//////////////////////////////////////////////////////////////////////////////////////////
@@ -290,6 +291,8 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
Logger::println("DtoDeclareFunction(%s)", fdecl->toPrettyChars());
LOG_SCOPE;
assert(!fdecl->isAbstract());
if (fdecl->llvmRunTimeHack) {
Logger::println("runtime hack func chars: %s", fdecl->toChars());
if (!fdecl->llvmValue)