assign line number to intervals for loops
This commit is contained in:
@@ -17,7 +17,7 @@ using std::fstream;
|
|||||||
static long int getNextTag()
|
static long int getNextTag()
|
||||||
{
|
{
|
||||||
static long int INTERVAL_TAG = 0;
|
static long int INTERVAL_TAG = 0;
|
||||||
return INTERVAL_TAG++;
|
return -(INTERVAL_TAG++);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Debug funcs
|
//Debug funcs
|
||||||
@@ -413,7 +413,7 @@ static void findIntervals(SpfInterval *interval, map<int, int> &labelsRef, map<i
|
|||||||
inter->lineFile = std::make_pair(currentSt->lineNumber(), currentSt->fileName());
|
inter->lineFile = std::make_pair(currentSt->lineNumber(), currentSt->fileName());
|
||||||
inter->parent = interval;
|
inter->parent = interval;
|
||||||
inter->exit_levels.push_back(0);
|
inter->exit_levels.push_back(0);
|
||||||
inter->tag = getNextTag();
|
inter->tag = currentSt->lineNumber();//getNextTag();
|
||||||
interval->nested.push_back(inter);
|
interval->nested.push_back(inter);
|
||||||
|
|
||||||
findIntervals(inter, labelsRef, gotoStmts, currentSt);
|
findIntervals(inter, labelsRef, gotoStmts, currentSt);
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION_SPF "2469"
|
#define VERSION_SPF "2470"
|
||||||
|
|||||||
Reference in New Issue
Block a user