Skip to content

Commit

Permalink
Move Dsymbol::inlineScan into inline.c
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Feb 1, 2014
1 parent b17cf7d commit 7677d8b
Show file tree
Hide file tree
Showing 17 changed files with 143 additions and 166 deletions.
1 change: 0 additions & 1 deletion src/aggregate.h
Expand Up @@ -92,7 +92,6 @@ class AggregateDeclaration : public ScopeDsymbol
void setScope(Scope *sc);
void semantic2(Scope *sc);
void semantic3(Scope *sc);
void inlineScan();
unsigned size(Loc loc);
static void alignmember(structalign_t salign, unsigned size, unsigned *poffset);
static unsigned placeField(unsigned *nextoffset,
Expand Down
14 changes: 0 additions & 14 deletions src/attrib.c
Expand Up @@ -190,20 +190,6 @@ void AttribDeclaration::semantic3(Scope *sc)
}
}

void AttribDeclaration::inlineScan()
{
Dsymbols *d = include(NULL, NULL);

if (d)
{
for (size_t i = 0; i < d->dim; i++)
{ Dsymbol *s = (*d)[i];
//printf("AttribDeclaration::inlineScan %s\n", s->toChars());
s->inlineScan();
}
}
}

void AttribDeclaration::addComment(const utf8_t *comment)
{
//printf("AttribDeclaration::addComment %s\n", comment);
Expand Down
1 change: 0 additions & 1 deletion src/attrib.h
Expand Up @@ -45,7 +45,6 @@ class AttribDeclaration : public Dsymbol
void semantic(Scope *sc);
void semantic2(Scope *sc);
void semantic3(Scope *sc);
void inlineScan();
void addComment(const utf8_t *comment);
void emitComment(Scope *sc);
const char *kind();
Expand Down
4 changes: 0 additions & 4 deletions src/declaration.h
Expand Up @@ -24,7 +24,6 @@ class Statement;
class LabelDsymbol;
class Initializer;
class Module;
struct InlineScanState;
class ForeachStatement;
class FuncDeclaration;
class ExpInitializer;
Expand Down Expand Up @@ -698,9 +697,7 @@ class FuncDeclaration : public Declaration
virtual bool addPostInvariant();
Expression *interpret(InterState *istate, Expressions *arguments, Expression *thisexp = NULL);
void ctfeCompile();
void inlineScan();
int canInline(int hasthis, int hdrscan, int statementsToo);
Expression *expandInline(InlineScanState *iss, Expression *eret, Expression *ethis, Expressions *arguments, Statement **ps);
const char *kind();
void toDocBuffer(OutBuffer *buf, Scope *sc);
FuncDeclaration *isUnique();
Expand Down Expand Up @@ -913,7 +910,6 @@ class UnitTestDeclaration : public FuncDeclaration
bool addPreInvariant();
bool addPostInvariant();
void emitComment(Scope *sc);
void inlineScan();
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);

UnitTestDeclaration *isUnitTestDeclaration() { return this; }
Expand Down
9 changes: 0 additions & 9 deletions src/dsymbol.c
Expand Up @@ -383,15 +383,6 @@ void Dsymbol::semantic3(Scope *sc)
// Most Dsymbols have no further semantic analysis needed
}

/*************************************
* Look for function inlining possibilities.
*/

void Dsymbol::inlineScan()
{
// Most Dsymbols aren't functions
}

/*********************************************
* Search for ident as member of s.
* Input:
Expand Down
1 change: 0 additions & 1 deletion src/dsymbol.h
Expand Up @@ -178,7 +178,6 @@ class Dsymbol : public RootObject
virtual void semantic(Scope *sc);
virtual void semantic2(Scope *sc);
virtual void semantic3(Scope *sc);
virtual void inlineScan();
virtual Dsymbol *search(Loc loc, Identifier *ident, int flags = IgnoreNone);
Dsymbol *search_correct(Identifier *id);
Dsymbol *searchX(Loc loc, Scope *sc, RootObject *id);
Expand Down
1 change: 0 additions & 1 deletion src/expression.h
Expand Up @@ -33,7 +33,6 @@ class Import;
class Module;
class ScopeDsymbol;
struct InlineDoState;
struct InlineScanState;
class Expression;
class Declaration;
class AggregateDeclaration;
Expand Down

0 comments on commit 7677d8b

Please sign in to comment.