diff gen/classes.cpp @ 363:4d7495038ae8 trunk

[svn r384] Some minor code cleanups.
author lindquist
date Mon, 14 Jul 2008 21:49:54 +0200
parents 3c5e19bfcbf2
children 7d91d82000ae
line wrap: on
line diff
--- a/gen/classes.cpp	Mon Jul 14 21:03:15 2008 +0200
+++ b/gen/classes.cpp	Mon Jul 14 21:49:54 2008 +0200
@@ -798,16 +798,6 @@
     {
         DValue* res = DtoCallDFunc(newexp->allocator, newexp->newargs);
         mem = DtoBitCast(res->getRVal(), DtoType(tc), "newclass_custom");
-
-//         DtoForceDeclareDsymbol(newexp->allocator);
-//         assert(newexp->newargs);
-//         assert(newexp->newargs->dim == 1);
-// 
-//         llvm::Function* fn = newexp->allocator->ir.irFunc->func;
-//         assert(fn);
-//         DValue* arg = ((Expression*)newexp->newargs->data[0])->toElem(gIR);
-//         mem = gIR->CreateCallOrInvoke(fn, arg->getRVal(), "newclass_custom_alloc")->get();
-//         mem = DtoBitCast(mem, DtoType(tc), "newclass_custom");
     }
     // default allocator
     else
@@ -1089,8 +1079,6 @@
     assert(r != (unsigned)-1 && "Offset not found in any aggregate field");
     // vtable is 0, monitor is 1
     r += 2;
-    // interface offset further
-    //r += vtblInterfaces->dim;
     // the final index was not pushed
     result.push_back(r); 
 }
@@ -1107,7 +1095,6 @@
 
     const LLType* st = DtoType(cd->type);
     if (ptr->getType() != st) {
-        //assert(cd->ir.irStruct->hasUnions);
         ptr = gIR->ir->CreateBitCast(ptr, st, "tmp");
     }
 
@@ -1116,8 +1103,6 @@
 
     IrStruct* irstruct = cd->ir.irStruct;
     for (IrStruct::OffsetMap::iterator i=irstruct->offsets.begin(); i!=irstruct->offsets.end(); ++i) {
-    //for (unsigned i=0; i<cd->fields.dim; ++i) {
-        //VarDeclaration* vd = (VarDeclaration*)cd->fields.data[i];
         VarDeclaration* vd = i->second.var;
         assert(vd);
         Type* vdtype = DtoDType(vd->type);
@@ -1195,9 +1180,6 @@
     Logger::cout() << "funcval casted: " << *funcval << '\n';
 #endif
 
-    //assert(funcval->getType() == DtoType(fdecl->type));
-    //cc = DtoCallingConv(fdecl->linkage);
-
     return funcval;
 }