summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-09-26 22:30:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-09-28 08:12:14 +0200
commitb085d55e5546c94d4e6e0f8cb6ff6d9f28c9d2e6 (patch)
treebe640ea45c69ab836aa51a084368b20f09c9bc9a /idlc
parentcb31ea6981a336c16bc29ef2f0d323da9fb2dda4 (diff)
Remove redundant AstExpression::eval_internal
Change-Id: I27c067adb2b09ad65a8449f2d88a9cdde149d4be
Diffstat (limited to 'idlc')
-rw-r--r--idlc/inc/idlc/astexpression.hxx2
-rw-r--r--idlc/source/astexpression.cxx21
2 files changed, 8 insertions, 15 deletions
diff --git a/idlc/inc/idlc/astexpression.hxx b/idlc/inc/idlc/astexpression.hxx
index 32364fabac02..1bd6f96d6ec6 100644
--- a/idlc/inc/idlc/astexpression.hxx
+++ b/idlc/inc/idlc/astexpression.hxx
@@ -121,8 +121,6 @@ public:
private:
// Fill out the lineno, filename and definition scope details
void fillDefinitionDetails();
- // Internal evaluation
- void eval_internal();
// Evaluate different sets of operators
AstExprValue* eval_bin_op();
AstExprValue* eval_bit_op();
diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx
index 9e0469ae5d57..c796ed530303 100644
--- a/idlc/source/astexpression.cxx
+++ b/idlc/source/astexpression.cxx
@@ -700,7 +700,7 @@ AstExprValue* AstExpression::coerce(ExprType t)
* First, evaluate it, then try to coerce result type
* If already evaluated, return the result
*/
- eval_internal();
+ evaluate();
if (m_exprValue == NULL)
return NULL;
@@ -758,11 +758,6 @@ AstExprValue* AstExpression::coerce(ExprType t)
return copy;
}
-void AstExpression::evaluate()
-{
- eval_internal();
-}
-
bool AstExpression::operator==(AstExpression *pExpr)
{
bool bRet = false;
@@ -873,7 +868,7 @@ void AstExpression::fillDefinitionDetails()
m_fileName = idlc()->getFileName();
}
-void AstExpression::eval_internal()
+void AstExpression::evaluate()
{
/*
* Already evaluated?
@@ -921,13 +916,13 @@ AstExprValue* AstExpression::eval_bin_op()
if (m_subExpr1 == NULL || m_subExpr2 == NULL)
return NULL;
- m_subExpr1->eval_internal();
+ m_subExpr1->evaluate();
if (m_subExpr1->getExprValue() == NULL)
return NULL;
m_subExpr1->setExprValue(m_subExpr1->coerce(eType));
if (m_subExpr1->getExprValue() == NULL)
return NULL;
- m_subExpr2->eval_internal();
+ m_subExpr2->evaluate();
if (m_subExpr2->getExprValue() == NULL)
return NULL;
m_subExpr2->setExprValue(m_subExpr2->coerce(eType));
@@ -969,13 +964,13 @@ AstExprValue* AstExpression::eval_bit_op()
{
if (m_subExpr1 == NULL || m_subExpr2 == NULL)
return NULL;
- m_subExpr1->eval_internal();
+ m_subExpr1->evaluate();
if (m_subExpr1->getExprValue() == NULL)
return NULL;
m_subExpr1->setExprValue(m_subExpr1->coerce(ET_long));
if (m_subExpr1->getExprValue() == NULL)
return NULL;
- m_subExpr2->eval_internal();
+ m_subExpr2->evaluate();
if (m_subExpr2->getExprValue() == NULL)
return NULL;
m_subExpr2->setExprValue(m_subExpr2->coerce(ET_long));
@@ -1016,7 +1011,7 @@ AstExprValue* AstExpression::eval_un_op()
if (m_subExpr1 == NULL)
return NULL;
- m_subExpr1->eval_internal();
+ m_subExpr1->evaluate();
if (m_subExpr1->getExprValue() == NULL)
return NULL;
m_subExpr1->setExprValue(m_subExpr1->coerce(ET_double));
@@ -1097,7 +1092,7 @@ AstExprValue* AstExpression::eval_symbol()
* OK, now evaluate the constant we just got, to produce its value
*/
pConst = static_cast< AstConstant* >(pDecl);
- pConst->getConstValue()->eval_internal();
+ pConst->getConstValue()->evaluate();
return pConst->getConstValue()->getExprValue();
}