[svn r257] Fixed: array .sort and .reverse runtime code was incorrect.

Fixed: most runtime calls did not get correct param attrs.
This commit is contained in:
Tomas Lindquist Olsen
2008-06-09 00:01:10 +02:00
parent 306ebfca83
commit 4a2d8494a6
4 changed files with 153 additions and 88 deletions

View File

@@ -1200,6 +1200,11 @@ DValue* CallExp::toElem(IRState* p)
// this hack is necessary :/
if (dfn && dfn->func && dfn->func->runTimeHack) {
llvm::Function* fn = dfn->func->ir.irFunc->func;
assert(fn);
if (fn->getParamAttrs().paramHasAttr(j+1, llvm::ParamAttr::ByVal))
palist = palist.addAttr(j+1, llvm::ParamAttr::ByVal);
if (llfnty->getParamType(j) != NULL) {
if (llargs[j]->getType() != llfnty->getParamType(j)) {
Logger::println("llvmRunTimeHack==true - force casting argument");