Skip to content

Commit

Permalink
[Refactoring] Make long member function names short
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Apr 15, 2014
1 parent 5327b68 commit 42d3a79
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/expression.c
Expand Up @@ -734,7 +734,7 @@ Expression *searchUFCS(Scope *sc, UnaExp *ue, Identifier *ident)
DotTemplateInstanceExp *dti = (DotTemplateInstanceExp *)ue;
TemplateInstance *ti = new TemplateInstance(loc, s->ident);
ti->tiargs = dti->ti->tiargs; // for better diagnostic message
if (!ti->updateTemplateDeclaration(sc, s))
if (!ti->updateTempDecl(sc, s))
return new ErrorExp();
return new ScopeExp(loc, ti);
}
Expand Down Expand Up @@ -4555,7 +4555,7 @@ Expression *ScopeExp::semantic(Scope *sc)
if (ti)
{
WithScopeSymbol *withsym;
if (!ti->findTemplateDeclaration(sc, &withsym) ||
if (!ti->findTempDecl(sc, &withsym) ||
!ti->semanticTiargs(sc))
{
ti->inst = ti;
Expand Down Expand Up @@ -7545,7 +7545,7 @@ bool DotTemplateInstanceExp::findTempDecl(Scope *sc)
case TOKvar: s = ((VarExp *)e)->var; break;
default: return false;
}
return ti->updateTemplateDeclaration(sc, s);
return ti->updateTempDecl(sc, s);
}

Expression *DotTemplateInstanceExp::semantic(Scope *sc)
Expand Down Expand Up @@ -7930,7 +7930,7 @@ Expression *CallExp::semantic(Scope *sc)
* If not, go with partial explicit specialization.
*/
WithScopeSymbol *withsym;
if (!ti->findTemplateDeclaration(sc, &withsym) ||
if (!ti->findTempDecl(sc, &withsym) ||
!ti->semanticTiargs(sc))
{
ti->inst = ti;
Expand Down
14 changes: 7 additions & 7 deletions src/template.c
Expand Up @@ -5714,7 +5714,7 @@ void TemplateInstance::semantic(Scope *sc, Expressions *fargs)
* then run semantic on each argument (place results in tiargs[]),
* last find most specialized template from overload list/set.
*/
if (!findTemplateDeclaration(sc, NULL) ||
if (!findTempDecl(sc, NULL) ||
!semanticTiargs(sc) ||
!findBestMatch(sc, fargs))
{
Expand Down Expand Up @@ -6164,15 +6164,15 @@ void TemplateInstance::semantic(Scope *sc, Expressions *fargs)
* Find template declaration corresponding to template instance.
*/

bool TemplateInstance::findTemplateDeclaration(Scope *sc, WithScopeSymbol **pwithsym)
bool TemplateInstance::findTempDecl(Scope *sc, WithScopeSymbol **pwithsym)
{
if (pwithsym)
*pwithsym = NULL;

if (havetempdecl)
return true;

//printf("TemplateInstance::findTemplateDeclaration() %s\n", toChars());
//printf("TemplateInstance::findTempDecl() %s\n", toChars());
if (!tempdecl)
{
/* Given:
Expand Down Expand Up @@ -6221,7 +6221,7 @@ bool TemplateInstance::findTemplateDeclaration(Scope *sc, WithScopeSymbol **pwit
}
}

if (!updateTemplateDeclaration(sc, s))
if (!updateTempDecl(sc, s))
{
return false;
}
Expand Down Expand Up @@ -6269,7 +6269,7 @@ bool TemplateInstance::findTemplateDeclaration(Scope *sc, WithScopeSymbol **pwit
* Confirm s is a valid template, then store it.
*/

bool TemplateInstance::updateTemplateDeclaration(Scope *sc, Dsymbol *s)
bool TemplateInstance::updateTempDecl(Scope *sc, Dsymbol *s)
{
if (s)
{
Expand Down Expand Up @@ -7650,7 +7650,7 @@ Dsymbol *TemplateMixin::syntaxCopy(Dsymbol *s)
return tm;
}

bool TemplateMixin::findTemplateDeclaration(Scope *sc)
bool TemplateMixin::findTempDecl(Scope *sc)
{
// Follow qualifications to find the TemplateDeclaration
if (!tempdecl)
Expand Down Expand Up @@ -7770,7 +7770,7 @@ void TemplateMixin::semantic(Scope *sc)
/* Run semantic on each argument, place results in tiargs[],
* then find best match template with tiargs
*/
if (!findTemplateDeclaration(sc) ||
if (!findTempDecl(sc) ||
!semanticTiargs(sc) ||
!findBestMatch(sc, NULL))
{
Expand Down
6 changes: 3 additions & 3 deletions src/template.h
Expand Up @@ -347,8 +347,8 @@ class TemplateInstance : public ScopeDsymbol
void toObjFile(bool multiobj); // compile to .obj file

// Internal
bool findTemplateDeclaration(Scope *sc, WithScopeSymbol **pwithsym);
bool updateTemplateDeclaration(Scope *sc, Dsymbol *s);
bool findTempDecl(Scope *sc, WithScopeSymbol **pwithsym);
bool updateTempDecl(Scope *sc, Dsymbol *s);
static bool semanticTiargs(Loc loc, Scope *sc, Objects *tiargs, int flags);
bool semanticTiargs(Scope *sc);
bool findBestMatch(Scope *sc, Expressions *fargs);
Expand Down Expand Up @@ -385,7 +385,7 @@ class TemplateMixin : public TemplateInstance

void toObjFile(bool multiobj); // compile to .obj file

bool findTemplateDeclaration(Scope *sc);
bool findTempDecl(Scope *sc);

TemplateMixin *isTemplateMixin() { return this; }
void accept(Visitor *v) { v->visit(this); }
Expand Down

0 comments on commit 42d3a79

Please sign in to comment.