ref: 1487eebe7953eae9788ea0735da94b2af6a95f12
parent: 993c034039fb0a32770b1bf2a74a168a02e8181b
author: ISSOtm <eldredhabert0@gmail.com>
date: Fri Jan 22 03:49:18 EST 2021
Remove time counter Nobody uses that, and it requires running extra code for each line
--- a/include/asm/asm.h
+++ b/include/asm/asm.h
@@ -24,7 +24,6 @@
#define MAXMACROARGS 99999
#define MAXINCPATHS 128
-extern uint32_t nTotalLines;
extern struct Section *pCurrentSection;
#endif /* RGBDS_ASM_ASM_H */
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -45,9 +45,6 @@
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 @@
lexer_Init();
fstk_Init(tzMainfile, maxRecursionDepth);
- nStartClock = clock();
-
- nTotalLines = 0;
sym_Init(now);
sym_SetExportAll(exportall);
@@ -502,22 +496,6 @@
fclose(dependfile);
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;
--- a/src/asm/parser.y
+++ b/src/asm/parser.y
@@ -565,9 +565,7 @@
| lines {
nListCountEmpty = 0;
nPCOffset = 0;
- } line {
- nTotalLines++;
- }
+ } line
;
line : label T_NEWLINE