mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Remove time counter
Nobody uses that, and it requires running extra code for each line
This commit is contained in:
@@ -24,7 +24,6 @@
|
|||||||
#define MAXMACROARGS 99999
|
#define MAXMACROARGS 99999
|
||||||
#define MAXINCPATHS 128
|
#define MAXINCPATHS 128
|
||||||
|
|
||||||
extern uint32_t nTotalLines;
|
|
||||||
extern struct Section *pCurrentSection;
|
extern struct Section *pCurrentSection;
|
||||||
|
|
||||||
#endif /* RGBDS_ASM_ASM_H */
|
#endif /* RGBDS_ASM_ASM_H */
|
||||||
|
|||||||
@@ -45,9 +45,6 @@ size_t cldefines_bufsize;
|
|||||||
const size_t cldefine_entrysize = 2 * sizeof(void *);
|
const size_t cldefine_entrysize = 2 * sizeof(void *);
|
||||||
char **cldefines;
|
char **cldefines;
|
||||||
|
|
||||||
clock_t nStartClock, nEndClock;
|
|
||||||
uint32_t nTotalLines;
|
|
||||||
|
|
||||||
#if defined(YYDEBUG) && YYDEBUG
|
#if defined(YYDEBUG) && YYDEBUG
|
||||||
extern int yydebug;
|
extern int yydebug;
|
||||||
#endif
|
#endif
|
||||||
@@ -485,9 +482,6 @@ int main(int argc, char *argv[])
|
|||||||
lexer_Init();
|
lexer_Init();
|
||||||
fstk_Init(tzMainfile, maxRecursionDepth);
|
fstk_Init(tzMainfile, maxRecursionDepth);
|
||||||
|
|
||||||
nStartClock = clock();
|
|
||||||
|
|
||||||
nTotalLines = 0;
|
|
||||||
sym_Init(now);
|
sym_Init(now);
|
||||||
sym_SetExportAll(exportall);
|
sym_SetExportAll(exportall);
|
||||||
|
|
||||||
@@ -503,22 +497,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
sect_CheckUnionClosed();
|
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)
|
if (oFailedOnMissingInclude)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
@@ -565,9 +565,7 @@ lines : /* empty */
|
|||||||
| lines {
|
| lines {
|
||||||
nListCountEmpty = 0;
|
nListCountEmpty = 0;
|
||||||
nPCOffset = 0;
|
nPCOffset = 0;
|
||||||
} line {
|
} line
|
||||||
nTotalLines++;
|
|
||||||
}
|
|
||||||
;
|
;
|
||||||
|
|
||||||
line : label T_NEWLINE
|
line : label T_NEWLINE
|
||||||
|
|||||||
Reference in New Issue
Block a user