comparison gen/llvmhelpers.cpp @ 363:4d7495038ae8 trunk

[svn r384] Some minor code cleanups.
author lindquist
date Mon, 14 Jul 2008 21:49:54 +0200
parents 926f65e39246
children bfb9d28f045a
comparison
equal deleted inserted replaced
362:faa03bf92f0d 363:4d7495038ae8
379 v = DtoGEPi(v, 0,0, "tmp"); 379 v = DtoGEPi(v, 0,0, "tmp");
380 v = DtoLoad(v); 380 v = DtoLoad(v);
381 } 381 }
382 else if (ClassDeclaration* cd = fd->toParent2()->isClassDeclaration()) 382 else if (ClassDeclaration* cd = fd->toParent2()->isClassDeclaration())
383 { 383 {
384 size_t idx = 2; 384 v = DtoGEPi(v,0,2,"tmp");
385 //idx += cd->ir.irStruct->interfaceVec.size();
386 v = DtoGEPi(v,0,idx,"tmp");
387 v = DtoLoad(v); 385 v = DtoLoad(v);
388 } 386 }
389 else 387 else
390 { 388 {
391 assert(0); 389 assert(0);
393 return get_frame_ptr_impl(func, fd->toParent2(), v); 391 return get_frame_ptr_impl(func, fd->toParent2(), v);
394 } 392 }
395 else if (ClassDeclaration* cd = sc->isClassDeclaration()) 393 else if (ClassDeclaration* cd = sc->isClassDeclaration())
396 { 394 {
397 Logger::println("scope is class: %s", cd->toChars()); 395 Logger::println("scope is class: %s", cd->toChars());
398 /*size_t idx = 2;
399 idx += cd->llvmIrStruct->interfaces.size();
400 v = DtoGEPi(v,0,idx,"tmp");
401 Logger::cout() << "gep = " << *v << '\n';
402 v = DtoLoad(v);*/
403 return get_frame_ptr_impl(func, cd->toParent2(), v); 396 return get_frame_ptr_impl(func, cd->toParent2(), v);
404 } 397 }
405 else 398 else
406 { 399 {
407 Logger::println("symbol: '%s'", sc->toPrettyChars()); 400 Logger::println("symbol: '%s'", sc->toPrettyChars());