Mercurial > projects > ldc
comparison gen/classes.cpp @ 201:8f9191180c7a trunk
[svn r217] Updated: the rebuild profiles.
Fixed: way to find class data fields was too strict type wise.
Fixed: foreach resulting in an implicit delegate could fail.
author | lindquist |
---|---|
date | Mon, 12 May 2008 22:44:25 +0200 |
parents | ba47ac346ddd |
children | 9d44ec83acd1 |
comparison
equal
deleted
inserted
replaced
200:e937752e4541 | 201:8f9191180c7a |
---|---|
1151 VarDeclaration* vd = i->second.var; | 1151 VarDeclaration* vd = i->second.var; |
1152 assert(vd); | 1152 assert(vd); |
1153 Type* vdtype = DtoDType(vd->type); | 1153 Type* vdtype = DtoDType(vd->type); |
1154 //Logger::println("found %u type %s", vd->offset, vdtype->toChars()); | 1154 //Logger::println("found %u type %s", vd->offset, vdtype->toChars()); |
1155 assert(vd->ir.irField->index >= 0); | 1155 assert(vd->ir.irField->index >= 0); |
1156 if (os == vd->offset && vdtype == t) { | 1156 if (os == vd->offset && vdtype->toBasetype() == t->toBasetype()) { |
1157 Logger::println("found %s %s", vdtype->toChars(), vd->toChars()); | 1157 Logger::println("found %s %s", vdtype->toChars(), vd->toChars()); |
1158 idxs.push_back(vd->ir.irField->index + dataoffset); | 1158 idxs.push_back(vd->ir.irField->index + dataoffset); |
1159 //Logger::cout() << "indexing: " << *ptr << '\n'; | 1159 //Logger::cout() << "indexing: " << *ptr << '\n'; |
1160 ptr = DtoGEP(ptr, idxs, "tmp"); | 1160 ptr = DtoGEP(ptr, idxs, "tmp"); |
1161 if (ptr->getType() != llt) | 1161 if (ptr->getType() != llt) |