update fdvm, fixed routine'

This commit is contained in:
ALEXks
2023-11-15 11:13:26 +03:00
parent 5b4071b237
commit 768a280f09
6 changed files with 11 additions and 5 deletions

View File

@@ -882,6 +882,8 @@ static bool filterFromList(SgStatement* st, const set<string>& idents, bool excl
bool empty = false;
SgExpression* list = st->expr(0);
vector<SgExpression*> newList;
int total = 0;
while (list)
{
if (exclude)
@@ -894,12 +896,13 @@ static bool filterFromList(SgStatement* st, const set<string>& idents, bool excl
if (idents.find(list->lhs()->symbol()->identifier()) != idents.end())
newList.push_back(list->lhs());
}
total++;
list = list->rhs();
}
if (newList.size() == 0)
empty = true;
else
else if (total != newList.size())
st->setExpression(0, makeExprList(newList));
return empty;

View File

@@ -2611,7 +2611,7 @@ SgExpression* makeExprList(const vector<SgExpression*>& items, bool withSort)
int tmpVal = 0;
for (auto& elem : items)
{
if (elem->variant() == VAR_REF || elem->variant() == ARRAY_REF)
if (elem->variant() == VAR_REF || elem->variant() == ARRAY_REF || elem->variant() == CONST_REF)
sorted.insert(make_pair(elem->unparse(), elem));
else if (elem->lhs() && elem->lhs()->variant() == VAR_REF || elem->lhs()->variant() == ARRAY_REF)
sorted.insert(make_pair(elem->lhs()->unparse(), elem));

View File

@@ -1,3 +1,3 @@
#pragma once
#define VERSION_SPF "2236"
#define VERSION_SPF "2237"