|
|
|
|
@@ -800,20 +800,47 @@ static void fillInOut(FuncInfo *currF, SgStatement *start, SgStatement *last, co
|
|
|
|
|
|
|
|
|
|
static map<string, vector<int>> supportedKeyWordArg = { {"system_clock", { OUT_BIT, OUT_BIT, OUT_BIT } } };
|
|
|
|
|
|
|
|
|
|
map<string, int> parNames;
|
|
|
|
|
map<string, int> parNamesMain;
|
|
|
|
|
map<string, int> parNamesContains;
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < currF->funcParams.identificators.size(); ++i)
|
|
|
|
|
parNames[currF->funcParams.identificators[i]] = i;
|
|
|
|
|
parNamesMain[currF->funcParams.identificators[i]] = i;
|
|
|
|
|
|
|
|
|
|
map<string, int>& parNames = parNamesMain;
|
|
|
|
|
|
|
|
|
|
bool isContainsFunctions = false;
|
|
|
|
|
for (auto st = start; st != last; st = st->lexNext())
|
|
|
|
|
{
|
|
|
|
|
if (st->variant() == CONTAINS_STMT)
|
|
|
|
|
break;
|
|
|
|
|
if (st->variant() == CONTAINS_STMT) {
|
|
|
|
|
isContainsFunctions = true;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isContainsFunctions) {
|
|
|
|
|
if (st->variant() == PROC_HEDR || st->variant() == FUNC_HEDR) {
|
|
|
|
|
parNamesContains = parNamesMain;
|
|
|
|
|
|
|
|
|
|
SgProgHedrStmt* hedr = (SgProgHedrStmt*)st;
|
|
|
|
|
|
|
|
|
|
int numOfParams = hedr->numberOfParameters();
|
|
|
|
|
if (numOfParams > 0)
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < numOfParams; ++i)
|
|
|
|
|
{
|
|
|
|
|
auto it = parNamesContains.find(hedr->parameter(i)->identifier());
|
|
|
|
|
if (it != parNamesContains.end())
|
|
|
|
|
parNamesContains.erase(it);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
parNames = parNamesContains;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (st->variant() == ENTRY_STAT)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (isSgExecutableStatement(st) == NULL) {
|
|
|
|
|
if (!isContainsFunctions)
|
|
|
|
|
checkInTypeDescription(st->expr(0), currF, parNames);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
@@ -821,8 +848,10 @@ static void fillInOut(FuncInfo *currF, SgStatement *start, SgStatement *last, co
|
|
|
|
|
if (st->lineNumber() <= 0)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (activeOps.size() && activeOps.find(st) == activeOps.end())
|
|
|
|
|
continue;
|
|
|
|
|
//XXX: use parameters removing in block ... isContainsFunctions ...
|
|
|
|
|
//TODO need to use IR for parameters checking
|
|
|
|
|
/*if (activeOps.size() && activeOps.find(st) == activeOps.end())
|
|
|
|
|
continue; */
|
|
|
|
|
|
|
|
|
|
if (st->variant() == ASSIGN_STAT)
|
|
|
|
|
{
|
|
|
|
|
|