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 11, 2023
1 parent fb02e6d commit be2725c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
9 changes: 0 additions & 9 deletions src/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,10 @@ 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;
}


#define SET_FUNC_CALL(call, x) WRITE_EXPR(cs, call, 0, x)
#define SET_ARGI_CALL(call, i, x) WRITE_EXPR(cs, call, i, x)
#define SET_ARGI_INFO(info, i, x) WRITE_STAT(cs, info, (i)-1, x)


static inline void PushOffsBody(CodeState * cs)
{
cs->OffsBodyList =
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 @@ -378,30 +374,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 be2725c

Please sign in to comment.