comparison gen/tocall.cpp @ 1463:a5526b7a5ae6

D2: Applied function type from D1 frontend that got removed in D2, it's critical for member function type to be correct. Fixed a bunch of type discrepancies in druntime object.di vs. genobj.d . Disabled (#if 0) some potentally very large type dumps for -vv . Updated classinfo and typeinfo generation for D2, almost complete now. Added finer grained checks for vtbl type mismatching, aids debugging.
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Wed, 03 Jun 2009 02:28:48 +0200
parents fe151804995a
children ad7f2f1862d6
comparison
equal deleted inserted replaced
1462:f0423003caa6 1463:a5526b7a5ae6
430 { 430 {
431 Argument* fnarg = Argument::getNth(tf->parameters, i); 431 Argument* fnarg = Argument::getNth(tf->parameters, i);
432 assert(fnarg); 432 assert(fnarg);
433 DValue* argval = DtoArgument(fnarg, (Expression*)arguments->data[i]); 433 DValue* argval = DtoArgument(fnarg, (Expression*)arguments->data[i]);
434 434
435 #if 0
435 if (Logger::enabled()) { 436 if (Logger::enabled()) {
436 Logger::cout() << "Argument before ABI: " << *argval->getRVal() << '\n'; 437 Logger::cout() << "Argument before ABI: " << *argval->getRVal() << '\n';
437 Logger::cout() << "Argument type before ABI: " << *DtoType(argval->getType()) << '\n'; 438 Logger::cout() << "Argument type before ABI: " << *DtoType(argval->getType()) << '\n';
438 } 439 }
440 #endif
439 441
440 // give the ABI a say 442 // give the ABI a say
441 LLValue* arg = tf->fty.putParam(argval->getType(), i, argval); 443 LLValue* arg = tf->fty.putParam(argval->getType(), i, argval);
442 444
445 #if 0
443 if (Logger::enabled()) { 446 if (Logger::enabled()) {
444 Logger::cout() << "Argument after ABI: " << *arg << '\n'; 447 Logger::cout() << "Argument after ABI: " << *arg << '\n';
445 Logger::cout() << "Argument type after ABI: " << *arg->getType() << '\n'; 448 Logger::cout() << "Argument type after ABI: " << *arg->getType() << '\n';
446 } 449 }
450 #endif
447 451
448 int j = tf->fty.reverseParams ? beg + n - i - 1 : beg + i; 452 int j = tf->fty.reverseParams ? beg + n - i - 1 : beg + i;
449 453
450 // Hack around LDC assuming structs are in memory: 454 // Hack around LDC assuming structs are in memory:
451 // If the function wants a struct, and the argument value is a 455 // If the function wants a struct, and the argument value is a