Lines Matching refs:cd

258     ClassDeclaration *cd =
262 cd->storage_class |= storage_class;
264 cd->baseclasses->setDim(this->baseclasses->dim);
265 for (size_t i = 0; i < cd->baseclasses->dim; i++)
269 (*cd->baseclasses)[i] = b2;
272 return ScopeDsymbol::syntaxCopy(cd);
300 static Type *resolveBase(ClassDeclaration *cd, Scope *sc, Scope *&scx, Type *type)
307 cd->_scope = scx;
308 Type *t = type->semantic(cd->loc, sc);
309 cd->_scope = NULL;
313 static void resolveBase(ClassDeclaration *cd, Scope *sc, Scope *&scx, ClassDeclaration *sym)
320 cd->_scope = scx;
322 cd->_scope = NULL;
325 static void badObjectDotD(ClassDeclaration *cd)
327 cd->error("missing or corrupt object.d");
850 ClassDeclaration *cd = ((TypeClass *)type)->sym;
851 error("already exists at %s. Perhaps in another function with the same name?", cd->loc.toChars());
887 * Determine if 'this' is a base class of cd.
891 bool ClassDeclaration::isBaseOf2(ClassDeclaration *cd)
893 if (!cd)
895 //printf("ClassDeclaration::isBaseOf2(this = '%s', cd = '%s')\n", toChars(), cd->toChars());
896 for (size_t i = 0; i < cd->baseclasses->dim; i++)
898 BaseClass *b = (*cd->baseclasses)[i];
906 * Determine if 'this' is a base class of cd.
909 bool ClassDeclaration::isBaseOf(ClassDeclaration *cd, int *poffset)
911 //printf("ClassDeclaration::isBaseOf(this = '%s', cd = '%s')\n", toChars(), cd->toChars());
914 while (cd)
916 /* cd->baseClass might not be set if cd is forward referenced.
918 if (!cd->baseClass && cd->semanticRun < PASSsemanticdone && !cd->isInterfaceDeclaration())
920 cd->semantic(NULL);
921 if (!cd->baseClass && cd->semanticRun < PASSsemanticdone)
922 cd->error("base class is forward referenced by %s", toChars());
925 if (this == cd->baseClass)
928 cd = cd->baseClass;
1033 * cd = interface to look at
1034 * baseOffset = offset of where cd will be placed
1036 * subset of instantiated size used by cd for interfaces
1038 static unsigned membersPlace(BaseClasses *vtblInterfaces, size_t &bi, ClassDeclaration *cd, unsigned baseOffset)
1040 //printf(" membersPlace(%s, %d)\n", cd->toChars(), baseOffset);
1043 for (size_t i = 0; i < cd->interfaces.length; i++)
1045 BaseClass *b = cd->interfaces.ptr[i];
1052 cd->alignmember(b->sym->alignsize, b->sym->alignsize, &offset);
1071 if (cd->alignsize < b->sym->alignsize)
1072 cd->alignsize = b->sym->alignsize;
1197 ClassDeclaration *cd = this;
1198 Dsymbols *vtbl = &cd->vtbl;
1261 if (!cd)
1263 vtbl = &cd->vtblFinal;
1264 cd = cd->baseClass;
1728 * Determine if 'this' is a base class of cd.
1729 * (Actually, if it is an interface supported by cd)
1738 bool InterfaceDeclaration::isBaseOf(ClassDeclaration *cd, int *poffset)
1740 //printf("%s.InterfaceDeclaration::isBaseOf(cd = '%s')\n", toChars(), cd->toChars());
1742 for (size_t j = 0; j < cd->interfaces.length; j++)
1744 BaseClass *b = cd->interfaces.ptr[j];
1753 *poffset = cd->sizeok == SIZEOKdone ? b->offset : OFFSET_FWDREF;
1762 if (cd->baseClass && isBaseOf(cd->baseClass, poffset))
1854 * Fill in vtbl[] for base class based on member functions of class cd.
1858 * of cd, not members of any base classes of cd.
1860 * true if any entries were filled in by members of cd (not exclusively
1864 bool BaseClass::fillVtbl(ClassDeclaration *cd, FuncDeclarations *vtbl, int newinstance)
1868 //printf("BaseClass::fillVtbl(this='%s', cd='%s')\n", sym->toChars(), cd->toChars());
1884 fd = cd->findFunc(ifd->ident, tf);
1895 if (newinstance && fd->toParent() != cd && ifd->toParent() == sym)
1896 cd->error("interface function '%s' is not implemented", ifd->toFullSignature());
1898 if (fd->toParent() == cd)
1905 if (!cd->isAbstract())
1906 cd->error("interface function '%s' is not implemented", ifd->toFullSignature());