comparison gen/typinf.cpp @ 1358:78038e540342

Fix overload resolution issue in dmd bug 313/314 fix.
author Christian Kamm <kamm incasoftware de>
date Sat, 16 May 2009 12:17:33 +0200
parents 712662f45ee4
children 46f6365a50d7
comparison
equal deleted inserted replaced
1357:48747003a5de 1358:78038e540342
747 747
748 s = search_function(sd, Id::tohash); 748 s = search_function(sd, Id::tohash);
749 fdx = s ? s->isFuncDeclaration() : NULL; 749 fdx = s ? s->isFuncDeclaration() : NULL;
750 if (fdx) 750 if (fdx)
751 { 751 {
752 fd = fdx->overloadExactMatch(tftohash); 752 fd = fdx->overloadExactMatch(tftohash, getModule());
753 if (fd) { 753 if (fd) {
754 fd->codegen(Type::sir); 754 fd->codegen(Type::sir);
755 assert(fd->ir.irFunc->func != 0); 755 assert(fd->ir.irFunc->func != 0);
756 LLConstant* c = isaConstant(fd->ir.irFunc->func); 756 LLConstant* c = isaConstant(fd->ir.irFunc->func);
757 assert(c); 757 assert(c);
773 { 773 {
774 //Logger::println("************** C %d", i); 774 //Logger::println("************** C %d", i);
775 ptty = isaPointer(stype->getElementType(5+i)); 775 ptty = isaPointer(stype->getElementType(5+i));
776 if (fdx) 776 if (fdx)
777 { 777 {
778 fd = fdx->overloadExactMatch(tfeqptr); 778 fd = fdx->overloadExactMatch(tfeqptr, getModule());
779 if (fd) { 779 if (fd) {
780 fd->codegen(Type::sir); 780 fd->codegen(Type::sir);
781 assert(fd->ir.irFunc->func != 0); 781 assert(fd->ir.irFunc->func != 0);
782 LLConstant* c = isaConstant(fd->ir.irFunc->func); 782 LLConstant* c = isaConstant(fd->ir.irFunc->func);
783 assert(c); 783 assert(c);
801 ptty = isaPointer(stype->getElementType(7)); 801 ptty = isaPointer(stype->getElementType(7));
802 s = search_function(sd, Id::tostring); 802 s = search_function(sd, Id::tostring);
803 fdx = s ? s->isFuncDeclaration() : NULL; 803 fdx = s ? s->isFuncDeclaration() : NULL;
804 if (fdx) 804 if (fdx)
805 { 805 {
806 fd = fdx->overloadExactMatch(tftostring); 806 fd = fdx->overloadExactMatch(tftostring, getModule());
807 if (fd) { 807 if (fd) {
808 fd->codegen(Type::sir); 808 fd->codegen(Type::sir);
809 assert(fd->ir.irFunc->func != 0); 809 assert(fd->ir.irFunc->func != 0);
810 LLConstant* c = isaConstant(fd->ir.irFunc->func); 810 LLConstant* c = isaConstant(fd->ir.irFunc->func);
811 assert(c); 811 assert(c);