From f2a1fbc91c5505d9f9d6dbd31c805b0cd8cf4eb2 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Mon, 30 Mar 2009 00:33:07 -0400 Subject: [PATCH] Fix the profiler --- BUGS | 3 --- NEWS | 6 +++++- buildaux/Makefile.am | 1 + src/perpet.c | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/BUGS b/BUGS index 68f6e79..c03c79c 100644 --- a/BUGS +++ b/BUGS @@ -60,9 +60,6 @@ AIS = Alex Smith to pass command-line arguments like -x and -E to it), and fails when mixed with come-from-gerund and next-from-gerund. -7) (AIS) Something is seriously wrong with the profiler. Figure out - what it is. - TO DO 1. (ESR) Add more optimization templates, esp. idioms for +, -, *, /. diff --git a/NEWS b/NEWS index 3ac14ea..80392a7 100644 --- a/NEWS +++ b/NEWS @@ -83,7 +83,7 @@ Changes reported by the Debian autobuilders and Joey Hess been removed, as this method works better; likewise, the optimiser optimisation now works again.) -Changes patched by Alex Smith +Changes by Alex Smith 19. The build system has been completely redone, again; it now uses automake as well as a much newer version of autoconf. This means that there is now @@ -112,6 +112,10 @@ Changes patched by Alex Smith alternative method of getting a high-resolution clock for profiling (it is available on at least Linux). +23. The profiler now autodetects the same profiling mechanism at compile + time and at run time. (It was getting confused as to what mechanism it was + using, causing some really weird bugs.) + 23. Added support for computed CREATE (the computation is done at create-time, rather than when the unknown statement is encountered); partly because this was rather easy, but mostly because it can be used to simulate a diff --git a/buildaux/Makefile.am b/buildaux/Makefile.am index 9c654cf..0e18bd9 100644 --- a/buildaux/Makefile.am +++ b/buildaux/Makefile.am @@ -68,6 +68,7 @@ latin1.o: bin2c$(EXEEXT_FOR_BUILD) src/latin1.bin ickinclude_HEADERS = src/ick_ec.h src/fiddle.h src/abcess.h src/ick_lose.h \ src/yuk.h +nodist_ickinclude_HEADERS = config.h dist_ickdata_DATA = src/atari.bin src/baudot.bin src/ebcdic.bin src/latin1.bin \ src/ick-wrap.c src/pickwrap.c COPYING # These necessary pit files are in nodist_ here because they're in EXTRA_DIST diff --git a/src/perpet.c b/src/perpet.c index 02607d6..0cb35df 100644 --- a/src/perpet.c +++ b/src/perpet.c @@ -1272,6 +1272,7 @@ static void generate_code(FILE *ifp, FILE *ofp, case 'K': /* AIS: yuk information (or not) */ if(yukdebug||yukprofile) { + (void) fprintf(ofp, "#include \"config.h\"\n\n"); (void) fprintf(ofp, "#include \"yuk.h\"\n\n"); (void) fprintf(ofp, "char* textlines[] = {\n"); emittextlines(ofp); /* from feh.c */ -- 2.43.0