Skip to content

Commit

Permalink
[Refactorign] Consolidate symtab
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Apr 29, 2014
1 parent 5e27669 commit 669e2e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
19 changes: 2 additions & 17 deletions src/class.c
Expand Up @@ -331,16 +331,7 @@ void ClassDeclaration::semantic(Scope *sc)

if (!members) // if opaque declaration
return;

if (symtab)
{
if (sizeok == SIZEOKdone || !scope)
{
//printf("\tsemantic for '%s' is already completed\n", toChars());
return; // semantic() already completed
}
}
else
if (!symtab)
symtab = new DsymbolTable();

// Expand any tuples in baseclasses[]
Expand Down Expand Up @@ -1331,13 +1322,7 @@ void InterfaceDeclaration::semantic(Scope *sc)

if (!members) // if opaque declaration
return;

if (symtab) // if already done
{
if (!scope)
return;
}
else
if (!symtab)
symtab = new DsymbolTable();

// Expand any tuples in baseclasses[]
Expand Down
10 changes: 1 addition & 9 deletions src/struct.c
Expand Up @@ -713,15 +713,7 @@ void StructDeclaration::semantic(Scope *sc)
if (!members) // if opaque declaration
return;

if (symtab)
{
if (sizeok == SIZEOKdone || !scope)
{
//printf("already completed\n");
return; // semantic() already completed
}
}
else
if (!symtab)
symtab = new DsymbolTable();

if (sizeok == SIZEOKnone) // if not already done the addMember step
Expand Down

0 comments on commit 669e2e4

Please sign in to comment.