Skip to content

Commit

Permalink
remove unused function, declare markVisited as static
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored and ChrisJefferson committed Dec 14, 2023
1 parent f9707f6 commit 636c70f
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions src/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ static inline void printOutput(int fileid, int line, BOOL exec, BOOL visited)

// Mark line as visited, and return true if the line has been previously
// visited (executed)
BOOL markVisited(int fileid, UInt line)
static BOOL markVisited(int fileid, UInt line)
{
// Some STATs end up without a file or line -- do not output these
// as they would just confuse the profile generation later.
Expand All @@ -555,31 +555,6 @@ BOOL markVisited(int fileid, UInt line)
return TRUE;
}

// Return TRUE is Stat has been visited (executed) before
BOOL visitedStat(Stat stat)
{
int fileid = getFilenameIdOfCurrentFunction();
int line = LINE_STAT(stat);

if (fileid == 0 || line == 0) {
return TRUE;
}

if (LEN_PLIST(profileState.visitedStatements) < fileid ||
!ELM_PLIST(profileState.visitedStatements, fileid)) {
return FALSE;
}

Obj linelist = ELM_PLIST(profileState.visitedStatements, fileid);

if (LEN_PLIST(linelist) < line || !ELM_PLIST(linelist, line)) {
return 0;
}
else {
return 1;
}
}

// type : the type of the statement
// exec : are we executing this statement
// visit: Was this statement previously visited (that is, executed)
Expand Down

0 comments on commit 636c70f

Please sign in to comment.