comparison gen/nested.cpp @ 1467:630fc54f7c1e

Fix a bug in DtoNestedInit and update an unrelated comment.
author Frits van Bommel <fvbommel wxs.nl>
date Wed, 03 Jun 2009 12:32:35 +0200
parents 15e9762bb620
children 755abafbf25d
comparison
equal deleted inserted replaced
1466:8bf5fa175555 1467:630fc54f7c1e
190 val = nestedVar; 190 val = nestedVar;
191 } else { 191 } else {
192 FuncDeclaration *parentfunc = getParentFunc(vd, true); 192 FuncDeclaration *parentfunc = getParentFunc(vd, true);
193 assert(parentfunc && "No parent function for nested variable?"); 193 assert(parentfunc && "No parent function for nested variable?");
194 194
195 val = DtoGEPi(val, 0, vardepth); 195 val = DtoGEPi(nestedVar, 0, vardepth);
196 val = DtoAlignedLoad(val, (std::string(".frame.") + parentfunc->toChars()).c_str()); 196 val = DtoAlignedLoad(val, (std::string(".frame.") + parentfunc->toChars()).c_str());
197 } 197 }
198 val = DtoGEPi(val, 0, vd->ir.irLocal->nestedIndex, vd->toChars()); 198 val = DtoGEPi(val, 0, vd->ir.irLocal->nestedIndex, vd->toChars());
199 DtoAlignedStore(vd->ir.irLocal->value, val); 199 DtoAlignedStore(vd->ir.irLocal->value, val);
200 } else { 200 } else {