Skip to content

Commit

Permalink
Remove dead function isBit
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Dec 21, 2013
1 parent a6e14ed commit 761877b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 61 deletions.
53 changes: 0 additions & 53 deletions src/expression.c
Expand Up @@ -2577,15 +2577,6 @@ int Expression::isBool(int result)
return false;
}

/********************************
* Does this expression result in either a 1 or a 0?
*/

int Expression::isBit()
{
return false;
}

/****************************************
* Resolve __FILE__, __LINE__, __MODULE__, __FUNCTION__, __PRETTY_FUNCTION__ to loc.
*/
Expand Down Expand Up @@ -9620,13 +9611,6 @@ Expression *NotExp::semantic(Scope *sc)
return this;
}

int NotExp::isBit()
{
return true;
}



/************************************************************/

DeleteExp::DeleteExp(Loc loc, Expression *e)
Expand Down Expand Up @@ -13072,12 +13056,6 @@ Expression *OrOrExp::checkToBoolean(Scope *sc)
return this;
}

int OrOrExp::isBit()
{
return true;
}


/************************************************************/

AndAndExp::AndAndExp(Loc loc, Expression *e1, Expression *e2)
Expand Down Expand Up @@ -13136,12 +13114,6 @@ Expression *AndAndExp::checkToBoolean(Scope *sc)
return this;
}

int AndAndExp::isBit()
{
return true;
}


/************************************************************/

InExp::InExp(Loc loc, Expression *e1, Expression *e2)
Expand Down Expand Up @@ -13188,12 +13160,6 @@ Expression *InExp::semantic(Scope *sc)
return this;
}

int InExp::isBit()
{
return false;
}


/************************************************************/

/* This deletes the key e1 from the associative array e2
Expand Down Expand Up @@ -13320,12 +13286,6 @@ Expression *CmpExp::semantic(Scope *sc)
return e;
}

int CmpExp::isBit()
{
return true;
}


/************************************************************/

EqualExp::EqualExp(TOK op, Loc loc, Expression *e1, Expression *e2)
Expand Down Expand Up @@ -13532,13 +13492,6 @@ Expression *EqualExp::semantic(Scope *sc)
return e;
}

int EqualExp::isBit()
{
return true;
}



/************************************************************/

IdentityExp::IdentityExp(TOK op, Loc loc, Expression *e1, Expression *e2)
Expand Down Expand Up @@ -13571,12 +13524,6 @@ Expression *IdentityExp::semantic(Scope *sc)
return this;
}

int IdentityExp::isBit()
{
return true;
}


/****************************************************************/

CondExp::CondExp(Loc loc, Expression *econd, Expression *e1, Expression *e2)
Expand Down
8 changes: 0 additions & 8 deletions src/expression.h
Expand Up @@ -190,7 +190,6 @@ class Expression : public RootObject

virtual int isConst();
virtual int isBool(int result);
virtual int isBit();
bool hasSideEffect();
void discardValue();
void useValue();
Expand Down Expand Up @@ -1169,7 +1168,6 @@ class NotExp : public UnaExp
NotExp(Loc loc, Expression *e);
Expression *semantic(Scope *sc);
Expression *optimize(int result, bool keepLvalue = false);
int isBit();
elem *toElem(IRState *irs);
};

Expand Down Expand Up @@ -1708,7 +1706,6 @@ class OrOrExp : public BinExp
OrOrExp(Loc loc, Expression *e1, Expression *e2);
Expression *semantic(Scope *sc);
Expression *checkToBoolean(Scope *sc);
int isBit();
Expression *optimize(int result, bool keepLvalue = false);
Expression *interpret(InterState *istate, CtfeGoal goal = ctfeNeedRvalue);
elem *toElem(IRState *irs);
Expand All @@ -1720,7 +1717,6 @@ class AndAndExp : public BinExp
AndAndExp(Loc loc, Expression *e1, Expression *e2);
Expression *semantic(Scope *sc);
Expression *checkToBoolean(Scope *sc);
int isBit();
Expression *optimize(int result, bool keepLvalue = false);
Expression *interpret(InterState *istate, CtfeGoal goal = ctfeNeedRvalue);
elem *toElem(IRState *irs);
Expand All @@ -1732,7 +1728,6 @@ class CmpExp : public BinExp
CmpExp(TOK op, Loc loc, Expression *e1, Expression *e2);
Expression *semantic(Scope *sc);
Expression *optimize(int result, bool keepLvalue = false);
int isBit();

// For operator overloading
int isCommutative();
Expand All @@ -1748,7 +1743,6 @@ class InExp : public BinExp
InExp(Loc loc, Expression *e1, Expression *e2);
Expression *semantic(Scope *sc);
Expression *interpret(InterState *istate, CtfeGoal goal = ctfeNeedRvalue);
int isBit();

// For operator overloading
Identifier *opId();
Expand All @@ -1774,7 +1768,6 @@ class EqualExp : public BinExp
EqualExp(TOK op, Loc loc, Expression *e1, Expression *e2);
Expression *semantic(Scope *sc);
Expression *optimize(int result, bool keepLvalue = false);
int isBit();

// For operator overloading
int isCommutative();
Expand All @@ -1791,7 +1784,6 @@ class IdentityExp : public BinExp
public:
IdentityExp(TOK op, Loc loc, Expression *e1, Expression *e2);
Expression *semantic(Scope *sc);
int isBit();
Expression *optimize(int result, bool keepLvalue = false);
elem *toElem(IRState *irs);
};
Expand Down

0 comments on commit 761877b

Please sign in to comment.