Remove time counter

Nobody uses that, and it requires running extra code for each line
This commit is contained in:
ISSOtm
2021-01-22 08:49:18 +01:00
parent 993c034039
commit 1487eebe79
3 changed files with 1 additions and 26 deletions

View File

@@ -24,7 +24,6 @@
#define MAXMACROARGS 99999
#define MAXINCPATHS 128
extern uint32_t nTotalLines;
extern struct Section *pCurrentSection;
#endif /* RGBDS_ASM_ASM_H */

View File

@@ -45,9 +45,6 @@ size_t cldefines_bufsize;
const size_t cldefine_entrysize = 2 * sizeof(void *);
char **cldefines;
clock_t nStartClock, nEndClock;
uint32_t nTotalLines;
#if defined(YYDEBUG) && YYDEBUG
extern int yydebug;
#endif
@@ -485,9 +482,6 @@ int main(int argc, char *argv[])
lexer_Init();
fstk_Init(tzMainfile, maxRecursionDepth);
nStartClock = clock();
nTotalLines = 0;
sym_Init(now);
sym_SetExportAll(exportall);
@@ -503,22 +497,6 @@ int main(int argc, char *argv[])
sect_CheckUnionClosed();
double timespent;
nEndClock = clock();
timespent = ((double)(nEndClock - nStartClock))
/ (double)CLOCKS_PER_SEC;
if (verbose) {
printf("Success! %" PRIu32 " lines in %d.%02d seconds ",
nTotalLines, (int)timespent,
((int)(timespent * 100.0)) % 100);
if (timespent < FLT_MIN_EXP)
printf("(INFINITY lines/minute)\n");
else
printf("(%d lines/minute)\n",
(int)(60 / timespent * nTotalLines));
}
if (oFailedOnMissingInclude)
return 0;

View File

@@ -565,9 +565,7 @@ lines : /* empty */
| lines {
nListCountEmpty = 0;
nPCOffset = 0;
} line {
nTotalLines++;
}
} line
;
line : label T_NEWLINE