diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | awk.h | 5 | ||||
-rw-r--r-- | profile.c | 2 |
3 files changed, 13 insertions, 3 deletions
@@ -1,3 +1,12 @@ +2020-06-10 Arnold D. Robbins <arnold@skeeve.com> + + Thanks to Andrew Schorr for suggestion of better way to + handle exec_count being a long long. + + * awk.h (INSTRUCTION): Make new ldl member be the long long. + (exec_count): Is now ldl. + * profile.c (pprint): Fix printf of exec_count. + 2020-06-08 Arnold D. Robbins <arnold@skeeve.com> * awkgram.y: Fix `print $"2"' case. Thanks to Ed Morton @@ -758,7 +758,8 @@ typedef struct exp_instruction { awk_value_t *(*efptr)(int num_actual_args, awk_value_t *result, struct awk_ext_func *finfo); - long long dl; + long dl; + long long ldl; // for exec_count char *name; } d; @@ -899,7 +900,7 @@ typedef struct exp_instruction { /*------------------ pretty printing/profiling --------*/ /* Op_exec_count */ -#define exec_count d.dl +#define exec_count d.ldl /* Op_K_while */ #define while_body d.di @@ -297,7 +297,7 @@ pprint(INSTRUCTION *startp, INSTRUCTION *endp, int flags) ip2 = (pc + 1)->lasti; if (do_profile && ip1->exec_count > 0) - fprintf(prof_fp, " # %ld", ip1->exec_count); + fprintf(prof_fp, " # %lld", ip1->exec_count); end_line(ip1); skip_comment = true; |