From: Alex Smith Date: Tue, 31 Aug 2010 03:46:52 +0000 (+0100) Subject: Label the exact optimisation used when debugging the optimser X-Git-Tag: 0.29~82 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=f3e549f29a607afbc56534fd1541949a0eddab4c;p=intercal.git Label the exact optimisation used when debugging the optimser --- diff --git a/src/oil.y b/src/oil.y index 5e5cecb..9739257 100644 --- a/src/oil.y +++ b/src/oil.y @@ -95,6 +95,7 @@ struct ickstype #define MAXOPTNAMELEN 64 char optname[MAXOPTNAMELEN]="undefined"; +int optnumber = 0; typedef struct ickstype *YYSTYPE; @@ -236,7 +237,7 @@ optimization: template '-' '>' replacement } /* If we reach this point in the generated code, we have an optimizer template match. */ - printf(" OPTING(%s);\n",optname); + printf(" OPTING(%s_%d);\n",optname,++optnumber); /* We now need to replace np with its replacement. This is done by creating a new nodetree, copying across tempmem'd nodes where necessary, and then @@ -394,6 +395,7 @@ int yylex(void) c=countgetchar(); if(i==MAXOPTNAMELEN-1) {i=0; yyerror("optimization name too long");} } + optnumber=0; optname[i]=0; c=countgetchar(); while(isspace(c)) c=countgetchar();