Skip to content

Commit

Permalink
Remove VISITED_STAT and SET_VISITED_STAT
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson authored and fingolfin committed Jan 30, 2023
1 parent 6a41688 commit 3257e06
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
8 changes: 0 additions & 8 deletions src/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,6 @@ static StatHeader * STAT_HEADER(CodeState * cs, Stat stat)
return (StatHeader *)ADDR_STAT(cs, stat) - 1;
}

void SET_VISITED_STAT(Stat stat)
{
Stat * addr = (Stat *)STATE(PtrBody) + stat / sizeof(Stat);
StatHeader * header = (StatHeader *)addr - 1;
header->visited = 1;
}


static Int TNUM_STAT_OR_EXPR(CodeState * cs, Expr expr)
{
if (IS_REF_LVAR(expr))
Expand Down
28 changes: 0 additions & 28 deletions src/code.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
** Header for any statement or expression encoded in a function body.
*/
typedef struct {
// `visited` starts out as 0 and is set to 1 if the statement or
// expression has ever been executed while profiling is turned on
unsigned int visited : 1;

// `line` records the line number in the source file in which the
// statement or expression started
unsigned int line : 31;
Expand Down Expand Up @@ -375,30 +371,6 @@ EXPORT_INLINE Int LINE_STAT(Stat stat)
return CONST_STAT_HEADER(stat)->line;
}


/****************************************************************************
**
*F VISITED_STAT(<stat>) . . . . . . . . . . . if statement has even been run
**
** 'VISITED_STAT' returns true if the statement has ever been executed
** while profiling is turned on.
*/
EXPORT_INLINE Int VISITED_STAT(Stat stat)
{
return CONST_STAT_HEADER(stat)->visited;
}


/****************************************************************************
**
*F SET_VISITED_STAT(<stat>) . . . . . . . . . . mark statement as having run
**
** 'SET_VISITED_STAT' marks the statement as having been executed while
** profiling was turned on.
*/
void SET_VISITED_STAT(Stat stat);


/****************************************************************************
**
*F IS_REF_LVAR(<expr>) . . . test if an expression is a reference to a local
Expand Down

0 comments on commit 3257e06

Please sign in to comment.