[svn r19] * Added support for reassigning 'this' inside class constructors.

* Added preliminary support for UnrolledLoopStatement. That is foreach on a tuple.
This commit is contained in:
Tomas Lindquist Olsen
2007-10-03 04:56:32 +02:00
parent 50d79d4098
commit 766fc30a30
10 changed files with 138 additions and 9 deletions
+13
View File
@@ -665,9 +665,20 @@ void FuncDeclaration::toObjFile()
// function definition
if (allow_fbody && fbody != 0)
{
gIR->funcdecls.push_back(this);
// first make absolutely sure the type is up to date
f->llvmType = llvmValue->getType()->getContainedType(0);
// this handling
if (f->llvmUsesThis) {
if (f->llvmRetInPtr)
llvmThisVar = ++func->arg_begin();
else
llvmThisVar = func->arg_begin();
assert(llvmThisVar != 0);
}
if (isMain())
gIR->emitMain = true;
@@ -716,6 +727,8 @@ void FuncDeclaration::toObjFile()
// possibly assert(lastbb->getNumPredecessors() == 0); ??? try it out sometime ...
new llvm::UnreachableInst(lastbb);
}
gIR->funcdecls.pop_back();
}
}
}