Skip to content

Commit

Permalink
Delete dead functions 'defineRed' and 'nameCollision'
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Jun 8, 2014
1 parent 053d9da commit 7329081
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 51 deletions.
12 changes: 0 additions & 12 deletions src/class.c
Expand Up @@ -897,18 +897,6 @@ void ClassDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
buf->writenl();
}

#if 0
void ClassDeclaration::defineRef(Dsymbol *s)
{
ClassDeclaration *cd;

AggregateDeclaration::defineRef(s);
cd = s->isClassDeclaration();
baseType = cd->baseType;
cd->baseType = NULL;
}
#endif

/*********************************************
* Determine if 'this' is a base class of cd.
* This is used to detect circular inheritance only.
Expand Down
36 changes: 0 additions & 36 deletions src/dsymbol.c
Expand Up @@ -537,11 +537,6 @@ ClassDeclaration *Dsymbol::isClassMember() // are we a member of a class?
return ad ? ad->isClassDeclaration() : NULL;
}

void Dsymbol::defineRef(Dsymbol *s)
{
assert(0);
}

bool Dsymbol::isExport()
{
return false;
Expand Down Expand Up @@ -1050,15 +1045,6 @@ bool ScopeDsymbol::isforwardRef()
return (members == NULL);
}

void ScopeDsymbol::defineRef(Dsymbol *s)
{
ScopeDsymbol *ss;

ss = s->isScopeDsymbol();
members = ss->members;
ss->members = NULL;
}

void ScopeDsymbol::multiplyDefined(Loc loc, Dsymbol *s1, Dsymbol *s2)
{
#if 0
Expand All @@ -1082,28 +1068,6 @@ void ScopeDsymbol::multiplyDefined(Loc loc, Dsymbol *s1, Dsymbol *s2)
}
}

Dsymbol *ScopeDsymbol::nameCollision(Dsymbol *s)
{
Dsymbol *sprev;

// Look to see if we are defining a forward referenced symbol

sprev = symtab->lookup(s->ident);
assert(sprev);
if (s->equals(sprev)) // if the same symbol
{
if (s->isforwardRef()) // if second declaration is a forward reference
return sprev;
if (sprev->isforwardRef())
{
sprev->defineRef(s); // copy data from s into sprev
return sprev;
}
}
multiplyDefined(Loc(), s, sprev);
return sprev;
}

const char *ScopeDsymbol::kind()
{
return "ScopeDsymbol";
Expand Down
3 changes: 0 additions & 3 deletions src/dsymbol.h
Expand Up @@ -191,7 +191,6 @@ class Dsymbol : public RootObject
virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
virtual unsigned size(Loc loc);
virtual bool isforwardRef();
virtual void defineRef(Dsymbol *s);
virtual AggregateDeclaration *isThis(); // is a 'this' required to access the member
AggregateDeclaration *isAggregateMember(); // are we a member of an aggregate?
AggregateDeclaration *isAggregateMember2(); // are we a member of an aggregate?
Expand Down Expand Up @@ -292,9 +291,7 @@ class ScopeDsymbol : public Dsymbol
Dsymbol *search(Loc loc, Identifier *ident, int flags = IgnoreNone);
void importScope(Dsymbol *s, PROT protection);
bool isforwardRef();
void defineRef(Dsymbol *s);
static void multiplyDefined(Loc loc, Dsymbol *s1, Dsymbol *s2);
Dsymbol *nameCollision(Dsymbol *s);
const char *kind();
FuncDeclaration *findGetMembers();
virtual Dsymbol *symtabInsert(Dsymbol *s);
Expand Down

0 comments on commit 7329081

Please sign in to comment.