fixed expression calculation, fixed addArg
This commit is contained in:
Submodule projects/dvm updated: 3a567d7582...37910dba0a
@@ -440,15 +440,18 @@ bool replaceConstantRec(SgExpression *&exp)
|
|||||||
if (exp->variant() == CONST_REF)
|
if (exp->variant() == CONST_REF)
|
||||||
{
|
{
|
||||||
SgExpression *ret = ReplaceParameter_(exp);
|
SgExpression *ret = ReplaceParameter_(exp);
|
||||||
|
|
||||||
int sign = 1;
|
int sign = 1;
|
||||||
SgExpression* toCalc = ret;
|
SgExpression* toCalc = ret;
|
||||||
if (ret->variant() == UNARY_ADD_OP)
|
if (toCalc->variant() == UNARY_ADD_OP)
|
||||||
toCalc = ret->lhs();
|
toCalc = toCalc->lhs();
|
||||||
if (ret->variant() == MINUS_OP)
|
|
||||||
|
if (toCalc->variant() == MINUS_OP)
|
||||||
{
|
{
|
||||||
toCalc = ret->lhs();
|
toCalc = toCalc->lhs();
|
||||||
sign = -1;
|
sign = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toCalc->isInteger())
|
if (toCalc->isInteger())
|
||||||
{
|
{
|
||||||
exp = new SgValueExp(sign * toCalc->valueInteger());
|
exp = new SgValueExp(sign * toCalc->valueInteger());
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION_SPF "2440"
|
#define VERSION_SPF "2441"
|
||||||
|
|||||||
Reference in New Issue
Block a user