Compare commits
1 Commits
egormayoro
...
39abbafb3a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39abbafb3a |
@@ -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 } } };
|
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)
|
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())
|
for (auto st = start; st != last; st = st->lexNext())
|
||||||
{
|
{
|
||||||
if (st->variant() == CONTAINS_STMT)
|
if (st->variant() == CONTAINS_STMT) {
|
||||||
break;
|
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)
|
if (st->variant() == ENTRY_STAT)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (isSgExecutableStatement(st) == NULL) {
|
if (isSgExecutableStatement(st) == NULL) {
|
||||||
|
if (!isContainsFunctions)
|
||||||
checkInTypeDescription(st->expr(0), currF, parNames);
|
checkInTypeDescription(st->expr(0), currF, parNames);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -821,8 +848,10 @@ static void fillInOut(FuncInfo *currF, SgStatement *start, SgStatement *last, co
|
|||||||
if (st->lineNumber() <= 0)
|
if (st->lineNumber() <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (activeOps.size() && activeOps.find(st) == activeOps.end())
|
//XXX: use parameters removing in block ... isContainsFunctions ...
|
||||||
continue;
|
//TODO need to use IR for parameters checking
|
||||||
|
/*if (activeOps.size() && activeOps.find(st) == activeOps.end())
|
||||||
|
continue; */
|
||||||
|
|
||||||
if (st->variant() == ASSIGN_STAT)
|
if (st->variant() == ASSIGN_STAT)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION_SPF "2472"
|
#define VERSION_SPF "2473"
|
||||||
|
|||||||
Reference in New Issue
Block a user