comparison gen/typinf.cpp @ 110:e8da7856a260 trunk

[svn r114] Implemented the ClassInfo.offTi member.
author lindquist
date Thu, 22 Nov 2007 21:01:01 +0100
parents 5ab8e92611f9
children 27b9f749d9fe
comparison
equal deleted inserted replaced
109:5ab8e92611f9 110:e8da7856a260
817 sinits.push_back(base->llvmVtbl); 817 sinits.push_back(base->llvmVtbl);
818 818
819 // char[] name 819 // char[] name
820 char *name = sd->toPrettyChars(); 820 char *name = sd->toPrettyChars();
821 sinits.push_back(DtoConstString(name)); 821 sinits.push_back(DtoConstString(name));
822 Logger::println("************** A"); 822 //Logger::println("************** A");
823 assert(sinits.back()->getType() == stype->getElementType(1)); 823 assert(sinits.back()->getType() == stype->getElementType(1));
824 824
825 // void[] init 825 // void[] init
826 const llvm::PointerType* initpt = llvm::PointerType::get(llvm::Type::Int8Ty); 826 const llvm::PointerType* initpt = llvm::PointerType::get(llvm::Type::Int8Ty);
827 if (sd->zeroInit) // 0 initializer, or the same as the base type 827 if (sd->zeroInit) // 0 initializer, or the same as the base type
879 tfeq = new TypeFunction(arguments, Type::tint32, 0, LINKd); 879 tfeq = new TypeFunction(arguments, Type::tint32, 0, LINKd);
880 tfeq = (TypeFunction *)tfeq->semantic(0, &sc); 880 tfeq = (TypeFunction *)tfeq->semantic(0, &sc);
881 } 881 }
882 #endif 882 #endif
883 883
884 Logger::println("************** B"); 884 //Logger::println("************** B");
885 const llvm::PointerType* ptty = isaPointer(stype->getElementType(3)); 885 const llvm::PointerType* ptty = isaPointer(stype->getElementType(3));
886 886
887 s = search_function(sd, Id::tohash); 887 s = search_function(sd, Id::tohash);
888 fdx = s ? s->isFuncDeclaration() : NULL; 888 fdx = s ? s->isFuncDeclaration() : NULL;
889 if (fdx) 889 if (fdx)
907 907
908 s = search_function(sd, Id::eq); 908 s = search_function(sd, Id::eq);
909 fdx = s ? s->isFuncDeclaration() : NULL; 909 fdx = s ? s->isFuncDeclaration() : NULL;
910 for (int i = 0; i < 2; i++) 910 for (int i = 0; i < 2; i++)
911 { 911 {
912 Logger::println("************** C %d", i); 912 //Logger::println("************** C %d", i);
913 ptty = isaPointer(stype->getElementType(4+i)); 913 ptty = isaPointer(stype->getElementType(4+i));
914 if (fdx) 914 if (fdx)
915 { 915 {
916 fd = fdx->overloadExactMatch(tfeqptr); 916 fd = fdx->overloadExactMatch(tfeqptr);
917 if (fd) { 917 if (fd) {
932 932
933 s = search_function(sd, Id::cmp); 933 s = search_function(sd, Id::cmp);
934 fdx = s ? s->isFuncDeclaration() : NULL; 934 fdx = s ? s->isFuncDeclaration() : NULL;
935 } 935 }
936 936
937 Logger::println("************** D"); 937 //Logger::println("************** D");
938 ptty = isaPointer(stype->getElementType(6)); 938 ptty = isaPointer(stype->getElementType(6));
939 s = search_function(sd, Id::tostring); 939 s = search_function(sd, Id::tostring);
940 fdx = s ? s->isFuncDeclaration() : NULL; 940 fdx = s ? s->isFuncDeclaration() : NULL;
941 if (fdx) 941 if (fdx)
942 { 942 {